Radii of Curvature, Position and Velocity Estimators

This documentation was generated with the assistance of AI. Please report any inaccuracies.

Classes: RadiiOfCurvatureEstimator, NEDPositionEstimator, NEDVelocityEstimator (see the Class Reference table at the end of this page for Javadoc and source links).

The WGS84 ellipsoid and curvilinear position

Position on the Earth’s surface (or above/below it) can be described either as a Cartesian ECEF vector or, more usefully for navigation output, as curvilinear position: geodetic latitude , longitude , and height above the WGS84 reference ellipsoid.

Geodetic height and latitude of a body above the ellipsoid

The ellipsoid is described by the equatorial radius , the polar radius , the flattening and the eccentricity . Three frames take part in the conversions of this page, and the diagram shows how they relate:

flowchart LR ECEF["ECEF (x, y, z)\nCartesian, fixed to the Earth"] <-->|"L, lambda, h\n(ellipsoid geometry)"| CURV["Curvilinear\n(L, lambda, h)"] CURV -->|"rates: v_N, v_E, v_D\nand radii R_N, R_E"| NED["NED velocity\n(north, east, down)\nlocal tangent frame at (L, lambda, h)"] NED -->|"C_n^e from L and lambda"| ECEF

ECEF and curvilinear conversion

With the transverse radius defined in the next section, the Cartesian position of a point at curvilinear position is (Groves chapter 2, geodetic-to-Cartesian conversion):

The inverse (Cartesian to geodetic) has no closed form in terms of elementary functions for the exact ellipsoid and is solved iteratively; longitude is simply . The local NED axes at that point are related to ECEF by the rotation , which depends only on and :

These conversions are not performed by the three estimators of this page; they are used around them, by the frame and converter classes that turn an ECEF state into the NED state the estimators consume.

RadiiOfCurvatureEstimator

Latitude and longitude do not change at a uniform linear rate per meter travelled, because the WGS84 ellipsoid is not a sphere: it is flattened at the poles. The meridian radius of curvature, , governs north-south motion; the transverse radius of curvature, , governs east-west motion. Both are smallest at the equator and largest at the poles:

where is the WGS84 equatorial radius and is the WGS84 eccentricity (equations 2.105 and 2.106 in the implementation). See [book-groves], chapter 2.

Intuitively, is the radius of the circle that best fits the meridian ellipse at latitude , and is the distance from the surface point to the rotation axis measured along the ellipsoid normal. On a sphere ( ) both collapse to .

double latitude = Math.toRadians(41.3851);

RadiiOfCurvature radii = RadiiOfCurvatureEstimator.estimateRadiiOfCurvatureAndReturnNew(latitude);

double meridianRadius = radii.getRn();   // R_N(L), meters
double transverseRadius = radii.getRe(); // R_E(L), meters
Geocentric vs. geodetic latitude on the WGS84 ellipsoid

Both NEDPositionEstimator and NEDVelocityEstimator use these radii to convert between the NED velocity and the rate of change of curvilinear position. A north displacement subtends an angle at the centre of curvature; an east displacement travels on a parallel of radius , and down velocity is minus the height rate:

NEDPositionEstimator

Integrates curvilinear position forward over one time step from the old and new NED velocity, using the trapezoidal (average of old/new rate) integration of the position-rate equations above (equation 5.56 in the code comments). In Groves §5.4 this is the position-update step of the NED navigation equations:

Height, then latitude, then longitude must be updated in that order, since each subsequent equation depends on the previous result. The latitude update uses the meridian radius at the old latitude together with the new height, while the new-velocity term of the longitude update uses the transverse radius re-evaluated at the newly updated latitude.

double timeInterval = 1.0; // seconds
double oldLatitude = Math.toRadians(41.3851);
double oldLongitude = Math.toRadians(2.1734);
double oldHeight = 0.0;
double oldVn = 1.0, oldVe = 0.0, oldVd = 0.0; // previous NED velocity (m/s)
double vn = 1.0, ve = 0.0, vd = 0.0;          // current NED velocity (m/s)

NEDPosition newPosition = NEDPositionEstimator.estimatePositionAndReturnNew(
        timeInterval, oldLatitude, oldLongitude, oldHeight, oldVn, oldVe, oldVd, vn, ve, vd);

double newLatitude = newPosition.getLatitude();
double newHeight = newPosition.getHeight();

NEDVelocityEstimator

The inverse operation: given curvilinear position at two epochs, estimate the average NED velocity between them by finite-differencing latitude/longitude/height and then inverting the same trapezoidal relation used above (equation 5.56 solved for the new velocity: the average rate is , so ):

This is mainly useful for turning a sequence of positions (e.g., from a reference trajectory or a GNSS log) into the velocity time series needed as input to kinematics estimators or a navigator initialization step.

double timeInterval = 1.0; // seconds
double oldLatitude = Math.toRadians(41.3851);
double oldLongitude = Math.toRadians(2.1734);
double oldHeight = 0.0;
double oldVn = 1.0, oldVe = 0.0, oldVd = 0.0; // previous NED velocity (m/s)

// current position, e.g. the next GNSS fix in a log
double latitude = Math.toRadians(41.38511);
double longitude = oldLongitude;
double height = 0.0;

NEDVelocity velocity = NEDVelocityEstimator.estimateVelocityAndReturnNew(
        timeInterval, oldLatitude, oldLongitude, oldHeight, oldVn, oldVe, oldVd,
        latitude, longitude, height);

double vn = velocity.getVn();

Class Reference

Javadoc and source links for the classes used in the examples above:

Class Javadoc Source

RadiiOfCurvatureEstimator

Javadoc

Source

RadiiOfCurvature

Javadoc

Source

NEDPositionEstimator

Javadoc

Source

NEDVelocityEstimator

Javadoc

Source

Where to go next