Skip to main content

Class: BasicNavAngleUnit

Defined in: src/sdk/geo/NavAngle.ts:44

A basic implementation of a navigation angle unit.

Extends

Implements

Constructors

Constructor

new BasicNavAngleUnit(referenceNorth, magVar): BasicNavAngleUnit

Defined in: src/sdk/geo/NavAngle.ts:59

Constructor.

Parameters

ParameterTypeDescription
referenceNorthNavAngleUnitReferenceNorthThe reference north of the new unit.
magVarnumberThe initial magnetic variation of the new unit.

Returns

BasicNavAngleUnit

Overrides

AbstractUnit.constructor

Properties

family

readonly family: "navangle" = 'navangle'

Defined in: src/sdk/geo/NavAngle.ts:46

This unit's family.

Implementation of

NavAngleUnit.family

Overrides

AbstractUnit.family


name

readonly name: string

Defined in: src/sdk/math/NumberUnit.ts:757

The name of this unit.

Implementation of

NavAngleUnit.name

Inherited from

AbstractUnit.name

Accessors

magVar

Get Signature

get magVar(): number

Defined in: src/sdk/geo/NavAngle.ts:50

This unit's magnetic variation, in degrees.

Returns

number

This unit's magnetic variation, in degrees.

Implementation of

NavAngleUnit.magVar

Methods

canConvert()

canConvert(otherUnit): boolean

Defined in: src/sdk/math/NumberUnit.ts:761

Checks whether conversions between this unit and another unit are possible.

Parameters

ParameterTypeDescription
otherUnitUnit<string>The other unit.

Returns

boolean

Whether conversions between this unit and another unit are possible.

Implementation of

NavAngleUnit.canConvert

Inherited from

AbstractUnit.canConvert


convertFrom()

convertFrom(value, fromUnit): number

Defined in: src/sdk/geo/NavAngle.ts:103

Converts a value of another unit to this unit. This unit's magnetic variation is used for the conversion.

Parameters

ParameterTypeDescription
valuenumberThe value to convert.
fromUnitUnit<"navangle">The unit from which to convert.

Returns

number

The converted value.

Throws

Error if attempting an invalid conversion.

Implementation of

NavAngleUnit.convertFrom

Overrides

AbstractUnit.convertFrom


convertTo()

convertTo(value, toUnit): number

Defined in: src/sdk/geo/NavAngle.ts:80

Converts a value of this unit to another unit. This unit's magnetic variation is used for the conversion.

Parameters

ParameterTypeDescription
valuenumberThe value to convert.
toUnitUnit<"navangle">The unit to which to convert.

Returns

number

The converted value.

Throws

Error if attempting an invalid conversion.

Implementation of

NavAngleUnit.convertTo

Overrides

AbstractUnit.convertTo


createNumber()

createNumber(value): NumberUnit<"navangle", BasicNavAngleUnit>

Defined in: src/sdk/math/NumberUnit.ts:772

Creates a NumberUnit with a specified initial value of this unit type.

Parameters

ParameterTypeDescription
valuenumberThe numeric value of the new NumberUnit.

Returns

NumberUnit<"navangle", BasicNavAngleUnit>

A NumberUnit of this unit type.

Implementation of

NavAngleUnit.createNumber

Inherited from

AbstractUnit.createNumber


equals()

equals(other): boolean

Defined in: src/sdk/geo/NavAngle.ts:148

Checks whether this unit is equal to another unit. Returns true if and only if the other unit belongs to the same family and has the same name as this unit.

Parameters

ParameterTypeDescription
otherUnit<string>The other unit to which to compare.

Returns

boolean

Whether this unit is equal to the comparison.

Implementation of

NavAngleUnit.equals

Overrides

AbstractUnit.equals


isMagnetic()

isMagnetic(): boolean

Defined in: src/sdk/geo/NavAngle.ts:69

Checks whether this nav angle unit is relative to magnetic north.

Returns

boolean

Whether this nav angle unit is relative to magnetic north.

Implementation of

NavAngleUnit.isMagnetic


setMagVar()

setMagVar(magVar): void

Defined in: src/sdk/geo/NavAngle.ts:123

Sets this unit's magnetic variation.

Parameters

ParameterTypeDescription
magVarnumberThe magnetic variation to set, in degrees.

Returns

void


setMagVarFromLocation()

Call Signature

setMagVarFromLocation(location): void

Defined in: src/sdk/geo/NavAngle.ts:131

Sets this unit's magnetic variation from a geographic location.

Parameters
ParameterTypeDescription
locationLatLonInterfaceThe location defining the new magnetic variation.
Returns

void

Call Signature

setMagVarFromLocation(lat, lon): void

Defined in: src/sdk/geo/NavAngle.ts:137

Sets this unit's magnetic variation from a geographic location.

Parameters
ParameterTypeDescription
latnumberThe latitude, in degrees, of the location defining the new magnetic variation.
lonnumberThe longitude, in degrees, of the location defining the new magnetic variation.
Returns

void


create()

Call Signature

static create(isMagnetic, magVar?): BasicNavAngleUnit

Defined in: src/sdk/geo/NavAngle.ts:158

Creates an instance of BasicNavAngleUnit.

Parameters
ParameterTypeDescription
isMagneticbooleanWhether the new unit is relative to magnetic north.
magVar?numberThe initial magnetic variation of the new unit, in degrees. Defaults to 0 degrees.
Returns

BasicNavAngleUnit

An instance of BasicNavAngleUnit.

Call Signature

static create(isMagnetic, location): BasicNavAngleUnit

Defined in: src/sdk/geo/NavAngle.ts:165

Creates an instance of BasicNavAngleUnit.

Parameters
ParameterTypeDescription
isMagneticbooleanWhether the new unit is relative to magnetic north.
locationLatLonInterfaceThe initial location of the new unit.
Returns

BasicNavAngleUnit

An instance of BasicNavAngleUnit.

Call Signature

static create(isMagnetic, lat, lon): BasicNavAngleUnit

Defined in: src/sdk/geo/NavAngle.ts:173

Creates an instance of BasicNavAngleUnit.

Parameters
ParameterTypeDescription
isMagneticbooleanWhether the new unit is relative to magnetic north.
latnumberThe initial latitude of the new unit, in degrees.
lonnumberThe initial longitude of the new unit, in degrees.
Returns

BasicNavAngleUnit

An instance of BasicNavAngleUnit.