-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classLocation.ValueContainerpublic final classLocation.ValueContainerIntpublic classLocation.ValueContainerFloatpublic final classLocation.ValueContainerDoublepublic classLocation.Companion
-
Field Summary
-
Method Summary
Modifier and Type Method Description final LonggetId()Location unique ID. final UnitsetId(Long id)Location unique ID. final StringgetProvider()Provider for location source. final UnitsetProvider(String provider)Provider for location source. final LonggetTime()UTC time of this location (in ms). final UnitsetTime(Long time)UTC time of this location (in ms). final DoublegetLatitude()Latitude of location in WGS coordinates. final UnitsetLatitude(Double latitude)final DoublegetLongitude()Longitude of location in WGS coordinates. final UnitsetLongitude(Double longitude)final Location.ValueContainerDoublegetAltitude()Altitude value of the location (in m). final Location.ValueContainerFloatgetSpeed()Speed of the device in meters/second. final Location.ValueContainerFloatgetBearing()Direction of travel in degrees East of true North. final Location.ValueContainerFloatgetAccuracy()Accuracy of the fix. final Location.ValueContainerIntgetSensorCadence()Cadence value. final UnitsetSensorCadence(Location.ValueContainerInt sensorCadence)Cadence value. final Location.ValueContainerIntgetSensorHeartRate()Heart rate value in BMP. final UnitsetSensorHeartRate(Location.ValueContainerInt sensorHeartRate)Heart rate value in BMP. final Location.ValueContainerFloatgetSensorSpeed()Speed of the device over ground in meters/second. final UnitsetSensorSpeed(Location.ValueContainerFloat sensorSpeed)Speed of the device over ground in meters/second. final Location.ValueContainerFloatgetSensorPower()Power value of the fix in W. final UnitsetSensorPower(Location.ValueContainerFloat sensorPower)Power value of the fix in W. final Location.ValueContainerIntgetSensorStrides()The num of strides. final UnitsetSensorStrides(Location.ValueContainerInt sensorStrides)The num of strides. final Location.ValueContainerFloatgetSensorTemperature()Temperature value. final UnitsetSensorTemperature(Location.ValueContainerFloat sensorTemperature)Temperature value. final Location.ValueContainerIntgetGnssStatus()final Location.ValueContainerFloatgetGnssHdop()Horizontal dilution of precision for current location. final Location.ValueContainerFloatgetGnssVdop()Vertical dilution of precision for current location. final Location.ValueContainerFloatgetGnssPdop()Position (3D) dilution of precision for current location. final Location.ValueContainerIntgetGnssSatsUsed()Number of used satellites used to obtain current location. final Location.ValueContainerIntgetGnssSatsVisible()Number of used satellites used to obtain current location. final FloatgetSpeedOptimal()final StorablegetCopy()final ByteArraygetAsBytes()final Unitset(Location loc)Sets the contents of the location to the values from the given location. final BooleanhasSpeedOptimal()Check if any speed (GPS or from sensors) is stored. final UnitremoveSensorAll()Remove all attached sensors values. final UnitremoveGnssAll()Remove all values related to GNSS metadata. StringtoString()final FloatdistanceTo(Location dest)Returns the approximate distance in meters between this location and the given location. final FloatbearingTo(Location dest)Returns the approximate initial bearing in degrees East of true North when traveling along the shortest path between this location and the given location. final FloatArraydistanceAndBearingTo(Location dest)Compute bearing and distance values at once -
-
Method Detail
-
getProvider
final String getProvider()
Provider for location source.
-
setProvider
final Unit setProvider(String provider)
Provider for location source.
-
getLatitude
final Double getLatitude()
Latitude of location in WGS coordinates.
-
setLatitude
final Unit setLatitude(Double latitude)
-
getLongitude
final Double getLongitude()
Longitude of location in WGS coordinates.
-
setLongitude
final Unit setLongitude(Double longitude)
-
getAltitude
final Location.ValueContainerDouble getAltitude()
Altitude value of the location (in m). If 'hasData' is false, 0.0f is returned.
-
getSpeed
final Location.ValueContainerFloat getSpeed()
Speed of the device in meters/second.
-
getBearing
final Location.ValueContainerFloat getBearing()
Direction of travel in degrees East of true North. If 'hasData' is false, 0.0 is returned (in degree).
-
getAccuracy
final Location.ValueContainerFloat getAccuracy()
Accuracy of the fix. If 'hasData' is false, 0.0 is returned (in m).
-
getSensorCadence
final Location.ValueContainerInt getSensorCadence()
Cadence value. If hasCadence() is false, 0 is returned.
-
setSensorCadence
final Unit setSensorCadence(Location.ValueContainerInt sensorCadence)
Cadence value. If hasCadence() is false, 0 is returned.
-
getSensorHeartRate
final Location.ValueContainerInt getSensorHeartRate()
Heart rate value in BMP. If hasSensorHeartRate() is false, 0 is returned.
-
setSensorHeartRate
final Unit setSensorHeartRate(Location.ValueContainerInt sensorHeartRate)
Heart rate value in BMP. If hasSensorHeartRate() is false, 0 is returned.
-
getSensorSpeed
final Location.ValueContainerFloat getSensorSpeed()
Speed of the device over ground in meters/second. This speed is defined only when 'speed sensor' is connected and supply valid values.
If 'hasData' is 'false', 0.0f is returned (in m/s).
-
setSensorSpeed
final Unit setSensorSpeed(Location.ValueContainerFloat sensorSpeed)
Speed of the device over ground in meters/second. This speed is defined only when 'speed sensor' is connected and supply valid values.
If 'hasData' is 'false', 0.0f is returned (in m/s).
-
getSensorPower
final Location.ValueContainerFloat getSensorPower()
Power value of the fix in W. If hasSensorPower() is false, 0.0 is returned.
-
setSensorPower
final Unit setSensorPower(Location.ValueContainerFloat sensorPower)
Power value of the fix in W. If hasSensorPower() is false, 0.0 is returned.
-
getSensorStrides
final Location.ValueContainerInt getSensorStrides()
The num of strides. If hasSensorStrides() is false, 0 is returned.
-
setSensorStrides
final Unit setSensorStrides(Location.ValueContainerInt sensorStrides)
The num of strides. If hasSensorStrides() is false, 0 is returned.
-
getSensorTemperature
final Location.ValueContainerFloat getSensorTemperature()
Temperature value. If hasSensorTemperature() is false, 0.0f is returned.
-
setSensorTemperature
final Unit setSensorTemperature(Location.ValueContainerFloat sensorTemperature)
Temperature value. If hasSensorTemperature() is false, 0.0f is returned.
-
getGnssStatus
final Location.ValueContainerInt getGnssStatus()
-
getGnssHdop
final Location.ValueContainerFloat getGnssHdop()
Horizontal dilution of precision for current location.
More info: https://en.wikipedia.org/wiki/Dilution_of_precision_(navigation).
-
getGnssVdop
final Location.ValueContainerFloat getGnssVdop()
Vertical dilution of precision for current location.
More info: https://en.wikipedia.org/wiki/Dilution_of_precision_(navigation).
-
getGnssPdop
final Location.ValueContainerFloat getGnssPdop()
Position (3D) dilution of precision for current location.
More info: https://en.wikipedia.org/wiki/Dilution_of_precision_(navigation).
-
getGnssSatsUsed
final Location.ValueContainerInt getGnssSatsUsed()
Number of used satellites used to obtain current location.
-
getGnssSatsVisible
final Location.ValueContainerInt getGnssSatsVisible()
Number of used satellites used to obtain current location.
-
getSpeedOptimal
final Float getSpeedOptimal()
-
getAsBytes
final ByteArray getAsBytes()
-
set
final Unit set(Location loc)
Sets the contents of the location to the values from the given location.
-
hasSpeedOptimal
@Deprecated(message = Work with speed value directly) final Boolean hasSpeedOptimal()
Check if any speed (GPS or from sensors) is stored.
-
removeSensorAll
final Unit removeSensorAll()
Remove all attached sensors values.
-
removeGnssAll
final Unit removeGnssAll()
Remove all values related to GNSS metadata.
-
distanceTo
final Float distanceTo(Location dest)
Returns the approximate distance in meters between this location and the given location. Distance is defined using the WGS84 ellipsoid.
- Parameters:
dest- the destination location
-
bearingTo
final Float bearingTo(Location dest)
Returns the approximate initial bearing in degrees East of true North when traveling along the shortest path between this location and the given location. The shortest path is defined using the WGS84 ellipsoid. Locations that are (nearly) antipodal may produce meaningless results.
- Parameters:
dest- the destination location
-
distanceAndBearingTo
final FloatArray distanceAndBearingTo(Location dest)
Compute bearing and distance values at once
- Parameters:
dest- the destination location
-
-
-
-