wonderly.jeaprs.aprs.packet
Class APRSWeather
java.lang.Object
|
+--wonderly.jeaprs.aprs.packet.APRSData
|
+--wonderly.jeaprs.aprs.packet.APRSWeather
- All Implemented Interfaces:
- APRSEventDataProcessor, java.io.Serializable
- public class APRSWeather
- extends APRSData
Parses and encodes all weather reports, or provides raw data if not decoded.
If getRawWeatherData returns null, then the data was decoded otherwise,
getRawWeatherData returns the unparsed data String.
- Version:
- 1.0
- Author:
- Gregg Wonderly -
The information contained in this document is Copyright 2001-2003, Gregg Wonderly,
all rights reserved.
Changed 17 Feb 2001-2002 KG5LT
Notes:
Wind Direction is in raw format from Peet stations: 0-255
which needs to be converted to compass-rose: int(sdir * 360 / 255)
Changed 24 Feb 2001-2002 KG5LT
Notes:
Implemented recommended changes (by Gregg) to postionless reporting.
Changed 10 Mar 2001-2002 KG5LT
Found error in date/time def's. Implemented weather report date/time.
Changed Humidity logic, so when =00 it equals 100%. However, not sure
what to do when humidity is truely zero... Do we report only 99% when
humidity is 99% or 100%?? TBD.
- See Also:
- Serialized Form
Field Summary |
protected wonderly.jeaprs.ByteString |
data
|
protected wonderly.jeaprs.ByteString |
noMoreNumbers
|
protected wonderly.jeaprs.ByteString |
sday
|
protected wonderly.jeaprs.ByteString |
sdir
|
protected wonderly.jeaprs.ByteString |
sgust
|
protected wonderly.jeaprs.ByteString |
shour
|
protected wonderly.jeaprs.ByteString |
shumid
|
protected wonderly.jeaprs.ByteString |
sjuliandate
|
protected wonderly.jeaprs.ByteString |
sminute
|
protected wonderly.jeaprs.ByteString |
smonth
|
protected wonderly.jeaprs.ByteString |
spres
|
protected wonderly.jeaprs.ByteString |
spresdel
|
protected wonderly.jeaprs.ByteString |
srainhr
|
protected wonderly.jeaprs.ByteString |
srainlhr
|
protected wonderly.jeaprs.ByteString |
srainmid
|
protected wonderly.jeaprs.ByteString |
srainmo
|
protected wonderly.jeaprs.ByteString |
sspd
|
protected wonderly.jeaprs.ByteString |
stemp
|
protected wonderly.jeaprs.ByteString |
stime
|
static int |
WEATHER_APRS
|
static int |
WEATHER_PEET
|
static int |
WEATHER_ULT
|
Constructor Summary |
APRSWeather(wonderly.jeaprs.ByteString txt)
Construct weather data by parsing a weather report. |
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, isNum, isOverlayAlpha, isOverlayNumeric, latHundredthsSecondsAsString, latLonParts, latSecondsAsString, log, lonHundredthsSecondsAsString, lonSecondsAsString, main, numToString, numToString, numToString, parseLat, parseLon, parseTime, sendPacket, toNum, zeroPad, zeroPad, zFill |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
WEATHER_ULT
public static final int WEATHER_ULT
- See Also:
- Constant Field Values
WEATHER_PEET
public static final int WEATHER_PEET
- See Also:
- Constant Field Values
WEATHER_APRS
public static final int WEATHER_APRS
- See Also:
- Constant Field Values
smonth
protected wonderly.jeaprs.ByteString smonth
sday
protected wonderly.jeaprs.ByteString sday
shour
protected wonderly.jeaprs.ByteString shour
sminute
protected wonderly.jeaprs.ByteString sminute
sjuliandate
protected wonderly.jeaprs.ByteString sjuliandate
stime
protected wonderly.jeaprs.ByteString stime
sdir
protected wonderly.jeaprs.ByteString sdir
sspd
protected wonderly.jeaprs.ByteString sspd
sgust
protected wonderly.jeaprs.ByteString sgust
stemp
protected wonderly.jeaprs.ByteString stemp
srainhr
protected wonderly.jeaprs.ByteString srainhr
srainlhr
protected wonderly.jeaprs.ByteString srainlhr
srainmid
protected wonderly.jeaprs.ByteString srainmid
srainmo
protected wonderly.jeaprs.ByteString srainmo
shumid
protected wonderly.jeaprs.ByteString shumid
spres
protected wonderly.jeaprs.ByteString spres
spresdel
protected wonderly.jeaprs.ByteString spresdel
data
protected wonderly.jeaprs.ByteString data
noMoreNumbers
protected wonderly.jeaprs.ByteString noMoreNumbers
APRSWeather
public APRSWeather(wonderly.jeaprs.ByteString txt)
- Construct weather data by parsing a weather report.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getRawWeatherData
public wonderly.jeaprs.ByteString getRawWeatherData()
getMonth
public wonderly.jeaprs.ByteString getMonth()
getDay
public wonderly.jeaprs.ByteString getDay()
getHour
public wonderly.jeaprs.ByteString getHour()
getMinute
public wonderly.jeaprs.ByteString getMinute()
getWindDirection
public wonderly.jeaprs.ByteString getWindDirection()
getWindSpeed
public wonderly.jeaprs.ByteString getWindSpeed()
getWindGustSpeed
public wonderly.jeaprs.ByteString getWindGustSpeed()
getTemperature
public wonderly.jeaprs.ByteString getTemperature()
getRainThisHour
public wonderly.jeaprs.ByteString getRainThisHour()
getRainLastHour
public wonderly.jeaprs.ByteString getRainLastHour()
getRainSinceMidnight
public wonderly.jeaprs.ByteString getRainSinceMidnight()
getRainTotalForMonth
public wonderly.jeaprs.ByteString getRainTotalForMonth()
getHumidity
public wonderly.jeaprs.ByteString getHumidity()
getBarometricPressure
public wonderly.jeaprs.ByteString getBarometricPressure()
- Returns:
- barometric pressure (in tenths of millibars/tenths of hPascal).
processData
public void processData(wonderly.jeaprs.aprs.packet.APRSPacket pkt,
wonderly.jeaprs.aprs.packet.APRSEventListener context)
- Description copied from class:
APRSData
- This method needs to be called for any APRS packet that could produce
multiple APRS data objects.
- Specified by:
processData
in interface APRSEventDataProcessor
- Overrides:
processData
in class APRSData
- See Also:
APRSPosition.processData(APRSPacket,APRSEventListener)
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