Class: MagVar
A utility class for working with magnetic variation (magnetic declination).
Constructors
constructor
• new MagVar(): MagVar
Returns
Methods
get
▸ get(lat
, lon
): number
Gets the magnetic variation (magnetic declination) at a specific point on Earth. Positive values signify eastward deflection, and negative values signify westward deflection.
Parameters
Name | 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.
Defined in
src/sdk/geo/MagVar.ts:17
▸ get(point
): number
Gets the magnetic variation (magnetic declination) at a specific point on Earth. Positive values signify eastward deflection, and negative values signify westward deflection.
Parameters
Name | Type | Description |
---|---|---|
point | LatLonInterface | The query point. |
Returns
number
The magnetic variation (magnetic declination) at the point.
Defined in
src/sdk/geo/MagVar.ts:24
magneticToTrue
▸ magneticToTrue(bearing
, lat
, lon
): number
Converts magnetic bearing to true bearing at a specific point on Earth.
Parameters
Name | 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.
Defined in
src/sdk/geo/MagVar.ts:37
▸ magneticToTrue(bearing
, point
): number
Converts magnetic bearing to true bearing at a specific point on Earth.
Parameters
Name | 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.
Defined in
src/sdk/geo/MagVar.ts:44
▸ magneticToTrue(bearing
, magVar
): number
Converts magnetic bearing to true bearing given a specific magnetic variation (magnetic declination).
Parameters
Name | Type | Description |
---|---|---|
bearing | number | A magnetic bearing. |
magVar | number | The magnetic variation. |
Returns
number
The true bearing equivalent of the given magnetic bearing.
Defined in
src/sdk/geo/MagVar.ts:51
trueToMagnetic
▸ trueToMagnetic(bearing
, lat
, lon
): number
Converts true bearing to magnetic bearing at a specific point on Earth.
Parameters
Name | 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.
Defined in
src/sdk/geo/MagVar.ts:64
▸ trueToMagnetic(bearing
, point
): number
Converts true bearing to magnetic bearing at a specific point on Earth.
Parameters
Name | 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.
Defined in
src/sdk/geo/MagVar.ts:71
▸ trueToMagnetic(bearing
, magVar
): number
Converts true bearing to magnetic bearing given a specific magnetic variation (magnetic declination).
Parameters
Name | Type | Description |
---|---|---|
bearing | number | A true bearing. |
magVar | number | The magnetic variation. |
Returns
number
The magnetic bearing equivalent of the given true bearing.
Defined in
src/sdk/geo/MagVar.ts:78