altitude_maintenance_module Module

Altitude maintenance for low lunar orbits.

Assumptions:

  • Circular low-lunar orbit.
  • Only periapsis altitude is controlled (all other elements float)
  • The low-fidelity IAU_MOON frame is used for the elements and gravity model.

Uses

  • module~~altitude_maintenance_module~~UsesGraph module~altitude_maintenance_module altitude_maintenance_module ddeabm_module ddeabm_module module~altitude_maintenance_module->ddeabm_module fortran_astrodynamics_toolkit fortran_astrodynamics_toolkit module~altitude_maintenance_module->fortran_astrodynamics_toolkit iso_fortran_env iso_fortran_env module~altitude_maintenance_module->iso_fortran_env

Used by

  • module~~altitude_maintenance_module~~UsedByGraph module~altitude_maintenance_module altitude_maintenance_module program~main main program~main->module~altitude_maintenance_module

Contents


Derived Types

type, public, extends(ddeabm_with_event_class) :: segment

the main class for integrating a low-lunar orbit.

Components

TypeVisibilityAttributesNameInitial
integer, public :: event =0

event function to use:

Read more…
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)

Type-Bound Procedures

procedure, public :: initialize_seg => initialize_segment
procedure, public :: altitude_maintenance

Functions

private pure function true_anomaly(rv) result(tru)

Compute true anomaly [0, 360] deg.

Arguments

TypeIntentOptionalAttributesName
real(kind=wp), intent(in), dimension(6):: rv

[position,velocity] vector

Return Value real(kind=wp)

true anomaly (deg)

private pure function periapsis_raise_maneuver(rv, target_rp) result(dv)

Compute the maneuver at apoapsis to raise periapsis to the specified value.

Arguments

TypeIntentOptionalAttributesName
real(kind=wp), intent(in), dimension(6):: rv

[position,velocity] vector

real(kind=wp), intent(in) :: target_rp

the rp value to target

Return Value real(kind=wp)

the maneuver to perform at apoapsis to target target_rp

private pure function rdot(rv) result(rd)

Compute radial velocity magnitude

Arguments

TypeIntentOptionalAttributesName
real(kind=wp), intent(in), dimension(6):: rv

[position,velocity] vector

Return Value real(kind=wp)


Subroutines

private subroutine initialize_segment(me, alt0, deadband_alt, grav_n, grav_m, ephemeris_file, gravfile)

Initialize the segment for integration.

Arguments

TypeIntentOptionalAttributesName
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

private subroutine altitude_maintenance(seg, et0, inc0, ran0, tru0, dt_max, n_dvs, dv_total, xf)

Altitude maintenance for a circular lunar orbit - periapsis only control.

Arguments

TypeIntentOptionalAttributesName
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)

private subroutine event_func(me, t, x, g)

Event function: when the altitude drops below the deadband.

Read more…

Arguments

TypeIntentOptionalAttributesName
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

private subroutine ballistic_derivs(me, t, x, xdot)

Equations of motion for a ballistic orbit around the moon.

Arguments

TypeIntentOptionalAttributesName
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 ()