Skip to content

Generic surface sites

Source: AI/Tools/GenericSiteTools.cs

Site tools that work for an arbitrary (latitude, longitude, altitude) location on any celestial body with an ellipsoid model.

GetSiteStateVector

State vector of a user-defined surface site observed from a celestial item.

Parameter Type Description
body PlanetsMoonsEnum Body the site is on
latitude radians Planetodetic latitude
longitude radians Planetodetic longitude
altitude meters Altitude above the reference ellipsoid
observer CelestialItemsEnum Observing body
frame FramesEnum Output frame
datetime ISO 8601 string Epoch
aberration Aberration Aberration

GetSiteHorizontalCoordinates

Azimuth, elevation, range of a target from an arbitrary site at a given epoch. Same site parameters as above, plus a target body.

GetSiteFrameName

Returns the topocentric frame name of a site built from a name: <NAME_UPPERCASED>_TOPO.

Parameter Type Description
siteName string Case-insensitive name; will be uppercased

ConvertPlanetodeticToCartesian

Planetodetic (lat, lon, alt) → body-fixed Cartesian (m) using the body's equatorial radius and flattening.

Parameter Type Description
body PlanetsMoonsEnum Body whose ellipsoid is used
latitude radians Planetodetic latitude
longitude radians Planetodetic longitude
altitude meters Altitude above the reference ellipsoid

ConvertCartesianToPlanetodetic

Inverse of the previous tool.

Parameter Type Description
body PlanetsMoonsEnum Body whose ellipsoid is used
x meters Body-fixed X
y meters Body-fixed Y
z meters Body-fixed Z

ComputeSubSpacecraftPoint

Planetodetic sub-spacecraft point (latitude, longitude, altitude above ellipsoid) from a body-fixed spacecraft position.

Same parameters as ConvertCartesianToPlanetodetic. The latitude/longitude describe the ground point beneath the spacecraft; the altitude is the spacecraft's height above the surface.