Public Member Functions | |
final void | addGPSPositionChangeListener (GPSPositionChangeListener l) |
final void | addGPSPositionFixStatusChangeListener (GPSPositionFixStatusChangeListener l) |
native double | getAltitude () throws PhidgetException |
native Calendar | getDateAndTime () throws PhidgetException |
native double | getHeading () throws PhidgetException |
native double | getLatitude () throws PhidgetException |
native double | getLongitude () throws PhidgetException |
native boolean | getPositionFixStatus () throws PhidgetException |
native double | getVelocity () throws PhidgetException |
GPSPhidget () throws PhidgetException | |
final void | removeGPSPositionChangeListener (GPSPositionChangeListener l) |
final void | removeGPSPositionFixStatusChangeListener (GPSPositionFixStatusChangeListener l) |
Private Member Functions | |
final void | enableDeviceSpecificEvents (boolean b) |
native void | enableGPSPositionChangeEvents (boolean b) |
native void | enableGPSPositionFixStatusChangeEvents (boolean b) |
void | fireGPSPositionChange (GPSPositionChangeEvent e) |
void | fireGPSPositionFixStatusChange (GPSPositionFixStatusChangeEvent e) |
Static Private Member Functions | |
static native long | create () throws PhidgetException |
Private Attributes | |
LinkedList | gpsPositionChangeListeners = new LinkedList () |
LinkedList | gpsPositionFixStatusChangeListeners = new LinkedList () |
long | nativeGPSPositionChangeHandler = 0 |
long | nativeGPSPositionFixStatusChangeHandler = 0 |
This class represents a Phidget GPS. All methods to manipulate the Phidget GPS are implemented in this class. See your device's User Guide for more specific API details, technical information, and revision details. The User Guide, along with other resources, can be found on the product page for your device.
Definition at line 21 of file GPSPhidget.java.
com.phidgets.GPSPhidget.GPSPhidget | ( | ) | throws PhidgetException [inline] |
Definition at line 23 of file GPSPhidget.java.
final void com.phidgets.GPSPhidget.addGPSPositionChangeListener | ( | GPSPositionChangeListener | l | ) | [inline] |
Adds a position change listener. The position change handler is a method that will be called when the position changes.
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 interface |
Definition at line 131 of file GPSPhidget.java.
final void com.phidgets.GPSPhidget.addGPSPositionFixStatusChangeListener | ( | GPSPositionFixStatusChangeListener | l | ) | [inline] |
Adds a position fix status change listener. The position fix status change handler is a method that will be called when the position fix status changes.
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 interface |
Definition at line 101 of file GPSPhidget.java.
static native long com.phidgets.GPSPhidget.create | ( | ) | throws PhidgetException [static, private] |
final void com.phidgets.GPSPhidget.enableDeviceSpecificEvents | ( | boolean | b | ) | [inline, private] |
Reimplemented from com.phidgets.Phidget.
Definition at line 89 of file GPSPhidget.java.
native void com.phidgets.GPSPhidget.enableGPSPositionChangeEvents | ( | boolean | b | ) | [private] |
native void com.phidgets.GPSPhidget.enableGPSPositionFixStatusChangeEvents | ( | boolean | b | ) | [private] |
void com.phidgets.GPSPhidget.fireGPSPositionChange | ( | GPSPositionChangeEvent | e | ) | [inline, private] |
Definition at line 145 of file GPSPhidget.java.
void com.phidgets.GPSPhidget.fireGPSPositionFixStatusChange | ( | GPSPositionFixStatusChangeEvent | e | ) | [inline, private] |
Definition at line 115 of file GPSPhidget.java.
native double com.phidgets.GPSPhidget.getAltitude | ( | ) | throws PhidgetException |
Returns the current altitude, in meters.
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. |
native Calendar com.phidgets.GPSPhidget.getDateAndTime | ( | ) | throws PhidgetException |
Returns the current GPS date and time, in UTC. The time is updated 10 times a second and is accurate to within at least 500ms when 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. |
native double com.phidgets.GPSPhidget.getHeading | ( | ) | throws PhidgetException |
Returns the current heading, in degrees - compass bearing format. Heading is only accurate if the GPS is moving, and it represents a heading over time, and not the actual direction the PhidgetGPS is pointing. exception is thrown.
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. |
native double com.phidgets.GPSPhidget.getLatitude | ( | ) | throws PhidgetException |
Returns the current latitude, in signed degrees format.
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. |
native double com.phidgets.GPSPhidget.getLongitude | ( | ) | throws PhidgetException |
Returns the current longitude, in signed degrees format.
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. |
native boolean com.phidgets.GPSPhidget.getPositionFixStatus | ( | ) | throws PhidgetException |
Returns the current position fix status. If true, all of the above properties will be available. Time and date may or may not be available, but they can only be trusted as accurate when the PositionFixStatus 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 false, the getHeading / getVelocity will throw an EPHIDGET_UNKNOWN exception. |
native double com.phidgets.GPSPhidget.getVelocity | ( | ) | throws PhidgetException |
Returns the current velocity, in km/h. Velocity is only accurate if the PhidgetGPS is moving.
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. |
final void com.phidgets.GPSPhidget.removeGPSPositionChangeListener | ( | GPSPositionChangeListener | l | ) | [inline] |
Definition at line 139 of file GPSPhidget.java.
final void com.phidgets.GPSPhidget.removeGPSPositionFixStatusChangeListener | ( | GPSPositionFixStatusChangeListener | l | ) | [inline] |
Definition at line 109 of file GPSPhidget.java.
LinkedList com.phidgets.GPSPhidget.gpsPositionChangeListeners = new LinkedList () [private] |
Definition at line 137 of file GPSPhidget.java.
LinkedList com.phidgets.GPSPhidget.gpsPositionFixStatusChangeListeners = new LinkedList () [private] |
Definition at line 107 of file GPSPhidget.java.
long com.phidgets.GPSPhidget.nativeGPSPositionChangeHandler = 0 [private] |
Definition at line 138 of file GPSPhidget.java.
long com.phidgets.GPSPhidget.nativeGPSPositionFixStatusChangeHandler = 0 [private] |
Definition at line 108 of file GPSPhidget.java.