AdsumProjector
Methods
adsumDistanceToMeter
async adsumDistanceToMeter(adsumDistance: number): Promise<number, Error>
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
adsumDistance | number | Yes | - |
Returns:
Type: Promise<number, Error>
adsumLocationToGps
async adsumLocationToGps(position: AdsumLocation): Promise<{lat: number, long: number, alt: number}, Error>
Convert an AdsumLocation into a GPS position.
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
location | AdsumLocation | Yes | - |
Returns:
Type: Promise<{lat: number, long: number, alt: number}, Error>
adsumLocationToUtm
async adsumLocationToUtm(location: AdsumLocation: Promise<{E: number, N: number, alt: number}, Error>
Convert an AdsumLocation into an UTM position.
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
location | AdsumLocation | Yes | - |
Returns:
Type: Promise<{E: number, N: number, alt: number}, Error>
adsumToGps
async adsumToGps(position: {x: number, y: number, z: number}, ground: ?SiteObject|FloorObject = null): Promise<{lat: number, long: number, alt: number}, Error>
Convert an Adsum position into a GPS position.
- if ground is null, then argument position is assumed to be in adsum world coordinate
- if ground is SiteObject or FloorObject, then argument position is assumed to be relative to the provided ground
Returned utm position is absolute!
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
position | {x: number, y: number, z: number} | Yes | - | |
ground | ?SiteObject | FloorObject | No | null |
Returns:
Type: Promise<{lat: number, long: number, alt: number}, Error>
adsumToUtm
async adsumToUtm(position: {x: number, y: number, z: number}, ground: ?SiteObject|FloorObject = null): Promise<{E: number, N: number, alt: number}, Error>
Convert an Adsum position into an UTM position.
- if ground is null, then argument position is assumed to be in adsum world coordinate
- if ground is SiteObject or FloorObject, then argument position is assumed to be relative to the provided ground
Returned utm position is absolute!
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
position | {x: number, y: number, z: number} | Yes | - | |
ground | ?SiteObject | FloorObject | No | null |
Returns:
Type: Promise<{E: number, N: number, alt: number}, Error>
getAdsumNorthDirection
async getAdsumNorthDirection(): Promise<{x: number, y: number}, Error>
Get the North direction vector inside Adsum Coordinate system.
Returns:
Type: Promise<{x: number, y: number}, Error>
gpsToAdsum
async gpsToAdsum(gps: {lat: number, long: number, alt: number}, ground: ?SiteObject|FloorObject = null, altRelativeToGround: boolean = false): Promise<{x: number, y: number, z: number}, Error>
Converts a Gps position into a Adsum position.
- if ground is null
- then returned position will be in adsum world coordinate
- else if ground is SiteObject or FloorObject
- if altRelativeToGround
- then the returned position will be relative to the provided ground assuming given altitude is relative to ground (alt=0 is equivalent to floor altitude)
- else
- then the returned position will be relative to the provided ground assuming given altitude absolute
- if altRelativeToGround
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
gps | {lat: number, long: number, alt: number} | Yes | - | |
ground | ?SiteObject | FloorObject | No | null | |
altRelativeToGround | boolean | No | false |
Returns:
Type: Promise<{x: number, y: number, z: number}, Error>
gpsToUtm
async gpsToUtm(gps: {lat: number, long: number, alt: number}): Promise<{E: number, N: number, alt: number}, Error>
Convert a Gps position into an UTM position.
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
gps | {lat: number, long: number, alt: number} | Yes | - |
Returns:
Type: Promise<{E: number, N: number, alt: number}, Error>
meterToAdsumDistance
async meterToAdsumDistance(meter: number): Promise<number, Error>
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
meter | number | Yes | - |
Returns:
Type: Promise<number, Error>
utmToAdsum
async utmToAdsum(utm: {E: number, N: number, alt: number}, ground: ?SiteObject|FloorObject = null, altRelativeToGround: boolean = false): Promise<{x: number, y: number, z: number}, Error>
Converts a UTM position into a Adsum position.
- if ground is null
- then returned position will be in adsum world coordinate
- else if ground is SiteObject or FloorObject
- if altRelativeToGround
- then the returned position will be relative to the provided ground assuming given altitude is relative to ground (alt=0 is equivalent to floor altitude)
- else
- then the returned position will be relative to the provided ground assuming given altitude absolute
- if altRelativeToGround
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
utm | {E: number, N: number, alt: number} | Yes | - | |
ground | ?SiteObject | FloorObject | No | null | |
altRelativeToGround | boolean | No | false |
Returns:
Type: Promise<{x: number, y: number, z: number}, Error>
utmToGps
async utmToGps(utm: {E: number, N: number, alt: number}): Promise<{lat: number, long: number, alt: number}, Error>
Convert an UTM position into a GPS position.
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
utm | {E: number, N: number, alt: number} | Yes | - |
Returns:
Type: Promise<{lat: number, long: number, alt: number}, Error>