-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
https://github.com/joshuaferrara/go-satellite/blob/master/conversions.go
There is a possible error in the LLAToECI function.
The correct calculation would be:
// Convert latitude, longitude and altitude(km) into equivalent Earth Centered Intertial coordinates(km)
// Reference: The 1992 Astronomical Almanac, page K11.
func LLAToECI(obsCoords LatLong, alt, jday float64) (eciObs Vector3) {
re := 6378.137
theta := math.Mod(ThetaG_JD(jday)+obsCoords.Longitude, TWOPI)
r := re * math.Cos(obsCoords.Latitude)
eciObs.X = r * math.Cos(theta)
eciObs.Y = r * math.Sin(theta)
eciObs.Z = (re + alt) * math.Sin(obsCoords.Latitude)
return
}
I hope I've helped.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels