[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orekit Users] Spacecraft Latitude and Longitude



Are you trying to calculate the surface latitude/longitude of the spacecraft?  Based on your code samples I think that's what you are really trying to get to.  To do that you need to take into account the ellipsoid.  Your calculation is calculating geocentric latitude/longitude, which is more akin to spherical coordinates locked to the ECF frame.  To get the geodetic lat/lon you can do something like this:

Frame ecf = FramesFactory.getITRF(IERSConventions.IERS_2010,true);
OneAxisEllipsoid earth = new OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS, Constants.WGS84_EARTH_FLATTENING, ecf);
GeodeticPoint satLatLonAlt = earth.transform(pvCoordinates.getPosition(), FramesFactory.getEME2000(), date);

On Wed, Jun 27, 2018 at 6:08 AM, <javier.montemayor.mancias@emi.fraunhofer.de> wrote:
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