Package org.ka2ddo.opentrac
Class OpenTracWeatherObs
java.lang.Object
org.ka2ddo.opentrac.OpenTracElement
org.ka2ddo.opentrac.OpenTracWeatherObs
- All Implemented Interfaces:
Serializable
An OpenTRAC element that represents the current surface weather observations at the entity.
- Author:
- Andrew Pavlin, KA2DDO
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionshort
Barometric pressure in .1 mbar/.1 HPa.short
Relative humidity percentage.short
Time over which averages are averaged, in seconds.short
Rainfall over averaging interval in 0.1 Kg/cm^2 (or 40 inches of rain per LSB??????)short
Current temperature in 0.1 degrees Kelvin.short
Wind directions, in degrees from True North.short
Wind peak gust speed in 0.1 meters per second units (approximately 0.216 statute miles per hour).short
Wind speed in 0.1 meters per second units (approximately 0.216 statute miles per hour).Fields inherited from class org.ka2ddo.opentrac.OpenTracElement
id
-
Constructor Summary
ConstructorDescriptionCreate uninitialized OpenTracWeatherObs element.OpenTracWeatherObs
(int type, byte[] body, int offset, int length) Extract a OpenTracWeatherObs element from a byte array -
Method Summary
Modifier and TypeMethodDescriptionint
computeBody
(byte[] buf, int offset) Append this element to a message bufferboolean
equalsElement
(OpenTracElement other) Test if this OpenTracElement has the same type and value as another OpenTracElement.int
length()
Return the number of bytes needed to encode this element.Get the string representation of the value of this element.Methods inherited from class org.ka2ddo.opentrac.OpenTracElement
getId, toString
-
Field Details
-
period
public short periodTime over which averages are averaged, in seconds. -
windDir
public short windDirWind directions, in degrees from True North. -
windSpeed01MS
public short windSpeed01MSWind speed in 0.1 meters per second units (approximately 0.216 statute miles per hour). -
windGust01MS
public short windGust01MSWind peak gust speed in 0.1 meters per second units (approximately 0.216 statute miles per hour). -
temp01K
public short temp01KCurrent temperature in 0.1 degrees Kelvin. -
rainfall
public short rainfallRainfall over averaging interval in 0.1 Kg/cm^2 (or 40 inches of rain per LSB??????) -
baroPressure01HPa
public short baroPressure01HPaBarometric pressure in .1 mbar/.1 HPa. -
humidityPct
public short humidityPctRelative humidity percentage.
-
-
Constructor Details
-
OpenTracWeatherObs
public OpenTracWeatherObs()Create uninitialized OpenTracWeatherObs element. -
OpenTracWeatherObs
public OpenTracWeatherObs(int type, byte[] body, int offset, int length) Extract a OpenTracWeatherObs element from a byte array- Parameters:
type
- OpenTracTypes code for this elementbody
- byte array to extract element fromoffset
- zero-based array index to start extractionlength
- number of bytes to extract
-
-
Method Details
-
valueString
Get the string representation of the value of this element.- Specified by:
valueString
in classOpenTracElement
- Returns:
- value string
-
computeBody
public int computeBody(byte[] buf, int offset) Append this element to a message buffer- Specified by:
computeBody
in classOpenTracElement
- Parameters:
buf
- byte array to add the element tooffset
- starting index to store the element- Returns:
- index after the end of the stored element
-
length
public int length()Return the number of bytes needed to encode this element.- Specified by:
length
in classOpenTracElement
- Returns:
- byte count needed to hold this element
-
equalsElement
Test if this OpenTracElement has the same type and value as another OpenTracElement.- Specified by:
equalsElement
in classOpenTracElement
- Parameters:
other
- OpenTracElement to compare against this element- Returns:
- boolean true if elements are of the same type, class, and value
-