com.eurotech.framework.emulator.position
Class PositionServiceImpl

java.lang.Object
  extended by com.eurotech.framework.emulator.position.PositionServiceImpl
All Implemented Interfaces:
PositionService

public class PositionServiceImpl
extends Object
implements PositionService


Constructor Summary
PositionServiceImpl()
           
 
Method Summary
protected  void activate(org.osgi.service.component.ComponentContext componentContext)
           
protected  void deactivate(org.osgi.service.component.ComponentContext componentContext)
           
 String getLastSentence()
          Returns the last sentence received from the gps.
 String getNmeaDate()
          Returns the current NMEA date from ZDA sentence
 NmeaPosition getNmeaPosition()
          Returns the current NMEA geographic position.
 String getNmeaTime()
          Returns the current NMEA time from GGA or ZDA sentence
 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. getLatitude() : returns the latitude of this position in radians.
 boolean isLocked()
          Returns true if a valid geographic position has been received.
 void setEventAdmin(org.osgi.service.event.EventAdmin eventAdmin)
           
 void start()
           
 void stop()
           
 void unsetEventAdmin(org.osgi.service.event.EventAdmin eventAdmin)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PositionServiceImpl

public PositionServiceImpl()
Method Detail

setEventAdmin

public void setEventAdmin(org.osgi.service.event.EventAdmin eventAdmin)

unsetEventAdmin

public void unsetEventAdmin(org.osgi.service.event.EventAdmin eventAdmin)

activate

protected void activate(org.osgi.service.component.ComponentContext componentContext)

deactivate

protected void deactivate(org.osgi.service.component.ComponentContext componentContext)

getPosition

public org.osgi.util.position.Position getPosition()
Description copied from interface: PositionService
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.
  • getLatitude() : returns the latitude of this position in radians.
  • getSpeed() : returns the ground speed of this position in meters per second.
  • getTrack() : Returns the track of this position in radians as a compass heading. The track is the extrapolation of previous previously measured positions to a future position.

  • Specified by:
    getPosition in interface PositionService
    See Also:
    Position

    getNmeaPosition

    public NmeaPosition getNmeaPosition()
    Description copied from interface: PositionService
    Returns the current NMEA geographic position.
  • getLongitude() : returns the longitude of this position in degrees.
  • getLatitude() : returns the latitude of this position in degrees.
  • getSpeedKmh() : returns the ground speed of this position in km/h.
  • getSpeedMph() : returns the ground speed of this position in mph.
  • getTrack() : Returns the track of this position in degrees as a compass heading.

    Specified by:
    getNmeaPosition in interface PositionService
    See Also:
    NmeaPosition

  • getNmeaTime

    public String getNmeaTime()
    Description copied from interface: PositionService
    Returns the current NMEA time from GGA or ZDA sentence

    Specified by:
    getNmeaTime in interface PositionService

    getNmeaDate

    public String getNmeaDate()
    Description copied from interface: PositionService
    Returns the current NMEA date from ZDA sentence

    Specified by:
    getNmeaDate in interface PositionService

    isLocked

    public boolean isLocked()
    Description copied from interface: PositionService
    Returns true if a valid geographic position has been received.

    Specified by:
    isLocked in interface PositionService

    getLastSentence

    public String getLastSentence()
    Description copied from interface: PositionService
    Returns the last sentence received from the gps.

    Specified by:
    getLastSentence in interface PositionService

    start

    public void start()

    stop

    public void stop()


    Copyright © 2013. All Rights Reserved.