@ProviderType
public interface PositionService
Position(Measurement lat, Measurement lon, Measurement alt, Measurement speed, Measurement track)
The interface also return a NmeaPosition, subclass of Position
NmeaPosition,
Position,
Measurement| Modifier and Type | Method and Description |
|---|---|
java.time.LocalDateTime |
getDateTime()
Returns the current date from
PositionServiceProvider. |
java.lang.String |
getLastSentence()
Deprecated.
since version 2.3
Returns the last sentence received from the gps.
|
java.lang.String |
getNmeaDate()
Deprecated.
Since 2.3 use
getDateTime(). Access to underlying gps data layer is discouraged. |
NmeaPosition |
getNmeaPosition()
Deprecated.
Since 2.3 use
getPosition(). Access to underlying gps data layer is discouraged. |
java.lang.String |
getNmeaTime()
Deprecated.
Since 2.3 use
getDateTime(). Access to underlying gps data layer is discouraged. |
org.osgi.util.position.Position |
getPosition()
Returns the current geographic position.
The org.osgi.util.measurement.Measurement class is used to represent the values that make up a position: getLongitude() : returns the longitude of this position in radians. |
boolean |
isLocked()
Returns true if a valid geographic position has been received.
|
void |
registerListener(java.lang.String listenerId,
PositionListener positionListener)
Registers position listener
|
void |
unregisterListener(java.lang.String listenerId)
Unregisters position listener
|
org.osgi.util.position.Position getPosition()
Position@Deprecated NmeaPosition getNmeaPosition()
getPosition(). Access to underlying gps data layer is discouraged.NmeaPosition@Deprecated java.lang.String getNmeaTime()
getDateTime(). Access to underlying gps data layer is discouraged.UnsupportedOperetaionException - PositionServiceProvider could not support this method.@Deprecated java.lang.String getNmeaDate()
getDateTime(). Access to underlying gps data layer is discouraged.UnsupportedOperetaionException - PositionServiceProvider could not support this method.java.time.LocalDateTime getDateTime()
PositionServiceProvider. Returned DateTime is in UTC TimeZone.boolean isLocked()
@Deprecated java.lang.String getLastSentence()
void registerListener(java.lang.String listenerId,
PositionListener positionListener)
listenerId - - listener ID as StringpositionListener - - position listener as PositionListenervoid unregisterListener(java.lang.String listenerId)
listenerId - - listener ID as String