[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AW: [Orekit Users] Spacecraft Latitude and Longitude
Problem solved.
I used a GTOD frame to get the PVCoordinates, got the position and calculated the angles with Vector3D.angle(...).
The SpacecraftState is s:
Frame earthFixed = FramesFactory.getGTOD(IERSConventions.IERS_2010, true);
Vector3D pos = s.getPVCoordinates(earthFixed).getPosition();
latitude = 90.0 - Math.toDegrees(Vector3D.angle(pos, Vector3D.PLUS_K));
longitude = Math.toDegrees(Vector3D.angle(new Vector3D(pos.getX(),pos.getY(),0.0),Vector3D.PLUS_I));
if (pos.getY() < 0.0)
longitude = - longitude;
altitude = Math.sqrt(Vector3D.dotProduct(pos,pos));
-----Ursprüngliche Nachricht-----
Von: orekit-users-request@orekit.org [mailto:orekit-users-request@orekit.org] Im Auftrag von javier.montemayor.mancias@emi.fraunhofer.de
Gesendet: Mittwoch, 27. Juni 2018 12:08
An: orekit-users@orekit.org
Betreff: [Orekit Users] Spacecraft Latitude and Longitude
Hey guys,
Does anyone know how to get the true latitude and longitude of a SpacecraftState?
The documentation page for SpacecraftState says that the method getLv() returns the true latitude but there's no method for the longitude. However, the Orbit documentation has the same method but it says that it returns the true longitude and there's no method for the latitude. Both return the same value, I assume the documentation for getLv() in SpacecraftState is wrong.
CircularOrbit does have two separate methods getLv() and getAlphaV(), for longitude and latitude, respectively. Would it be then okay to parse the orbit from getOrbit() into a CircularOrbit even when it might not be so?
Best regards,
Javier