|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--wonderly.jeaprs.aprs.packet.APRSData | +--wonderly.jeaprs.aprs.packet.APRSGps
This class holds data from NMEA sentences. It currently understands $GPRMC and $GPGGA sentences.
Field Summary | |
static int |
TYPE_GPGGA
Not supported for output, but works for input |
static int |
TYPE_GPRMC
|
Fields inherited from class wonderly.jeaprs.aprs.packet.APRSData |
altIcons, data, hasOverlaya, hasOverlayn, icon, overlay, packetType |
Constructor Summary | |
APRSGps(wonderly.jeaprs.ByteString data)
Construct and parse NEMA data |
|
APRSGps(wonderly.jeaprs.ByteString data,
byte table,
byte sym)
Construct and parse data passed and specify a symbol table/overlay and icon |
Method Summary | |
byte[] |
formatReportData()
Get the Information packet form of this packet. |
long |
getAltitude()
|
boolean |
getAltitudePresent()
|
int |
getCourse()
|
boolean |
getCoursePresent()
|
java.lang.String |
getCourseSpeed()
|
java.lang.String |
getData()
Returns the raw NMEA data string |
long |
getLatHundredthsSeconds()
|
java.lang.String |
getLatHundredthsSecondsString()
Returns the latitude specified as a string compliant with APRS formats |
long |
getLonHundredthsSeconds()
|
java.lang.String |
getLonHundredthsSecondsString()
Returns the longitude specified as a string compliant with APRS formats |
int |
getMagVariation()
|
char |
getMagVariationDirection()
|
wonderly.jeaprs.ByteString |
getMessage()
|
wonderly.jeaprs.ByteString |
getName()
|
int |
getSatCount()
|
boolean |
getSatsPresent()
|
int |
getSpeedInHundredthsMPH()
|
boolean |
getSpeedPresent()
|
int |
getType()
|
boolean |
isValid()
When the data is invalid the entire sentence is still processed. |
static java.lang.String |
lonHundredthsSecondsToString(long lon)
|
void |
processData(wonderly.jeaprs.aprs.packet.APRSPacket pkt,
wonderly.jeaprs.aprs.packet.APRSEventListener obj)
Distributes this packet to the passed listener via APRSEventListener.gps() . |
void |
processGPGGA(java.lang.String line)
Process a GPGGA packet, populating this object |
void |
processGPRMC(java.lang.String line)
Process a GPRMC packet, populating this object. |
void |
setAltitude(int altitude)
Sets the altitude for the data |
void |
setAltitudePresent(boolean how)
Set whether altitude is present in the data |
void |
setCourse(int course)
Sets the course data |
void |
setCoursePresent(boolean how)
Sets whether the course is present |
void |
setData(java.lang.String pktData)
Set the raw NMEA string data |
void |
setLatHundredthsSeconds(long latVal)
Sets the latitude seconds of arc for the location |
void |
setLonHundredthsSeconds(long lonVal)
Sets the longitude seconds of arc for the location |
void |
setMagVariation(int var)
|
void |
setMagVariationDirection(char dir)
|
void |
setSatCount(int cnt)
Set the count of satellites found |
void |
setSatsPresent(boolean how)
Sets whether or not satellite count was/is present in the data |
void |
setSpeedInHundredthsMPH(int speed)
Sets the speed data |
void |
setSpeedPresent(boolean how)
Set whether the speed is present in the data |
void |
setTimeDate(int hour,
int min,
int sec,
int day,
int mon,
int year)
|
void |
setType(int type)
|
void |
setValid(boolean val)
Set whether the data is valid or not |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface wonderly.jeaprs.aprs.packet.APRSPositionData |
getGridInfo, getIcon, getLatHundredthsSecondsToString, getLonHundredthsSecondsToString, getOverlayIndex, isAltIcon, isGridOnly, isOverlayAlpha, isOverlayNumeric |
Field Detail |
public static final int TYPE_GPRMC
public static final int TYPE_GPGGA
Constructor Detail |
public APRSGps(wonderly.jeaprs.ByteString data, byte table, byte sym)
public APRSGps(wonderly.jeaprs.ByteString data)
Method Detail |
public wonderly.jeaprs.ByteString getName()
getName
in interface APRSPositionData
public void setType(int type)
type
- one of the TYPE_* values defined in this classpublic int getType()
public void setSatsPresent(boolean how)
public boolean getSatsPresent()
public int getSatCount()
public void setSatCount(int cnt)
public void setCoursePresent(boolean how)
public boolean getCoursePresent()
public void setSpeedPresent(boolean how)
public boolean getSpeedPresent()
public void setAltitudePresent(boolean how)
public boolean getAltitudePresent()
public java.lang.String getCourseSpeed()
course@speedmph
.public long getAltitude()
getAltitudePresent()
public void setAltitude(int altitude)
public wonderly.jeaprs.ByteString getMessage()
getMessage
in interface APRSPositionData
public long getLonHundredthsSeconds()
getLonHundredthsSeconds
in interface APRSPositionData
public long getLatHundredthsSeconds()
getLatHundredthsSeconds
in interface APRSPositionData
public java.lang.String getLatHundredthsSecondsString()
public void setLonHundredthsSeconds(long lonVal)
public void setLatHundredthsSeconds(long latVal)
public java.lang.String getLonHundredthsSecondsString()
public static java.lang.String lonHundredthsSecondsToString(long lon)
public int getCourse()
getCourse
in interface APRSPositionData
getCoursePresent()
public void setCourse(int course)
public int getSpeedInHundredthsMPH()
getSpeedInHundredthsMPH
in interface APRSPositionData
public void setSpeedInHundredthsMPH(int speed)
speed
- speed in 100ths mph. 6543 is 65.43mphpublic boolean isValid()
public void setValid(boolean val)
public java.lang.String getData()
public void setMagVariation(int var)
public int getMagVariation()
public char getMagVariationDirection()
public void setMagVariationDirection(char dir)
public void setData(java.lang.String pktData)
public java.lang.String toString()
toString
in class java.lang.Object
public void setTimeDate(int hour, int min, int sec, int day, int mon, int year)
public byte[] formatReportData() throws InvalidPacketConfigurationException
setData
.
formatReportData
in class APRSData
InvalidPacketConfigurationException
- if the packet data is not completely
established so that the packet can be formatted correctly.public void processData(wonderly.jeaprs.aprs.packet.APRSPacket pkt, wonderly.jeaprs.aprs.packet.APRSEventListener obj)
APRSEventListener.gps()
.
processData
in interface APRSEventDataProcessor
processData
in class APRSData
APRSPosition.processData(APRSPacket,APRSEventListener)
public void processGPRMC(java.lang.String line)
$GPRMC,022037,A,3606.6417,N,09604.2496,W,0.000,0.0,180800,4.9,E*69
public void processGPGGA(java.lang.String line)
$GPGGA,012405,3609.617,N,09432.294,W,1,06,2.4,367.4,M,-28.0,M,,*7C
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |