We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 }
// 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.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
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.
The text was updated successfully, but these errors were encountered: