|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jwo.landserf.process.gps.garmin.GarminPacket jwo.landserf.process.gps.garmin.WaypointDataPacket
public class WaypointDataPacket
Represents a Garmin waypoint packet used for storing named locations. The Garmin-protocol contains a large number of different waypoint packet specifications. Currently, only the one labelled D108 is implemented.
Field Summary |
---|
Constructor Summary | |
---|---|
WaypointDataPacket(GarminPacket packet)
Creates a waypoint packet from the given packet. |
|
WaypointDataPacket(int connectionType,
Footprint fp,
float elev,
String name)
Creates a waypoint packet from the given location and name. |
Method Summary | |
---|---|
float |
getAltitude()
Reports the altitude of this position. |
AngleRadians |
getLatitude()
Reports the latitude of the waypoint. |
AngleRadians |
getLongitude()
Reports the longitude of the waypoint. |
String |
getName()
Reports the name of the waypoint. |
void |
setDatatypeVersion(int version)
Sets which version of the packet that this class should represent. |
Methods inherited from class jwo.landserf.process.gps.garmin.GarminPacket |
---|
commandToString, createBasicPacket, createCommandPacket, getChecksum, getConnectionType, getData, getDataLength, getID, getRawPacketData, getType, idToString, readDataByte, readDataDouble, readDataFloat, readDataLong, readDataString, readDataWord, setPacket, setSerialPacket, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public WaypointDataPacket(int connectionType, Footprint fp, float elev, String name)
connectionType
- Type of packet connection - either GarminGPS.USB
or GarminGPS.SERIAL
.fp
- Location of waypoint in decimal degrees longitude/latitude.elev
- Elevation of waypoint.name
- Name of waypoint (will be truncated to 6 characters).public WaypointDataPacket(GarminPacket packet)
packet
- Packet to copy.
PacketNotRecognisedException
- if the given packet is not a waypoint packet.Method Detail |
---|
public void setDatatypeVersion(int version)
version
- Waypoint packet version.public AngleRadians getLatitude()
getLatitude
in interface Position
public AngleRadians getLongitude()
getLongitude
in interface Position
public float getAltitude()
getAltitude
in interface Position
public String getName()
getName
in interface GPSWaypoint
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |