public interface IGPSService
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SERVICE_NAME
Helper method.
|
Modifier and Type | Method and Description |
---|---|
float |
getAltitude()
Returns the current altitude reported by the GPS device
|
java.lang.String |
getFOM()
Returns the most recent FOM message
|
java.lang.String |
getGPGGA()
Returns the most recent GPGGA message
|
java.lang.String |
getGPGLL()
Returns the most recent GPGLL message
|
java.lang.String |
getGPGSA()
Returns the most recent GPGSA message
|
java.lang.String |
getGPGSV1()
Returns the most recent GPGSV1 message
|
java.lang.String |
getGPGSV2()
Returns the most recent GPGSV2 message
|
java.lang.String |
getGPGSV3()
Returns the most recent GPGSV3 message
|
java.lang.String |
getGPGSV4()
Returns the most recent GPGSV4 message
|
java.lang.String |
getGPRMC()
Returns the most recent GPRMC message
|
boolean |
getGpsLock()
Returns a boolean value indicating if the GPS input stream indicates a
GPS position fix.
|
java.lang.String |
getGPVTG()
Returns the most recent GPVTG message
|
int |
getHeading()
Returns the current heading reported by the GPS device.
|
float |
getLat()
Returns the latitude value reported by the GPS device.
|
float |
getLon()
Returns the longitude value reported by the GPS device.
|
int |
getNumOfGSVMessages()
Returns the number of GPGSV messages currently available
|
int |
getPacc()
Returns the dilution of precision of the current satellite fix.
|
java.lang.String |
getPPS()
Returns the most recent PPS message
|
int |
getSats()
Returns the number satellites locked by the GPS device.
|
float |
getSpeedKPH()
Returns the speed reported by the GPS device.
|
float |
getSpeedMPH()
Returns the speed reported by the GPS device.
|
int |
getStat()
Returns a status indicator for the GPS data.
|
long |
getTime()
Returns the current GPS time in UTC seconds.
|
boolean |
isRunning()
Check the operational status of any functional operation associated with the implementation.
|
void |
restart()
Perform both the action of the stop and the start methods.
|
void |
sendCommand(java.lang.String command)
Sends a command to the GPS device
|
void |
setGpsBaudRate(int newBaudRate)
Set the baud rate to be used of the next open of the GPS serial port.
|
void |
setGpsPort(java.lang.String newPortName)
Set the serial port (Linux device name) that will be used to open a
connection to the GPS receiver.
|
void |
setPersistent()
Store the current configuration (through @IConfigurationManagerService or in the OS as appropriate).
|
boolean |
setSystemTime()
Sets the system clock based on the GPS time.
|
void |
start()
The start method will start any functional operation associated with the specific implementation.
|
void |
stop()
The stop method will stop any functional operation started by the start method.
|
static final java.lang.String SERVICE_NAME
void setGpsPort(java.lang.String newPortName)
newPortName
- Linux device name of GPS serial port.void setGpsBaudRate(int newBaudRate)
newBaudRate
- serial port baud rateboolean getGpsLock()
void sendCommand(java.lang.String command) throws java.lang.Exception
command
- the string representing the command to send to the GPS devicejava.lang.Exception
- if an I/O error occurred on the GPS port, or if the GPS
is not enabled.java.lang.String getGPGGA()
java.lang.String getGPGLL()
java.lang.String getGPGSA()
int getNumOfGSVMessages()
java.lang.String getGPGSV1()
java.lang.String getGPGSV2()
java.lang.String getGPGSV3()
java.lang.String getGPGSV4()
java.lang.String getGPRMC()
java.lang.String getGPVTG()
java.lang.String getFOM()
java.lang.String getPPS()
boolean setSystemTime()
long getTime()
int getStat()
int getSats()
float getLat()
float getLon()
float getSpeedMPH()
float getSpeedKPH()
int getHeading()
int getPacc()
float getAltitude()
void start() throws java.lang.Exception
java.lang.Exception
- start failed (could be missing a configuration).void stop() throws java.lang.Exception
java.lang.Exception
- stop failedvoid restart() throws java.lang.Exception
java.lang.Exception
- restart failed (could be missing a configuration)void setPersistent() throws java.lang.Exception
java.lang.Exception
- no current configuration to storeboolean isRunning()
Copyright © 2009 Eurotech Inc. All rights reserved.