|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlejos.nxt.I2CSensor
lejos.nxt.addon.GPSSensor
public class GPSSensor
Class for controlling dGPS sensor from Dexter Industries
Field Summary | |
---|---|
static byte |
DGPS_CMD_ANGD
|
static byte |
DGPS_CMD_ANGR
|
static byte |
DGPS_CMD_DIST
|
static byte |
DGPS_CMD_HEAD
|
static byte |
DGPS_CMD_LAT
|
static byte |
DGPS_CMD_LONG
|
static byte |
DGPS_CMD_SLAT
|
static byte |
DGPS_CMD_SLONG
|
static byte |
DGPS_CMD_STATUS
|
static byte |
DGPS_CMD_UTC
|
static byte |
DGPS_CMD_VELO
|
static byte |
DGPS_I2C_ADDR
|
Fields inherited from class lejos.nxt.I2CSensor |
---|
address, DEFAULT_I2C_ADDRESS, port, REG_PRODUCT_ID, REG_SENSOR_TYPE, REG_VERSION |
Fields inherited from interface lejos.nxt.SensorConstants |
---|
BLACK, BLANK_INDEX, BLUE, BLUE_INDEX, GREEN, GREEN_INDEX, MAX_AD_RAW, MAX_TYPE, MIN_TYPE, MODE_ANGLESTEP, MODE_BOOLEAN, MODE_CELSIUS, MODE_FARENHEIT, MODE_PCTFULLSCALE, MODE_PERIODCOUNTER, MODE_RAW, MODE_TRANSITIONCNT, RED, RED_INDEX, TYPE_ANGLE, TYPE_COLORBLUE, TYPE_COLORFULL, TYPE_COLORGREEN, TYPE_COLORNONE, TYPE_COLORRED, TYPE_CUSTOM, TYPE_HISPEED, TYPE_LIGHT_ACTIVE, TYPE_LIGHT_INACTIVE, TYPE_LOWSPEED, TYPE_LOWSPEED_9V, TYPE_NO_SENSOR, TYPE_REFLECTION, TYPE_SOUND_DB, TYPE_SOUND_DBA, TYPE_SWITCH, TYPE_TEMPERATURE, WHITE, YELLOW |
Constructor Summary | |
---|---|
GPSSensor(I2CPort sensorPort)
Constructor |
Method Summary | |
---|---|
int |
getAngleToDest()
Angle to destination in degrees |
int |
getDistanceToDest()
Distance to destination in meters |
int |
getHeading()
Read the current heading in degrees |
int |
getLat()
Read the current latitude in degrees (positive=North, negative=South) |
int |
getLong()
Read the current longitude in degrees (positive=East, negative=West) |
int |
getRelativeHeading()
Read the current relative heading in degrees Angle travelled since last request. |
int |
getUTC()
Get the current time stored on the dGPS |
int |
getVelocity()
Read the current velocity in cm/s |
boolean |
linkStatus()
Return status of link to the GPS satellites LED on dGPS should light if satellite lock acquired |
int |
setLatitude(int latitude)
Set destination latitude coordinates |
int |
setLongitude(int longitude)
Set destination longitude coordinates |
Methods inherited from class lejos.nxt.I2CSensor |
---|
fetchString, getData, getData, getData, getId, getProductID, getSensorType, getVersion, sendData, sendData, sendData, setAddress |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final byte DGPS_I2C_ADDR
public static final byte DGPS_CMD_UTC
public static final byte DGPS_CMD_STATUS
public static final byte DGPS_CMD_LAT
public static final byte DGPS_CMD_LONG
public static final byte DGPS_CMD_VELO
public static final byte DGPS_CMD_HEAD
public static final byte DGPS_CMD_DIST
public static final byte DGPS_CMD_ANGD
public static final byte DGPS_CMD_ANGR
public static final byte DGPS_CMD_SLAT
public static final byte DGPS_CMD_SLONG
Constructor Detail |
---|
public GPSSensor(I2CPort sensorPort)
sensorPort
- the sensor port the sensor is connected toMethod Detail |
---|
public boolean linkStatus()
public int getUTC()
public int getLat()
public int getLong()
public int getVelocity()
public int getHeading()
public int getRelativeHeading()
public int getDistanceToDest()
public int getAngleToDest()
public int setLatitude(int latitude)
latitude
- destination's latitude in decimal degrees
public int setLongitude(int longitude)
longitude
- destination's longitude in decimal degrees
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |