Class: MagVar
Defined in: src/sdk/geo/MagVar.ts:9
A utility class for working with magnetic variation (magnetic declination).
Constructors
Constructor
new MagVar():
MagVar
Returns
MagVar
Methods
get()
Call Signature
static
get(lat
,lon
):number
Defined in: src/sdk/geo/MagVar.ts:17
Gets the magnetic variation (magnetic declination) at a specific point on Earth. Positive values signify eastward deflection, and negative values signify westward deflection.
Parameters
Parameter | Type | Description |
---|---|---|
lat | number | The latitude of the query point. |
lon | number | The longitude of the query point. |
Returns
number
The magnetic variation (magnetic declination) at the point.
Call Signature
static
get(point
):number
Defined in: src/sdk/geo/MagVar.ts:24
Gets the magnetic variation (magnetic declination) at a specific point on Earth. Positive values signify eastward deflection, and negative values signify westward deflection.
Parameters
Parameter | Type | Description |
---|---|---|
point | LatLonInterface | The query point. |
Returns
number
The magnetic variation (magnetic declination) at the point.
magneticToTrue()
Call Signature
static
magneticToTrue(bearing
,lat
,lon
):number
Defined in: src/sdk/geo/MagVar.ts:37
Converts magnetic bearing to true bearing at a specific point on Earth.
Parameters
Parameter | Type | Description |
---|---|---|
bearing | number | A magnetic bearing. |
lat | number | The latitude of the query point. |
lon | number | The longitude of the query point. |
Returns
number
The true bearing equivalent of the given magnetic bearing at the specified point.
Call Signature
static
magneticToTrue(bearing
,point
):number
Defined in: src/sdk/geo/MagVar.ts:44
Converts magnetic bearing to true bearing at a specific point on Earth.
Parameters
Parameter | Type | Description |
---|---|---|
bearing | number | A magnetic bearing. |
point | LatLonInterface | The query point. |
Returns
number
The true bearing equivalent of the given magnetic bearing at the specified point.
Call Signature
static
magneticToTrue(bearing
,magVar
):number
Defined in: src/sdk/geo/MagVar.ts:51
Converts magnetic bearing to true bearing given a specific magnetic variation (magnetic declination).
Parameters
Parameter | Type | Description |
---|---|---|
bearing | number | A magnetic bearing. |
magVar | number | The magnetic variation. |
Returns
number
The true bearing equivalent of the given magnetic bearing.
trueToMagnetic()
Call Signature
static
trueToMagnetic(bearing
,lat
,lon
):number
Defined in: src/sdk/geo/MagVar.ts:64
Converts true bearing to magnetic bearing at a specific point on Earth.
Parameters
Parameter | Type | Description |
---|---|---|
bearing | number | A true bearing. |
lat | number | The latitude of the query point. |
lon | number | The longitude of the query point. |
Returns
number
The magnetic bearing equivalent of the given true bearing at the specified point.
Call Signature
static
trueToMagnetic(bearing
,point
):number
Defined in: src/sdk/geo/MagVar.ts:71
Converts true bearing to magnetic bearing at a specific point on Earth.
Parameters
Parameter | Type | Description |
---|---|---|
bearing | number | A true bearing. |
point | LatLonInterface | The query point. |
Returns
number
The magnetic bearing equivalent of the given true bearing at the specified point.
Call Signature
static
trueToMagnetic(bearing
,magVar
):number
Defined in: src/sdk/geo/MagVar.ts:78
Converts true bearing to magnetic bearing given a specific magnetic variation (magnetic declination).
Parameters
Parameter | Type | Description |
---|---|---|
bearing | number | A true bearing. |
magVar | number | The magnetic variation. |
Returns
number
The magnetic bearing equivalent of the given true bearing.