Skip to content

Determine the position, velocity, and orbit (in 3D) of satellite with given the initial vector (r0 &v0), using MATLAB

License

Notifications You must be signed in to change notification settings

Armanasq/OrbitDetermination

Repository files navigation

Orbital Mechanics Simulation README

Introduction

This repository contains MATLAB code designed to simulate the orbital motion of a satellite around Earth. The simulation employs Keplerian orbital elements to calculate the satellite's position and velocity vectors over time. The primary objective of this code is to provide a visual representation and analysis of the satellite's trajectory in Earth-Centered Inertial (ECI) coordinates.

Table of Contents

  1. Installation
  2. Usage
  3. Code Overview
  4. Formulas Used
  5. Additional Information
  6. Contact

Installation

  1. Download and install MATLAB on your system.

  2. Clone this repository to your local machine using the following command:

    git clone https://github.com/your-username/orbital-mechanics-simulation.git

Usage

  1. Open MATLAB and navigate to the cloned repository.
  2. Run the main.m script to execute the simulation.
  3. Examine the generated plots to visualize the satellite's orbit.

Code Overview

Orbital Elements Calculation

The initial conditions of the satellite, such as position and velocity, are defined in Cartesian coordinates. These values are then converted into classical orbital elements using the rv_from_r0v0 and coe_from_rv functions.

Orbit Visualization

The satellite's orbit is visualized using MATLAB's plotting capabilities. The script generates a 3D plot of the satellite's trajectory in ECI coordinates, overlaid on a sphere representing Earth.

Coordinate Transformations

Coordinate transformations are applied to convert the satellite's position from perifocal coordinates to ECI coordinates. The matrices ( R_{z_{\Omega}} ), ( R_{x_i} ), and ( R_{z_{\omega}} ) are used for these transformations.

Formulas Used

  1. Orbital Elements Calculation:

    • Semi-Major Axis: Semi-Major Axis Formula

    • Eccentric Anomaly: Eccentric Anomaly Formula

  2. Eccentric Anomaly Iteration:

    • Newton's Method: Newton's Method Formula
  3. Orbit Positions Calculation:

    • Perifocal Coordinates: Perifocal Coordinates Formula
  4. Coordinate Transformations:

    • Coordinate Transformations Formula

Additional Information

The simulation also provides information such as the apogee and perigee of the satellite's orbit, as well as its final position and velocity vectors. Eccentricity, inclination, and other orbital elements are calculated and displayed.

The visual representation includes an illustration of the Earth's surface, the satellite's orbit trajectory, and key orbital parameters.

Contact

For any questions, feedback, or suggestions regarding this code, please contact:

Author: A. Asgharpoor
Email: [email protected]

About

Determine the position, velocity, and orbit (in 3D) of satellite with given the initial vector (r0 &v0), using MATLAB

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages