public class DisMarshaller
extends java.lang.Object
DIS has a standard coordiante system; its origin is a the center of the earth and it is cartesian. It's very difficult for casual programmers to work with, though. Often simulators want to specify object locations in (lat, lon, altitude) or (x,y) offset from some position on the surface of the earth. Also, the timestamp updates are not always easy to work with. In short, there are some fields in the PDUs whose values are not easily set, but that nonetheless need to be correctly specified. This class accoplishes that.
The class can rewrite the coordinates used for position in PDUs to conform to the DIS standard, or someother agreed-upon standard. Fields such as the timestamp or exercise ID can also be set--in short, it can look over the shoulder of the programmer and set the fields correctly even if the programmer doesn't. As with any effort of this type, the line betwen being helpful and being annoying is a fine one.
Modifier and Type | Class and Description |
---|---|
static class |
DisMarshaller.TimestampStyle
The various formats we can use for the timestamp format in the PDU header when marshalled
|
Constructor and Description |
---|
DisMarshaller() |
Modifier and Type | Method and Description |
---|---|
byte[] |
marshalPdu(Pdu aPdu) |
public byte[] marshalPdu(Pdu aPdu)