Function lupnt::GetBodyRadius(BodyId)

Function Documentation

double lupnt::GetBodyRadius(BodyId body)

Get the mean equatorial radius of a solar-system body [m, SI units].

Return the body’s mean equatorial reference radius [m] (SI units).

Used by occultation/eclipse checks (e.g. lupnt/environment/occultation.cc) and plotting helpers (lupnt/interfaces/matplot.h) that need a body’s size to test line-of-sight blockage or to draw the body to scale. See also the (BodyId, UnitSystem) overload in lupnt/environment/body.h for results in a non-SI unit system.

Convenience accessor over GetBodyData used e.g. by Occultation for eclipse/occultation radius checks and by plotting code (maplot.cc) to size drawn bodies.

Parameters:
  • body – Solar-system body identifier

  • bodyBody identifier

Returns:

Mean equatorial radius [m]

Returns:

Reference radius [m]