wonderly.jeaprs.aprs.packet
Class APRSLocationInfo

java.lang.Object
  |
  +--wonderly.jeaprs.aprs.packet.APRSData
        |
        +--wonderly.jeaprs.aprs.packet.APRSLocationInfo
All Implemented Interfaces:
APRSEventDataProcessor, APRSPositionData, java.io.Serializable

public class APRSLocationInfo
extends APRSData
implements APRSPositionData

Version:
1.0
Author:
Gregg Wonderly - The information contained in this document is Copyright 2001-2003, Gregg Wonderly, all rights reserved.
See Also:
Serialized Form

Field Summary
 
Fields inherited from class wonderly.jeaprs.aprs.packet.APRSData
altIcons, data, hasOverlaya, hasOverlayn, icon, overlay, packetType
 
Constructor Summary
APRSLocationInfo(wonderly.jeaprs.ByteString locationData)
          Parse location string as in "3609.23N/09612.13Wv121/040" 01234567890123456789012345 00000000001111111111222222
 
Method Summary
 byte[] formatReportData()
          This method must be implemented by the various packet types to construct the APRS packet data that follows the PATH in a UI frame.
 int getCourse()
           
 long getLatHundredthsSeconds()
           
 long getLonHundredthsSeconds()
           
 wonderly.jeaprs.ByteString getMessage()
           
 wonderly.jeaprs.ByteString getName()
           
 int getSpeedInHundredthsMPH()
           
 boolean haveCourseAndSpeed()
           
protected  boolean isNum(wonderly.jeaprs.ByteString str)
           
protected static java.lang.String numToString(double val)
           
protected static java.lang.String numToString(double val, int sz)
           
protected static java.lang.String numToString(int val)
          Default padding of numeric to zero filled 3 char string
protected static java.lang.String numToString(int val, int sz)
          zero fill of numeric string to indicated length
protected static int toNum(wonderly.jeaprs.ByteString str)
          replaces space chars in str with 0 and then coverts str to a number
 
Methods inherited from class wonderly.jeaprs.aprs.packet.APRSData
addOtherAPRSData, ambiguousDistance, calcIconFrom, fixedToString, formatTime, getGridInfo, getIcon, getLatHundredthsSecondsToString, getLatHundrethsSecondsParts, getLatSecondsToString, getLonHundredthsSecondsToString, getLonHundrethsSecondsParts, getLonSecondsToString, getOtherAPRSData, getOverlayIndex, getPrintable, isAltIcon, isGridOnly, isOverlayAlpha, isOverlayNumeric, latHundredthsSecondsAsString, latLonParts, latSecondsAsString, log, lonHundredthsSecondsAsString, lonSecondsAsString, main, numToString, parseLat, parseLon, parseTime, processData, sendPacket, zeroPad, zeroPad, zFill
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface wonderly.jeaprs.aprs.packet.APRSPositionData
getGridInfo, getIcon, getLatHundredthsSecondsToString, getLonHundredthsSecondsToString, getOverlayIndex, isAltIcon, isGridOnly, isOverlayAlpha, isOverlayNumeric
 

Constructor Detail

APRSLocationInfo

public APRSLocationInfo(wonderly.jeaprs.ByteString locationData)
Parse location string as in "3609.23N/09612.13Wv121/040" 01234567890123456789012345 00000000001111111111222222

Method Detail

haveCourseAndSpeed

public boolean haveCourseAndSpeed()

getCourse

public int getCourse()
Specified by:
getCourse in interface APRSPositionData

getSpeedInHundredthsMPH

public int getSpeedInHundredthsMPH()
Specified by:
getSpeedInHundredthsMPH in interface APRSPositionData

getLatHundredthsSeconds

public long getLatHundredthsSeconds()
Specified by:
getLatHundredthsSeconds in interface APRSPositionData

getLonHundredthsSeconds

public long getLonHundredthsSeconds()
Specified by:
getLonHundredthsSeconds in interface APRSPositionData

getName

public wonderly.jeaprs.ByteString getName()
Specified by:
getName in interface APRSPositionData

getMessage

public wonderly.jeaprs.ByteString getMessage()
Specified by:
getMessage in interface APRSPositionData

formatReportData

public byte[] formatReportData()
Description copied from class: APRSData
This method must be implemented by the various packet types to construct the APRS packet data that follows the PATH in a UI frame. Thus, if a status packet was to be sent out, this method should return something such as ">My status".getBytes().

Specified by:
formatReportData in class APRSData

isNum

protected boolean isNum(wonderly.jeaprs.ByteString str)
Overrides:
isNum in class APRSData
Returns:
true if all chars in str are numeric

toNum

protected static int toNum(wonderly.jeaprs.ByteString str)
replaces space chars in str with 0 and then coverts str to a number


numToString

protected static java.lang.String numToString(double val)

numToString

protected static java.lang.String numToString(int val)
Description copied from class: APRSData
Default padding of numeric to zero filled 3 char string


numToString

protected static java.lang.String numToString(double val,
                                              int sz)

numToString

protected static java.lang.String numToString(int val,
                                              int sz)
Description copied from class: APRSData
zero fill of numeric string to indicated length

Parameters:
val - the value
sz - the needed length of the string, zero filled to this