Definitions
Trip locations
import { TransportMode } from "../types";
export type TripLocation = {
/**
* The latitude in degrees.
*/
latitude: number;
/**
* The longitude in degrees.
*/
longitude: number;
/**
* The timestamp in milliseconds since January 1, 1970, 00:00:00 UTC.
*/
timestamp: number;
/**
* The location's horizontal accuracy in meters.<br/>
* If this location does not have accuracy, then this value will be `null`.
*/
horizontalAccuracy: number | null;
/**
* Returns the altitude of this location in meters above the WGS84 reference ellipsoid.<br/>
* If this location does not have an altitude available, then this value will be `null`.
*/
altitude: number | null;
/**
* Returns the speed at the time of this location, in meters per second.<br/>
* If this location does not have a speed, then this value will be `null`.
*/
speed: number | null;
/**
* Returns the bearing at the time of this location in degrees.<br/>
* Bearing is the horizontal direction of travel of this device and is unrelated to the device orientation.
* The bearing is guaranteed to be in the range `[0, 360)`.
*
* If this location does not have a bearing, then this value will be `null`.
*/
bearing: number | null;
/**
* Returns the estimated bearing accuracy in degrees of this location at the 68th percentile confidence level.
* This means that there is 68% chance that the true bearing at the time of this location falls within {@link bearing} +/- this uncertainty.
*
* If this location does not have a bearing accuracy, then this value will be `null`.
*/
bearingAccuracy: number | null;
/**
* Returns the estimated speed accuracy in meters per second of this location at the 68th percentile confidence level.
* This means that there is 68% chance that the true speed at the time of this location falls within {@link speed} +/- this uncertainty.
*
* If this location does not have a speed accuracy, then this value will be `null`.
*/
speedAccuracy: number | null;
/**
* Returns the estimated altitude accuracy in meters of this location at the 68th percentile confidence level.
* This means that there is 68% chance that the true altitude of this location falls within {@link altitude} +/- this uncertainty.
*
* If this location does not have a vertical accuracy, then this value will be `null`.
*/
verticalAccuracy: number | null;
/**
* The most probable transport mode at the time of this location.
*/
transportMode: TransportMode;
};
/**
* The result of attempting to start receiving trip location updates via
* {@link SentianceEventTimeline.startReceivingTripLocationUpdates}.
*
* @remarks
* - `SUCCESS`: Successfully started delivering updates.
* - `NO_USER`: No Sentiance user on the device.
* - `INVALID_INTERVAL`: The provided interval is less than 1 second.
* - `FEATURE_IS_NOT_AVAILABLE`: This feature is not available.
*/
export type TripLocationUpdatesStartResult = "SUCCESS" | "NO_USER" | "INVALID_INTERVAL" | "FEATURE_IS_NOT_AVAILABLE";
Last updated