Class: LatLon_NvectorEllipsoidal

latlon-nvector-ellipsoidal~LatLon_NvectorEllipsoidal()

Latitude/longitude points on an ellipsoidal model earth augmented with methods for calculating delta vectors between points, and converting to n-vectors.

Constructor

new LatLon_NvectorEllipsoidal()

Source:

Extends

  • LatLonEllipsoidal

Methods

deltaTo(point) → {Ned}

Calculates delta from ‘this’ point to supplied point. The delta is given as a north-east-down NED vector. Note that this is a linear delta, unrelated to a geodesic on the ellipsoid. Points need not be defined on the same datum.
Parameters:
Name Type Description
point LatLon Point delta is to be determined to.
Source:
Throws:
Invalid point.
Type
TypeError
Returns:
Delta from ‘this’ point to supplied point in local tangent plane of this point.
Type
Ned
Example
const a = new LatLon(49.66618, 3.45063, 99);
  const b = new LatLon(48.88667, 2.37472, 64);
  const delta = a.deltaTo(b);   // [N:-86127,E:-78901,D:1104]
  const dist = delta.length;    // 116809.178 m
  const brng = delta.bearing;   // 222.493°
  const elev = delta.elevation; //  -0.5416°

destinationPoint(delta) → {LatLon}

Calculates destination point using supplied delta from ‘this’ point. The delta is given as a north-east-down NED vector. Note that this is a linear delta, unrelated to a geodesic on the ellipsoid.
Parameters:
Name Type Description
delta Ned Delta from ‘this’ point to supplied point in local tangent plane of this point.
Source:
Returns:
Destination point.
Type
LatLon
Example
const a = new LatLon(49.66618, 3.45063, 99);
  const delta = Ned.fromDistanceBearingElevation(116809.178, 222.493, -0.5416); // [N:-86127,E:-78901,D:1104]
  const b = a.destinationPoint(delta);                                          // 48.8867°N, 002.3747°E

toCartesian() → {Cartesian}

Converts ‘this’ point from (geodetic) latitude/longitude coordinates to (geocentric) cartesian (x/y/z) coordinates.
Source:
Returns:
Cartesian point equivalent to lat/lon point, with x, y, z in metres from earth centre.
Type
Cartesian

toNvector() → {Nvector}

Converts ‘this’ lat/lon point to n-vector (normal to the earth's surface).
Source:
Returns:
N-vector representing lat/lon point.
Type
Nvector
Example
const p = new LatLon(45, 45);
  const n = p.toNvector(); // [0.5000,0.5000,0.7071]