Altitude maintenance for low lunar orbits.
Assumptions:
the main class for integrating a low-lunar orbit.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | event | = | 0 | event function to use: |
|
| real(kind=wp), | public | :: | et_ref | reference ephemeris time (sec) |
|||
| real(kind=wp), | public | :: | nominal_altitude | = | 100.0_wp | nominal altitude (km) |
|
| real(kind=wp), | public | :: | deadband | = | 10.0_wp | altitude below nominal to trigger maneuver (km) |
|
| real(kind=wp), | public | :: | r_moon | = | 1737.4_wp | radius of the moon (km) |
|
| logical, | public | :: | include_third_bodies | = | .false. | to also include Earth and Sun in force model |
|
| type(geopotential_model_pines), | public | :: | grav | central body geopotential model |
|||
| type(jpl_ephemeris), | public | :: | eph | the ephemeris |
|||
| integer, | public | :: | n_eoms | = | 6 | size of EOM derivative vector [x,y,z,vx,vy,vz] |
|
| real(kind=wp), | public | :: | integrator_tol | = | 1.0e-12_wp | integrator tols |
|
| integer, | public | :: | maxsteps | = | 1000000 | integrator max steps |
|
| integer, | public | :: | grav_n | = | 8 | max grav degree |
|
| integer, | public | :: | grav_m | = | 8 | max grav order |
|
| real(kind=wp), | public | :: | root_tol | = | 1.0e-6_wp | event tolerance for deadband (km) |
| procedure, public :: initialize_seg => initialize_segment | |
| procedure, public :: altitude_maintenance |
Compute true anomaly [0, 360] deg.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in), | dimension(6) | :: | rv | [position,velocity] vector |
true anomaly (deg)
Compute the maneuver at apoapsis to raise periapsis to the specified value.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in), | dimension(6) | :: | rv | [position,velocity] vector |
|
| real(kind=wp), | intent(in) | :: | target_rp | the rp value to target |
the maneuver to perform at apoapsis to target target_rp
Compute radial velocity magnitude
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in), | dimension(6) | :: | rv | [position,velocity] vector |
Initialize the segment for integration.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(segment), | intent(inout) | :: | me | |||
| real(kind=wp), | intent(in) | :: | alt0 | |||
| real(kind=wp), | intent(in) | :: | deadband_alt | |||
| integer, | intent(in) | :: | grav_n | |||
| integer, | intent(in) | :: | grav_m | |||
| character(len=*), | intent(in) | :: | ephemeris_file | |||
| character(len=*), | intent(in) | :: | gravfile |
Altitude maintenance for a circular lunar orbit - periapsis only control.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(segment), | intent(inout) | :: | seg | |||
| real(kind=wp), | intent(in) | :: | et0 | initial ephemeris time (sec) |
||
| real(kind=wp), | intent(in) | :: | inc0 | initial inclination - IAU_MOON of date (deg) |
||
| real(kind=wp), | intent(in) | :: | ran0 | initial RAAN - IAU_MOON of date (deg) |
||
| real(kind=wp), | intent(in) | :: | tru0 | initial true anomaly - IAU_MOON of date (deg) |
||
| real(kind=wp), | intent(in) | :: | dt_max | how long to propagate (days) |
||
| integer, | intent(out) | :: | n_dvs | number of DV maneuvers performed |
||
| real(kind=wp), | intent(out) | :: | dv_total | total DV (km/s) |
||
| real(kind=wp), | intent(out), | dimension(6) | :: | xf | final state - inertial frame (km, km/s) |
Event function: when the altitude drops below the deadband.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ddeabm_with_event_class), | intent(inout) | :: | me | |||
| real(kind=wp), | intent(in) | :: | t | time |
||
| real(kind=wp), | intent(in), | dimension(:) | :: | x | state -- moon centered inertial frame |
|
| real(kind=wp), | intent(out) | :: | g | event function |
Equations of motion for a ballistic orbit around the moon.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ddeabm_class), | intent(inout) | :: | me | |||
| real(kind=wp), | intent(in) | :: | t | time [sec from epoch] |
||
| real(kind=wp), | intent(in), | dimension(:) | :: | x | state [r,v] in inertial frame (moon-centered) |
|
| real(kind=wp), | intent(out), | dimension(:) | :: | xdot | derivative of state () |