C library for performing orbit propagation, based on Vinti6 algorithm.
Clone the Orbit Propagator repo. Don't forget to use --recurse-submodules
flag, or else you won't pull down some of the code needed to run unit tests.
git clone --recurse-submodules git@github.com:ODU-CGA-CubeSat/orbit-propagator.git
cd orbit-propagator
Note: If you accidentally cloned without using --recurse-submodules
, you can run git submodule update --init --recursive
to pull down submodules needed to run unit tests.
This builds the main executable written in C
mkdir build
cd build
cmake ..
make
The main executable, orbit-propagator
, as well as the simulation, vinti_sim.m
, take as input/output an ECI state vector which gives position and velocity in cartesian coordinates.
x = 2328.9659400000 km
y = -5995.2160000000 km
z = 1719.9789400000 km
xd = 2.9111011300 km/s
yd = -.9816405300 km/s
zd = -7.0904992200 km/s
Create an inputStateVect.txt
in the build/
directory using ECI coordinates and units of km, km/s, example below
4063.75
0
5134.54
0
7.826
0
In the build/
directory, run main executable
./orbit-propagator
This outputs a new state vector to outputStateVect.txt
(ECI cartesian and mean elements)
In the build/
directory, run
ctest -V
After running the build commands, you may run the the Octave orbit simulation, vinti_sim.m
.
Create an input text file in the orbit-propagator
project directory using ECI coordinates in km, km/s.
Example below using initial condition for mission generated by STK:
STK_initialCond.txt
-5877.6
428.24
3051.4
-2.991
-5.0497
-5.0231
In Octave, navigate to orbit-propagator
and from "Command Window" (in Octave) call:
[x_ECI, orbital_lifetime_hrs] = vinti_sim(max_simulation_time_hrs, 'inputFileName', 'dragCondition', SatMass)
Where,
Inputs:
max_simulation_time_hrs
is the numeric value of the max orbital time for which propogation is desired*;inputFileName
is the string value of the input file created above;dragCondition
is the string value describing whether the cubeSat is:tumbling
,front
,boom_front
,boom_tumbling
; andSatMass
is the numeric value of the CubeSat mass (e.g., 4.5 kg)
Outputs:
-
x_ECI
gives propogated TLE data in ECI coordinates; and -
orbital_lifetime_hrs
is the satellite lifetime based on reaching a termination altitude of 65 km** Note: orbital_lifetime_hrs will always be less than or equal to max_simulation_time_hrs
Example usage:
[stateVector,orbital_lifetime_hrs] = vinti_sim(2,"STK_initialCond.txt","tumbling",4)