COSMOS core
1.0.2 (beta)
Comprehensive Open-architecture Solution for Mission Operations Systems
|
Functions | |
void | pleph_ (double[], long *, long *, double[]) |
void | dpleph_ (double[], long *, long *, double[]) |
rvector | gravity_vector (svector pos, int model, uint32_t degree) |
double | gravity_potential (double lon, double lat, double r, int model, uint32_t degree) |
rvector | gravity_accel (posstruc pos, int model, uint32_t degree) |
Calculates geocentric acceleration vector from chosen model. More... | |
rvector | gravity_accel2 (posstruc pos, int model, uint32_t degree) |
Calculates geocentric acceleration vector from chosen model. More... | |
double | gravity (double radius, double colat, double elon, int model, uint32_t degree) |
Calculates geocentric acceleration magnitude from chosen model. More... | |
int32_t | gravity_params (int model) |
Gravitational model parameters. More... | |
double | nplgndr (uint32_t l, uint32_t m, double x) |
Legendre polynomial. More... | |
svector | groundstation (locstruc &satellite, locstruc &groundstation) |
Ground station values. More... | |
void | simulate_hardware (cosmosstruc *cinfo, locstruc &loc) |
Simulate all devices. More... | |
void | simulate_hardware (cosmosstruc *cinfo, vector< locstruc > &locvec) |
Simulate Hardware data - multiple. More... | |
void | initialize_imu (uint16_t index, devspecstruc &devspec, locstruc &loc) |
Initialize IMU simulation. More... | |
void | simulate_imu (int index, cosmosstruc *root, locstruc &loc) |
Simulated IMU values. More... | |
int32_t | pos_accel (physicsstruc &physics, locstruc &loc) |
Acceleration. More... | |
void | att_accel (physicsstruc &physics, locstruc &loc) |
Torque. More... | |
void | geod2icrf (posstruc *pos) |
Geodetic to Heliocentric. More... | |
double | msis86_density (posstruc pos, float f107avg, float f107, float magidx) |
double | msis00_density (posstruc pos, float f107avg, float f107, float magidx) |
Calculate atmospheric density. More... | |
void | orbit_init_tle (int32_t mode, double dt, double mjd, cosmosstruc *root) |
void | orbit_init_eci (int32_t mode, double dt, double mjd, cartpos ipos, cosmosstruc *root) |
void | orbit_init_shape (int32_t mode, double dt, double mjd, double altitude, double angle, double hour, cosmosstruc *root) |
void | propagate (cosmosstruc *root, double mjd) |
double | rearth (double lat) |
int | update_eci (cosmosstruc *root, double utc, cartpos pos) |
void | hardware_init_eci (cosmosstruc *cinfo, locstruc &loc) |
Initialize Hardware. More... | |
void | gauss_jackson_setup (gj_handle &gjh, uint32_t order, double utc, double &dt) |
Prepare for Gauss-Jackson integration. More... | |
void | gauss_jackson_init_tle (gj_handle &gjh, uint32_t order, int32_t mode, double dt, double mjd, cosmosstruc *cinfo) |
void | gauss_jackson_init_eci (gj_handle &gjh, uint32_t order, int32_t mode, double dt, double mjd, cartpos ipos, qatt iatt, physicsstruc &physics, locstruc &loc) |
Initialize Gauss-Jackson orbit using ECI state vector. More... | |
void | gauss_jackson_init_stk (gj_handle &gjh, uint32_t order, int32_t mode, double dt, double mjd, stkstruc &stk, physicsstruc &physics, locstruc &loc) |
void | gauss_jackson_init (gj_handle &gjh, uint32_t order, int32_t mode, double dt, double mjd, double altitude, double angle, double hour, locstruc &iloc, physicsstruc &physics, locstruc &loc) |
locstruc | gauss_jackson_converge_orbit (gj_handle &gjh, physicsstruc &physics) |
void | gauss_jackson_converge_hardware (gj_handle &gjh, physicsstruc &physics) |
vector< locstruc > | gauss_jackson_propagate (gj_handle &gjh, physicsstruc &physics, locstruc &loc, double mjd) |
int | orbit_propagate (cosmosstruc *root, double mjd) |
Load TLE's from file. More... | |
int | orbit_init (int32_t mode, double dt, double mjd, string ofile, cosmosstruc *root) |
Initialize orbit from orbital data. More... | |
void pleph_ | ( | double | [], |
long * | , | ||
long * | , | ||
double | [] | ||
) |
void dpleph_ | ( | double | [], |
long * | , | ||
long * | , | ||
double | [] | ||
) |
double gravity_potential | ( | double | lon, |
double | lat, | ||
double | r, | ||
int | model, | ||
uint32_t | degree | ||
) |
Calculates geocentric acceleration vector from chosen model.
Calculates geocentric acceleration vector from chosen model.
Calculates a spherical harmonic expansion of the chosen model of indicated order and degree for the requested position. The result is returned as a geocentric vector calculated at the epoch.
pos | a posstruc providing the position at the epoch |
model | Model to use for coefficients |
degree | Order and degree to calculate |
Calculates geocentric acceleration vector from chosen model.
double gravity | ( | double | radius, |
double | colat, | ||
double | elon, | ||
int | model, | ||
uint32_t | degree | ||
) |
Calculates geocentric acceleration magnitude from chosen model.
int32_t gravity_params | ( | int | model | ) |
double nplgndr | ( | uint32_t | l, |
uint32_t | m, | ||
double | x | ||
) |
Legendre polynomial.
Ground station values.
Ground station values.
Calculates aziumth and elevation for each gound station in the list of ground stations for a satellite at the indicated position.
satellite | pointer to a locstruc specifying satellite position |
groundstation | pointer to a locstruc specifying groundstation to be targeted |
void simulate_hardware | ( | cosmosstruc * | cinfo, |
locstruc & | loc | ||
) |
Simulate all devices.
Simulate all devices.
Simulate the behavior of all the hardware in the indicated satellite, at the indicated location, assuming a timestep of dt.
cinfo | Reference to cosmosstruc to use. |
loc | Structure specifying location |
Calculate change in Angular Momentum and therefore Acceleration
Accelerate Reaction Wheel and calculate Component currents.
Component currents for each MTR
void simulate_hardware | ( | cosmosstruc * | cinfo, |
vector< locstruc > & | locvec | ||
) |
Simulate Hardware data - multiple.
Simulate the behavior of all the hardware in the indicated satellite, for each indicated location in the array.
cinfo | Reference to cosmosstruc to use. |
locvec | Array of locstruc specifying locations. |
void initialize_imu | ( | uint16_t | index, |
devspecstruc & | devspec, | ||
locstruc & | loc | ||
) |
Initialize IMU simulation.
Initialize IMU simulation.
Set the indicated IMU to a base attitude and position. Use the logic that the current attitude and position are equivalent to the origin of the position frame and the identity attitude. Set all velocities and accelerations to zero.
index | Index of desired IMU. |
devspec | Pointer to structure holding specs on imu. |
loc | Structure specifying location |
void simulate_imu | ( | int | index, |
cosmosstruc * | cinfo, | ||
locstruc & | loc | ||
) |
Simulated IMU values.
Simulated IMU values.
Turn the current attitude into likely values for the indicated IMU. Inject any likely noise due to the nature of the IMU.
index | Which IMU to use. |
cinfo | Reference to cosmosstruc to use. |
loc | Structure specifying location |
index | Index of desired IMU. |
Set time of reading
Set raw values for accelerometer and gyros
Set magnetic field in IMU frame
int32_t pos_accel | ( | physicsstruc & | physics, |
locstruc & | loc | ||
) |
Acceleration.
Acceleration.
Calculate the linear forces on the specified sattelite at the specified location/
physics | Pointer to structure specifying satellite. |
loc | Structure specifying location. |
void att_accel | ( | physicsstruc & | physics, |
locstruc & | loc | ||
) |
Torque.
Torque.
Calculate the torque forces on the specified satellite at the specified location/
physics | Pointer to structure specifying satellite. |
loc | Structure specifying location. |
void geod2icrf | ( | posstruc * | pos | ) |
Geodetic to Heliocentric.
double msis86_density | ( | posstruc | pos, |
float | f107avg, | ||
float | f107, | ||
float | magidx | ||
) |
double msis00_density | ( | posstruc | pos, |
float | f107avg, | ||
float | f107, | ||
float | magidx | ||
) |
Calculate atmospheric density.
Calculate atmospheric density at indicated Latitute/Longitude/Altitude using the NRLMSISE-00 atmospheric model.
pos | Structure indicating position |
f107avg | Average 10.7 cm solar flux |
f107 | Current 10.7 cm solar flux |
magidx | Ap daily geomagnetic index |
void orbit_init_tle | ( | int32_t | mode, |
double | dt, | ||
double | mjd, | ||
cosmosstruc * | root | ||
) |
void orbit_init_eci | ( | int32_t | mode, |
double | dt, | ||
double | mjd, | ||
cartpos | ipos, | ||
cosmosstruc * | root | ||
) |
void orbit_init_shape | ( | int32_t | mode, |
double | dt, | ||
double | mjd, | ||
double | altitude, | ||
double | angle, | ||
double | hour, | ||
cosmosstruc * | root | ||
) |
void propagate | ( | cosmosstruc * | root, |
double | mjd | ||
) |
double rearth | ( | double | lat | ) |
int update_eci | ( | cosmosstruc * | root, |
double | utc, | ||
cartpos | pos | ||
) |
void hardware_init_eci | ( | cosmosstruc * | cinfo, |
locstruc & | loc | ||
) |
Initialize Hardware.
Set up the hardware simulation by initializing the various components to their base values.
devspec | Pointer to structure holding specs on devices. |
loc | Structure specifying location |
Initialize temperature sensors
Reaction Wheels
Magnetic Torque Rods
Star Trackers
void gauss_jackson_setup | ( | gj_handle & | gjh, |
uint32_t | order, | ||
double | utc, | ||
double & | dt | ||
) |
Prepare for Gauss-Jackson integration.
Initializes Gauss-Jackson integration parameters for indicated order (must be even). Binomial coefficients are initialized first time through.
gjh | gj_handle containing Gauss-Jackson inforation. |
order | The order at which the integration will be performed |
utc | Initial Modified Julian Day. |
dt | Step size in seconds. |
void gauss_jackson_init_tle | ( | gj_handle & | gjh, |
uint32_t | order, | ||
int32_t | mode, | ||
double | dt, | ||
double | mjd, | ||
cosmosstruc * | cinfo | ||
) |
void gauss_jackson_init_eci | ( | gj_handle & | gjh, |
uint32_t | order, | ||
int32_t | mode, | ||
double | dt, | ||
double | utc, | ||
cartpos | ipos, | ||
qatt | iatt, | ||
physicsstruc & | physics, | ||
locstruc & | loc | ||
) |
Initialize Gauss-Jackson orbit using ECI state vector.
Initializes Gauss-Jackson structures using supplied initial state vector.
gjh | Reference to gj_handle for Gauss-Jackson integration. |
order | the order at which the integration will be performed (must be even) |
mode | Mode of physics propagation. Zero is free propagation. |
dt | Step size in seconds |
utc | Initial step time as UTC in Modified Julian Days |
ipos | Initial ECI Position |
iatt | Initial ICRF Attitude |
physics | Reference to physicsstruc to use. |
loc | Reference to locstruc to use. |
void gauss_jackson_init_stk | ( | gj_handle & | gjh, |
uint32_t | order, | ||
int32_t | mode, | ||
double | dt, | ||
double | mjd, | ||
stkstruc & | stk, | ||
physicsstruc & | physics, | ||
locstruc & | loc | ||
) |
void gauss_jackson_init | ( | gj_handle & | gjh, |
uint32_t | order, | ||
int32_t | mode, | ||
double | dt, | ||
double | mjd, | ||
double | altitude, | ||
double | angle, | ||
double | hour, | ||
locstruc & | iloc, | ||
physicsstruc & | physics, | ||
locstruc & | loc | ||
) |
locstruc gauss_jackson_converge_orbit | ( | gj_handle & | gjh, |
physicsstruc & | physics | ||
) |
void gauss_jackson_converge_hardware | ( | gj_handle & | gjh, |
physicsstruc & | physics | ||
) |
vector<locstruc> gauss_jackson_propagate | ( | gj_handle & | gjh, |
physicsstruc & | physics, | ||
locstruc & | loc, | ||
double | mjd | ||
) |
int orbit_propagate | ( | cosmosstruc * | root, |
double | mjd | ||
) |
Load TLE's from file.
int orbit_init | ( | int32_t | mode, |
double | dt, | ||
double | utc, | ||
string | ofile, | ||
cosmosstruc * | cinfo | ||
) |
Initialize orbit from orbital data.
Initializes satellite structure using orbital data
mode | The style of propagation. Zero is free propagation. |
dt | Step size in seconds |
utc | Initial step time as UTC in Modified Julian Days. If set to 0., first time in the orbital data will be used. |
ofile | Name of the file containing orbital data. Two Line Element set if first letter is 't', STK data if first letter is 's'. |
cinfo | Reference to cosmosstruc to use. |