pub struct Geodetic {
pub latitude_rad: f64,
pub longitude_rad: f64,
pub height_m: f64,
}Expand description
A geodetic position on an ellipsoid.
The fields are public for convenience; Geodetic::new, deserialization and every
constructor that takes a site (crate::frames::LaunchFrame::new, crate::earth::Earth::new)
check them.
Fields§
§latitude_rad: f64Geodetic latitude φ, rad, in [−π/2, π/2], positive north.
longitude_rad: f64Longitude λ, rad, positive east of the prime meridian.
height_m: f64Height h above the ellipsoid along its normal, m. This is not height above mean sea
level: the two differ by the geoid undulation, up to about ±100 m.
Implementations§
Source§impl Geodetic
impl Geodetic
Sourcepub fn validated(self) -> Result<Self, CoreError>
pub fn validated(self) -> Result<Self, CoreError>
Checks a position built from the public fields: the same checks as Geodetic::new.
§Errors
As Geodetic::new.
Sourcepub fn new(
latitude_rad: f64,
longitude_rad: f64,
height_m: f64,
) -> Result<Self, CoreError>
pub fn new( latitude_rad: f64, longitude_rad: f64, height_m: f64, ) -> Result<Self, CoreError>
A position from latitude and longitude in radians and ellipsoidal height in meters.
§Errors
CoreError::Domain if the latitude is outside [−π/2, π/2] or any value is not finite.
Sourcepub fn from_degrees(
latitude_deg: f64,
longitude_deg: f64,
height_m: f64,
) -> Result<Self, CoreError>
pub fn from_degrees( latitude_deg: f64, longitude_deg: f64, height_m: f64, ) -> Result<Self, CoreError>
A position from latitude and longitude in degrees and ellipsoidal height in meters.
§Errors
As Geodetic::new.