|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Gets data from GPS device.
Field Summary | |
static java.lang.String |
SERVICE_NAME
Helper method. |
Method Summary | |
void |
disableStream()
Stops the GPS stream and causes the application to close the serial port |
void |
enableStream()
Starts the GPS stream and causes the application to open the serial port |
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 modem. |
float |
getLat()
Returns the latitude value reported by the GPS modem. |
float |
getLon()
Returns the longitude value reported by the GPS modem. |
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 modem. |
float |
getSpeedKPH()
Returns the speed reported by the GPS modem. |
float |
getSpeedMPH()
Returns the speed reported by the GPS modem. |
int |
getStat()
Returns a status indicator for the GPS data. |
long |
getTime()
Returns the current GPS time in UTC seconds. |
boolean |
isStreamEnabled()
Checks to see if the GPS stream is enabled |
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. |
boolean |
setSystemTime()
Sets the system clock based on the GPS time. |
Field Detail |
public static final java.lang.String SERVICE_NAME
Method Detail |
public void enableStream()
public void disableStream()
public boolean isStreamEnabled()
public void setGpsPort(java.lang.String newPortName)
The default value is "/dev/ttyS6".
newPortName
- Linux device name of GPS serial port.public void setGpsBaudRate(int newBaudRate)
The default value is 4800.
newBaudRate
- serial port baud ratepublic boolean getGpsLock()
public void sendCommand(java.lang.String command) throws java.lang.Exception
command
- the string representing the command to send to the modem
java.lang.Exception
- if an I/O error occurred on the GPS modem port, or if
the GPS is not enabled.public java.lang.String getGPGGA()
public java.lang.String getGPGLL()
public java.lang.String getGPGSA()
public int getNumOfGSVMessages()
public java.lang.String getGPGSV1()
public java.lang.String getGPGSV2()
public java.lang.String getGPGSV3()
public java.lang.String getGPGSV4()
public java.lang.String getGPRMC()
public java.lang.String getGPVTG()
public java.lang.String getFOM()
public java.lang.String getPPS()
public boolean setSystemTime()
public long getTime()
public int getStat()
public int getSats()
public float getLat()
public float getLon()
public float getSpeedMPH()
public float getSpeedKPH()
public int getHeading()
public int getPacc()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |