Transformation from Cartesian to geographic coordinates

Hi Liam,

Using transform(GeodeticPoint point), you get a point in the ITRF frame associated to the OneAxisEllipsoid.

To get the EME2000 coordinates at some date, you need to do the following (which is what ORaaS does):

  1. Create the Earth model
OneAxisEllipsoid earth = new OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS,                                   Constants.WGS84_EARTH_FLATTENING,                                  FramesFactory.getITRF(IERSConventions.IERS_2010, false));
  1. Create the GeodeticPoint from latitude, longitude, altitude (beware lat and lon should be in radians, alt in meters)
GeodeticPoint point = new GeodeticPoint(lat, lon, alt);
  1. Create the TopocentricFrame for this point:
TopocentricFrame topoFrame = new TopocentricFrame(earth, point, "My Point");
  1. Apply the transform to get the position in EME2000:
Vector3D cartesianEme2000 = topoFrame.getPVCoordinates(date, FramesFactory.getEME2000()).getPosition();
double x = cartesianEme2000.getX();
double y = cartesianEme2000.getY();
double z = cartesianEme2000.getZ();

Best regards,
Pascal

1 Like