Constructor
new NvectorSpherical(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
toLatLon() → {LatLon}
Converts ‘this’ n-vector to latitude/longitude point.
- Source:
Returns:
Latitude/longitude point vector points to.
- 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