|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.phidgets.Phidget
com.phidgets.GPSPhidget
This class represents a Phidget GPS. All methods to manipulate the Phidget GPS are implemented in this class.
| Field Summary |
| Constructor Summary | |
GPSPhidget()
|
|
| Method Summary | |
void |
addGPSPositionChangeListener(GPSPositionChangeListener l)
Adds a position change listener. |
void |
addGPSPositionFixStatusChangeListener(GPSPositionFixStatusChangeListener l)
Adds a position fix status change listener. |
double |
getAltitude()
Returns the current altitude, in meters. |
java.util.Calendar |
getDateAndTime()
Returns the current GPS date and time, in UTC. |
double |
getHeading()
Returns the current heading, in degrees - compass bearing format. |
double |
getLatitude()
Returns the current latitude, in signed degrees format. |
double |
getLongitude()
Returns the current longitude, in signed degrees format. |
boolean |
getPositionFixStatus()
Returns the current position fix status. |
double |
getVelocity()
Returns the current velocity, in km/h. |
void |
removeGPSPositionChangeListener(GPSPositionChangeListener l)
|
void |
removeGPSPositionFixStatusChangeListener(GPSPositionFixStatusChangeListener l)
|
| Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public GPSPhidget()
throws PhidgetException
| Method Detail |
public double getLatitude()
throws PhidgetException
PhidgetException - If this Phidget is not opened and attached, or if the GPS is not plugged into the board.
See open for information on determining if a device is attached.
If the latitude is not available, an EPHIDGET_UNKNOWNVAL exception is thrown.
public double getLongitude()
throws PhidgetException
PhidgetException - If this Phidget is not opened and attached, or if the GPS is not plugged into the board.
See open for information on determining if a device is attached.
If the longitude is not available, an EPHIDGET_UNKNOWNVAL exception is thrown.
public double getAltitude()
throws PhidgetException
PhidgetException - If this Phidget is not opened and attached, or if the GPS is not plugged into the board.
See open for information on determining if a device is attached.
If the altitude is not available, an EPHIDGET_UNKNOWNVAL exception is thrown.
public double getHeading()
throws PhidgetException
PhidgetException - If this Phidget is not opened and attached, or if the GPS is not plugged into the board.
See open for information on determining if a device is attached.
If the heading is not available, an EPHIDGET_UNKNOWNVAL.
public double getVelocity()
throws PhidgetException
PhidgetException - If this Phidget is not opened and attached, or if the GPS is not plugged into the board.
See open for information on determining if a device is attached.
If the velocity is not available, an EPHIDGET_UNKNOWNVAL exception is thrown.
public java.util.Calendar getDateAndTime()
throws PhidgetException
getPositionFixStatus is true.
PhidgetException - If this Phidget is not opened and attached, or if the GPS is not plugged into the board.
See open for information on determining if a device is attached.
If the date or time are not available, an EPHIDGET_UNKNOWNVAL exception is thrown.
public boolean getPositionFixStatus()
throws PhidgetException
PhidgetException - If this Phidget is not opened and attached, or if the GPS is not plugged into the board.
See open for information on determining if a device is attached.
If false, the getHeading / getVelocity will throw an EPHIDGET_UNKNOWN exception.public final void addGPSPositionFixStatusChangeListener(GPSPositionFixStatusChangeListener l)
There is no limit on the number of position fix status change handlers that can be registered for a particular Phidget.
l - An implemetation of the GPSPositionFixStatusChangeListener interfacepublic final void removeGPSPositionFixStatusChangeListener(GPSPositionFixStatusChangeListener l)
public final void addGPSPositionChangeListener(GPSPositionChangeListener l)
There is no limit on the number of position change handlers that can be registered for a particular Phidget.
l - An implemetation of the GPSPositionChangeListener interfacepublic final void removeGPSPositionChangeListener(GPSPositionChangeListener l)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||