Class GeodeticLibrary
- Namespace
- NominalSystems.Universe
- Assembly
- NominalSystems.Universe.dll
Library for converting between different planet coordinates, including: PCI, PCPF, LLA and SEZ
public static class GeodeticLibrary
- Inheritance
-
GeodeticLibrary
Methods
GeodeticElem2VectorElem(GeodeticElements, Matrix3, double, double)
Converts from a Lat/Long/Altitude coordinates to planet-centered, planet-fixed coordinates given a planet radius. This assumes that the object is located at the peak of the orbit equal to the lat and lon of the object. This also assumes a circular orbit.
public static VectorElements GeodeticElem2VectorElem(GeodeticElements llaPosition, Matrix3 j20002Pfix, double planetRadius, double mu)
Parameters
llaPosition
GeodeticElements[-] Position in latitude/longitude/altitude coordinates
j20002Pfix
Matrix3[-] Planet rotation matrix
planetRadius
double[m] Planetary radius, assumed to be constant (i.e., spherical)
mu
double[kg m^2 s^3] The gravitational constant for the body orbiting
Returns
- VectorElements
[m]/[m/s] Final position and velocity in the planet-centered, planet-fixed frame.
LLA2PCI(GeodeticElements, Matrix3, double)
Converts from a planet-centered inertial coordinates to latitutde/longitude/altitude (LLA) coordinates given a planet radius and rotation matrix.
public static Vector3 LLA2PCI(GeodeticElements llaPosition, Matrix3 J20002Pfix, double planetRadius)
Parameters
llaPosition
GeodeticElements[-] Position in latitude/longitude/altitude coordinates
J20002Pfix
Matrix3[-] Rotation matrix between inertial and PCPF frames
planetRadius
double[m] Planetary radius, assumed to be constant (i.e., spherical)
Returns
- Vector3
[m] Position in inertial coordinates.
LLA2PCPF(GeodeticElements, double)
Converts from a Lat/Long/Altitude coordinates to planet-centered, planet-fixed coordinates given a planet radius.
public static Vector3 LLA2PCPF(GeodeticElements llaPosition, double planetRadius)
Parameters
llaPosition
GeodeticElements[-] Position in latitude/longitude/altitude coordinates
planetRadius
double[m] Planetary radius, assumed to be constant (i.e., spherical)
Returns
- Vector3
[m] Final position in the planet-centered, planet-fixed frame.
PCI2LLA(Vector3, Matrix3, double)
Converts from a planet-centered inertial coordinates to latitutde/longitude/altitude (LLA) coordinates given a planet radius and rotation matrix.
public static GeodeticElements PCI2LLA(Vector3 pciPosition, Matrix3 J20002Pfix, double planetRadius)
Parameters
pciPosition
Vector3[m] Position vector in PCI coordinates
J20002Pfix
Matrix3[-] 3x3 rotation matrix representing the rotation between PCPF and ECI frames
planetRadius
double[m] Planetary radius, assumed to be constant (i.e., spherical)
Returns
- GeodeticElements
Final position in latitude/longitude/altitude coordinates [0] : [deg] latitude above planetary equator [1] : [deg] longitude across planetary meridian [2] : [m] altitude above planet radius
PCI2PCPF(Vector3, Matrix3)
Converts from a planet-centered inertial position (i.e., J2000 ECI) to a planet-centered, planet-fixed position given a rotation matrix.
public static Vector3 PCI2PCPF(Vector3 pciPosition, Matrix3 J20002Pfix)
Parameters
pciPosition
Vector3[m] Position vector in PCI coordinates
J20002Pfix
Matrix3[-] 3x3 rotation matrix representing the rotation between PCPF and ECI frames
Returns
- Vector3
[m] Position vector in PCPF coordinates
PCPF2LLA(Vector3, double)
Converts from a planet-centered, planet-fixed coordinates to latitutde/longitude/altitude (LLA) coordinates given a planet radius.
public static GeodeticElements PCPF2LLA(Vector3 pcpfPosition, double planetRadius)
Parameters
pcpfPosition
Vector3[m] Position vector in PCPF coordinates
planetRadius
double[m] Planetary radius, assumed to be constant (i.e., spherical)
Returns
- GeodeticElements
Final position in latitude/longitude/altitude coordinates [0] : [rad] latitude above planetary equator [1] : [rad] longitude across planetary meridian [2] : [m] altitude above planet radius
PCPF2PCI(Vector3, Matrix3)
Converts from a planet-centered, planet-fixed to a planet-centered inertial position (i.e., J2000 ECI) position given a rotation matrix.
public static Vector3 PCPF2PCI(Vector3 pcpfPosition, Matrix3 J20002Pfix)
Parameters
pcpfPosition
Vector3[m] Position vector in planet centered, planet fixed coordinates
J20002Pfix
Matrix3[-] Rotation between inertial and pcf coordinates.
Returns
- Vector3
[m] Final position in the planet-centered inertial frame.
PCPF2SEZ(double, double)
Converts a Latitude and Longitude to South-Easth-Zenith (SEZ) position
public static Matrix3 PCPF2SEZ(double latitude, double longitude)
Parameters
Returns
- Matrix3
A SEZ matrix
WGS2LLA(Vector3)
Converts the WGS parameters to Lat Long Alt
public static GeodeticElements WGS2LLA(Vector3 position)
Parameters
position
Vector3The current PCI position
Returns
- GeodeticElements
The Geodetic Elements of the body