|
Spacecraft Control Framework 1.0
Spacecraft Control Library
|
Spherical harmonic gravity model type and functions. More...
Go to the source code of this file.
Classes | |
| struct | gravity_s |
| Structure for storing gravitational properties of a planet, used to compute the gravitational matrix at a location and time. More... | |
Typedefs | |
| typedef struct gravity_s | gravity_t |
| Structure for storing gravitational properties of a planet, used to compute the gravitational matrix at a location and time. | |
Functions | |
| gravity_t * | init_gravity (int z_harm, int t_harm, int spherical, double p_radius, double mu, const ml_matrix &c_dist, const ml_matrix &s_dist, const ml_matrix &j) |
| Allocate and initialize a gravity structure. More... | |
| void | destroy_gravity (gravity_t *gravity) |
| Deallocate a gravity structure. More... | |
| ml_matrix | compute_gravity (gravity_t *gravity, const ml_matrix &x_eci, const ml_matrix &m_eci_to_ef) |
| Compute the gravity matrix at a location and time. More... | |
| double | total_energy_n_body (const ml_matrix &r, const ml_matrix &v, const ml_matrix &mass) |
| Compute the total energy for n bodies. More... | |
| ml_matrix | gravity_n_body (const ml_matrix &r, const ml_matrix &mass, double eps=0) |
| Compute the gravity for n bodies. More... | |
| ml_matrix | accel_planet (const ml_matrix &r, ml_matrix &mu, ml_matrix &rho) |
| Compute the gravity for n bodies. More... | |
| ml_matrix | accel_planet (const ml_matrix &r, double mu, ml_matrix &rho) |
| Compute the gravity for n bodies. More... | |
Spherical harmonic gravity model type and functions.
| gravity_t * init_gravity | ( | int | z_harm, |
| int | t_harm, | ||
| int | spherical, | ||
| double | p_radius, | ||
| double | mu, | ||
| const ml_matrix & | c_coef, | ||
| const ml_matrix & | s_coef, | ||
| const ml_matrix & | j | ||
| ) |
Allocate and initialize a gravity structure.
Allocate and initialize a gravity structure.
| z_harm | Number of zonal harmonics |
| t_harm | Number of tesseral harmonics |
| spherical | If non-zero, include the spherical gravity term in the output force |
| p_radius | Planet equatorial radius |
| mu | Planet spherical gravity coefficient |
| s_coef | The sine term coefficients |
| c_coef | The cosine term coefficients |
| j | The J coefficients |
References gravity_s::c_coef, gravity_s::c_dist, gravity_s::l_coef, gravity_s::mu, gravity_s::p_radius, gravity_s::s_coef, gravity_s::s_dist, gravity_s::spherical, gravity_s::t_harm, and gravity_s::z_harm.
| void destroy_gravity | ( | gravity_t * | gravity | ) |
Deallocate a gravity structure.
Deallocate a gravity structure.
| gravity | The gravity structure to be deallocated. |
| ml_matrix compute_gravity | ( | gravity_t * | gravity, |
| const ml_matrix & | x_eci, | ||
| const ml_matrix & | m_eci_to_ef | ||
| ) |
Compute the gravity matrix at a location and time.
| gravity | The gravity structure to use in the computation. |
| x_eci | The position matrix at which to calculate the gravity. |
| m_eci_to_ef | Transformation matrix from eci to earth fixed. |
References gravity_s::c_dist, gravity_s::l_coef, gravity_s::mu, gravity_s::p_radius, gravity_s::s_dist, gravity_s::spherical, gravity_s::t_harm, and gravity_s::z_harm.
| double total_energy_n_body | ( | const ml_matrix & | r, |
| const ml_matrix & | v, | ||
| const ml_matrix & | mass | ||
| ) |
Compute the total energy for n bodies.
Compute the total energy for n bodies.
| r | Position vectors [r1 r2 ... rn] |
| v | Velocity vector [v1 v2 ... vn] |
| mass | Planet mass [m1, m2, ... mn] |
| ml_matrix gravity_n_body | ( | const ml_matrix & | r, |
| const ml_matrix & | mass, | ||
| double | eps | ||
| ) |
Compute the gravity for n bodies.
Compute the gravity for n bodies.
| r | State vector [r1 r2 ... rn] |
| mass | Planet mass [m1, m2, ... mn] |
| eps | Factor to account for being too close to a gravity source |
| ml_matrix accel_planet | ( | const ml_matrix & | r, |
| ml_matrix & | mu, | ||
| ml_matrix & | rho | ||
| ) |
Compute the gravity for n bodies.
Compute the gravity for n bodies.
| r | Vector of the spacecraft from the central body |
| mu | Planet gravitational parameter(s) |
| rho | Vector of the perturbing planet(s) from the central body |
Referenced by accel_planet(), and gravity_earth::compute_accel().
| ml_matrix accel_planet | ( | const ml_matrix & | r, |
| double | mu, | ||
| ml_matrix & | rho | ||
| ) |
Compute the gravity for n bodies.
Compute the gravity for n bodies.
| r | Vector of the spacecraft from the central body |
| mu | Planet gravitational parameter(s) |
| rho | Vector of the perturbing planet(s) from the central body |
References accel_planet().