|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ka2ddo.aprs.NWSMultiLine
public class NWSMultiLine
This class defines the lat/lon data within a NWS MultiLine encoded poly-figure. It can extract a MultiLine object from a PositionMessage's raw data.
The first two bytes are space and '}'. The next byte is a code for the type of data to plot:
letter | color | line type | meaning |
---|---|---|---|
a | red | solid | tornado warning |
b | red | dashed | tornado watch |
c | red | double-dashed | |
d | yellow | solid | severe thunderstorm warning |
e | yellow | dashed | severe thunderstorm watch |
f | yellow | double-dashed | |
g | blue | solid | test warning |
h | blue | dashed | test watch |
i | blue | double-dashed | |
j | green | solid | |
k | green | dashed | mesoscale discussion area |
l | green | double-dashed | |
m | orange | wide solid | Aloha circle for YAAC |
n | orange | wide dashed | incomplete Aloha circle for YAAC |
The next byte indicates the type of figure:
character | meaning |
---|---|
0 | closed polygon |
1 | line segment |
The next byte indicates the scale value for the offsets relative to the record's position values.
Scale character (ascii value) = (integer(log to base 10 of the scale factor relative to .0001 degree) X 20 ) + 33
For more information, see http://www.aprs-is.net/WX/MultilineProtocol.aspx
Note that NWSMultiLine does not work for polygons and polylines spanning the International Date Line.
Field Summary | |
---|---|
char |
dataType
The extracted data type for the MultiLine polygon. |
int[] |
lats
Array of decoded latitudes in millionths of degrees North, |
char |
lineType
Indicates whether closed polygon or open polyline. |
int[] |
lons
Array of decoded longitudes in millionths of degrees East. |
char |
scale
Scale factor character. |
Constructor Summary | |
---|---|
protected |
NWSMultiLine()
|
|
NWSMultiLine(double[] lats,
double[] lons,
boolean isClosed)
Create an NWSMultiLine data structure from a set of latitude/lomgitude points. |
Method Summary | |
---|---|
static NWSMultiLine |
extract(PositionMessage pm,
byte[] body,
int offset)
Extract an NWSMultiLine from the specified position in a PositionMessage's comment. |
ObjectReport |
generateMessage(java.lang.String name,
char symTableId,
char symbolCode,
java.lang.String freeText)
Create an ObjectReport containing the encoding of this NWSMultiLine. |
boolean |
isClosed()
Test whether this is a polyline or polygon. |
java.lang.String |
toString()
Returns a string representation of the object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public char dataType
public char lineType
public char scale
public int[] lats
public int[] lons
Constructor Detail |
---|
protected NWSMultiLine()
public NWSMultiLine(double[] lats, double[] lons, boolean isClosed)
lats
- array of latitudes in fractional degrees Northlons
- array of longitudes in fractional degrees EastisClosed
- boolean true if this is for a closed polygon, false for open polylineMethod Detail |
---|
public static NWSMultiLine extract(PositionMessage pm, byte[] body, int offset)
pm
- PositionMessage to extract reference latitude and longitude frombody
- byte array of AX.25 message bodyoffset
- starting position in body array where NWSMultiLine encoding begins
public boolean isClosed()
public ObjectReport generateMessage(java.lang.String name, char symTableId, char symbolCode, java.lang.String freeText)
name
- name to assign to the ObjectsymTableId
- APRS symbol table ID (or overlay character) to associate with the ObjectsymbolCode
- APRS symbol code to associated with the ObjectfreeText
- free-text comment to append to the Object report
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |