halo_utilities_module Module

Various astrodynamics utilities.

Todo

Some of this should eventually be moved into the fortran astrodynamics toolkit


Uses

  • module~~halo_utilities_module~~UsesGraph module~halo_utilities_module halo_utilities_module fortran_astrodynamics_toolkit fortran_astrodynamics_toolkit module~halo_utilities_module->fortran_astrodynamics_toolkit iso_fortran_env iso_fortran_env module~halo_utilities_module->iso_fortran_env module~halo_kinds_module halo_kinds_module module~halo_utilities_module->module~halo_kinds_module module~parameters_module parameters_module module~halo_utilities_module->module~parameters_module module~splined_ephemeris_module splined_ephemeris_module module~halo_utilities_module->module~splined_ephemeris_module module~halo_kinds_module->iso_fortran_env module~parameters_module->fortran_astrodynamics_toolkit module~parameters_module->module~halo_kinds_module module~splined_ephemeris_module->fortran_astrodynamics_toolkit module~splined_ephemeris_module->iso_fortran_env module~splined_ephemeris_module->module~halo_kinds_module bspline_module bspline_module module~splined_ephemeris_module->bspline_module

Used by

  • module~~halo_utilities_module~~UsedByGraph module~halo_utilities_module halo_utilities_module module~halo_module halo_module module~halo_module->module~halo_utilities_module

Functions

public function get_sun_fraction(eph, et, rv, rbubble) result(phi)

Compute the "sun fraction" using the circular cubic shadow model.

Arguments

Type IntentOptional Attributes Name
class(jpl_ephemeris), intent(inout) :: eph

the ephemeris

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

observer ephemeris time (sec)

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

state of the spacecraft !! (j2000-moon frame)

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

eclipse bubble [km]. see the reference.

Return Value real(kind=wp)

circular cubic sun frac value.

  • 0 no eclipse,

  • <0 eclipse,
  • =0 on the eclipse line

Subroutines

public subroutine from_j2000moon_to_j2000ssb(eph, et, rv_moon, rv_ssb)

convert from a j2000-moon frame to a j2000-ssb frame.

Arguments

Type IntentOptional Attributes Name
class(jpl_ephemeris), intent(inout) :: eph
real(kind=wp), intent(in) :: et

ephemeris time (sec)

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

j2000-moon state (km, km/s)

real(kind=wp), intent(out), dimension(6) :: rv_ssb

j2000-ssb state (km, km/s)

private subroutine get_pos(eph, et, b_target, b_obs, r, status_ok)

ephemeris wrapper to just return position vector see also: ballistic_derivs

Arguments

Type IntentOptional Attributes Name
class(jpl_ephemeris), intent(inout) :: eph
real(kind=wp), intent(in) :: et

ephemeris time (sec)

type(celestial_body), intent(in) :: b_target

target body

type(celestial_body), intent(in) :: b_obs

observer body

real(kind=wp), intent(out), dimension(3) :: r

j2000 state (km, km/s)

logical, intent(out) :: status_ok

true if no problems

public subroutine apparent_position(eph, b_target, et, rv_obs_ssb, r_target, status_ok)

Return the position of a target body relative to an observer, corrected for light time and stellar aberration.

Read more…

Arguments

Type IntentOptional Attributes Name
class(jpl_ephemeris), intent(inout) :: eph

the ephemeris

type(celestial_body), intent(in) :: b_target

target body

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

observer ephemeris time (sec)

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

state of the observer (j2000 frame w.r.t. solar system barycenter)

real(kind=wp), intent(out), dimension(3) :: r_target

apparant state of the target (j2000 frame) Corrected for one-way light time and stellar aberration

logical, intent(out) :: status_ok

true if no problems

private subroutine cubic_shadow_model(rsun, radsun, rplanet, radplanet, sunfrac, rbubble)

The "circular cubic" shadow model.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(3) :: rsun

apparent position vector of sun wrt spacecraft [km]

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

radius of sun [km]

real(kind=wp), intent(in), dimension(3) :: rplanet

apparent position vector of eclipsing body wrt spacecraft [km]

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

radius of the eclipsing body [km]

real(kind=wp), intent(out) :: sunfrac

value of the function (>0 no eclipse, <0 eclipse, =0 on the shadow line)

real(kind=wp), intent(in), optional :: rbubble

eclipse bubble radius. if present, then sunfrac is the value along an arc length of rbubble in the direction of the max eclipse line.