Documentation
¶
Overview ¶
Package coordinates provides functions for coordinate transformations between geodetic, ECEF, ENU, and body frames, including ionospheric pierce point calculations.
Index ¶
- Constants
- func ComputeAzimuthElevation(receiverECEF, satelliteECEF Vector3D) (azimuthDeg, elevationDeg float64)
- func ComputeECEFToENUTransform(geoCoord GeodeticCoord) *mat.Dense
- func ComputeRACTransform(satPosition, satVelocity Vector3D) (*mat.Dense, error)
- func DegToRad(degrees float64) float64
- func DotProduct(a, b Vector3D) float64
- func Norm(a Vector3D) float64
- func RadToDeg(radians float64) float64
- type GeodeticCoord
- type Vector3D
- func Add(a, b Vector3D) Vector3D
- func ComputeIonoPiercePointECEF(receiverECEF, satelliteECEF Vector3D) (Vector3D, error)
- func CrossProduct(a, b Vector3D) Vector3D
- func ECEFToENU(geoCoord GeodeticCoord, ecefVec Vector3D) Vector3D
- func ENUToECEF(geoCoord GeodeticCoord, enuVec Vector3D) Vector3D
- func GeodeticToECEF(geoCoord GeodeticCoord) Vector3D
- func MultiplyVectorByScalar(a Vector3D, scalar float64) Vector3D
- func Subtract(a, b Vector3D) Vector3D
Constants ¶
const ( EarthEquatorialRadius = 6378137.0 // Earth's equatorial radius in meters EarthFlattening = 1.0 / 298.257223563 // Earth's flattening factor EarthEccentricitySquared = EarthFlattening * (2 - EarthFlattening) // Square of Earth's eccentricity )
Earth constants for the WGS84 ellipsoid
const ( IonosphereAltitude = 350000.0 // Ionospheric altitude above Earth's surface in meters IonosphereRadius = EarthEquatorialRadius + IonosphereAltitude // Ionospheric shell radius )
Constants for the ionospheric shell
Variables ¶
This section is empty.
Functions ¶
func ComputeAzimuthElevation ¶
func ComputeAzimuthElevation(receiverECEF, satelliteECEF Vector3D) (azimuthDeg, elevationDeg float64)
ComputeAzimuthElevation calculates the azimuth and elevation (in degrees) of a satellite from a receiver position. Inputs are receiver and satellite positions in ECEF coordinates.
func ComputeECEFToENUTransform ¶
func ComputeECEFToENUTransform(geoCoord GeodeticCoord) *mat.Dense
ComputeECEFToENUTransform computes the transformation matrix from ECEF to ENU coordinates at a given geodetic position.
func ComputeRACTransform ¶
ComputeRACTransform calculates the rotation matrix from ECEF to Radial-AlongTrack-CrossTrack (RAC) frame.
func DotProduct ¶
DotProduct computes the dot product of two Vector3 vectors.
Types ¶
type GeodeticCoord ¶
type GeodeticCoord struct {
Latitude float64 // in radians
Longitude float64 // in radians
Height float64 // in meters
}
GeodeticCoord represents geodetic coordinates with latitude and longitude in radians.
func ComputeIonoPiercePointGeodetic ¶
func ComputeIonoPiercePointGeodetic(receiverECEF, satelliteECEF Vector3D) (GeodeticCoord, error)
ComputeIonoPiercePointGeodetic calculates the Ionospheric Pierce Point (IPP) in geodetic coordinates given receiver and satellite positions in ECEF coordinates.
func ECEFToGeodetic ¶
func ECEFToGeodetic(ecef Vector3D) GeodeticCoord
ECEFToGeodetic converts ECEF coordinates to geodetic coordinates.
func (GeodeticCoord) MarshalJSON ¶
func (g GeodeticCoord) MarshalJSON() ([]byte, error)
MarshalJSON customizes the JSON encoding of GeodeticCoord to use degrees for latitude and longitude.
type Vector3D ¶
type Vector3D [3]float64
Vector3D represents a 3D vector.
func ComputeIonoPiercePointECEF ¶
ComputeIonoPiercePointECEF calculates the Ionospheric Pierce Point (IPP) in ECEF coordinates given receiver and satellite positions in ECEF coordinates.
func CrossProduct ¶
CrossProduct computes the cross product of two Vector3 vectors.
func ECEFToENU ¶
func ECEFToENU(geoCoord GeodeticCoord, ecefVec Vector3D) Vector3D
ECEFToENU converts an ECEF vector to ENU coordinates at a given geodetic position.
func ENUToECEF ¶
func ENUToECEF(geoCoord GeodeticCoord, enuVec Vector3D) Vector3D
ENUToECEF converts an ENU vector to ECEF coordinates at a given geodetic position.
func GeodeticToECEF ¶
func GeodeticToECEF(geoCoord GeodeticCoord) Vector3D
GeodeticToECEF converts geodetic coordinates to ECEF coordinates.
func MultiplyVectorByScalar ¶
MultiplyVectorByScalar multiplies a Vector3 by a scalar.