Class: NvectorEllipsoidal

latlon-nvector-ellipsoidal~NvectorEllipsoidal

An n-vector is a position representation using a (unit) vector normal to the Earth ellipsoid. Unlike latitude/longitude points, n-vectors have no singularities or discontinuities. For many applications, n-vectors are more convenient to work with than other position representations such as latitude/longitude, earth-centred earth-fixed (ECEF) vectors, UTM coordinates, etc.

Constructor

new NvectorEllipsoidal(x, y, z, hopt)

Creates a 3d n-vector normal to the Earth's surface.
Parameters:
Name Type Attributes Default Description
x number x component.
y number y component.
z number z component.
h number <optional>
0 height above ellipsoid surface in metres.
Source:

Extends

  • vector3d

Methods

toCartesian() → {Cartesian}

Converts ‘this’ n-vector to cartesian coordinate. qv Gade 2010 ‘A Non-singular Horizontal Position Representation’ eqn 22
Source:
Returns:
Cartesian coordinate equivalent to this n-vector.
Type
Cartesian
Example
var v = new Nvector(0.5000, 0.5000, 0.7071);
  var c = v.toCartesian(); // [3194434,3194434,4487327]
  var p = c.toLatLon();    // 45.0°N, 45.0°E

toLatLon() → {LatLon}

Converts ‘this’ n-vector to latitude/longitude point.
Source:
Returns:
Latitude/longitude point equivalent to this n-vector.
Type
LatLon
Example
var v = new Nvector(0.5000, 0.5000, 0.7071);
  var p = v.toLatLon(); // 45.0°N, 45.0°E

toString(dpopt) → {string}

Returns a string representation of ‘this’ n-vector.
Parameters:
Name Type Attributes Default Description
dp number <optional>
3 Number of decimal places to display.
Source:
Returns:
Comma-separated x, y, z, h values.
Type
string