@arvaintelligence/compass
v1.0.4
Published
Read from device sensors to extract true north azimuth
Downloads
4
Readme
@arvaintelligence/compass
Read from device sensors to extract true north azimuth
Install
npm install @arvaintelligence/compass
npx cap sync
API
streamCompassHeading(...)
streamCompassHeading(options: StreamCompassOptions, callback: StreamCompassCallback) => Promise<void>
| Param | Type |
| -------------- | ----------------------------------------------------------------------- |
| options
| StreamCompassOptions |
| callback
| StreamCompassCallback |
stopCompassStream()
stopCompassStream() => Promise<BaseResponse>
Returns: Promise<BaseResponse>
readCompassHeading()
readCompassHeading() => Promise<AzimuthResponse>
Returns: Promise<AzimuthResponse>
Interfaces
StreamCompassOptions
| Prop | Type |
| -------------- | ------------------- |
| interval
| number |
AzimuthResponse
| Prop | Type |
| ---------------------- | ------------------- |
| trueNorthAzimuth
| number |
BaseResponse
| Prop | Type |
| --------- | -------------------- |
| ok
| boolean |
| msg
| string |
Type Aliases
StreamCompassCallback
(success: AzimuthResponse, error?: any): void