public class OpenTracGpsQuality extends OpenTracElement
Modifier and Type | Field and Description |
---|---|
byte |
fixType
The GPS fix type of the signal.
|
byte |
fixValidity
The validity of the current fix.
|
short |
hdop
Horizontal Dilution Of Precision of the satellite configuration, multiplied by 10.
|
byte |
numSatellites
Number of satellites actually used for the fix as reported by the NMEA 0183 $GPGGA sentence.
|
short |
pdop
Position Dilution Of Precision of the satellite configuration, multiplied by 10.
|
short |
vdop
Vertical Dilution Of Precision of the satellite configuration, multiplied by 10.
|
id
Constructor and Description |
---|
OpenTracGpsQuality()
Create an uninitialized OpenTracGpsQuality element.
|
OpenTracGpsQuality(int type,
byte[] body,
int offset,
int length)
Extract a OpenTracGpsQuality element from a byte array
|
OpenTracGpsQuality(int fixType,
int fixValidity,
int numSatellites)
Create an OpenTracGpsQuality element with the specified fix quality.
|
OpenTracGpsQuality(int fixType,
int fixValidity,
int numSatellites,
float hdop,
float pdop,
float vdop)
Create an OpenTracGpsQuality element with the specified fix quality and DOP.
|
Modifier and Type | Method and Description |
---|---|
int |
computeBody(byte[] buf,
int offset)
Append this element to a message buffer
|
boolean |
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.
|
java.lang.String |
valueString()
Get the string representation of the value of this element.
|
getId, toString
public byte fixType
value | meaning |
---|---|
0 | unknown or not available |
1 | no position fix |
2 | 2D fix |
3 | 3D fix |
public byte fixValidity
value | meaning |
---|---|
0 | invalid |
1 | valid SPS (Standard Positioning Service) |
2 | value DGPS (Differential GPS) |
3 | valid PPS |
public byte numSatellites
public short hdop
public short pdop
public short vdop
public OpenTracGpsQuality()
public OpenTracGpsQuality(int type, byte[] body, int offset, int length)
type
- OpenTracTypes code for this elementbody
- byte array to extract element fromoffset
- zero-based array index to start extractionlength
- number of bytes to extractpublic OpenTracGpsQuality(int fixType, int fixValidity, int numSatellites) throws java.lang.IllegalArgumentException
fixType
- int fix type code in the range 0 to 3fixValidity
- int fix validity code in the range 0 to 3numSatellites
- int number of satellites in use in the range 0 to 15java.lang.IllegalArgumentException
- if fixType, fixQuality, or numSatellites is out of rangepublic OpenTracGpsQuality(int fixType, int fixValidity, int numSatellites, float hdop, float pdop, float vdop) throws java.lang.IllegalArgumentException
fixType
- int fix type code in the range 0 to 3fixValidity
- int fix validity code in the range 0 to 3numSatellites
- int number of satellites in use in the range 0 to 15hdop
- float horizontal dilution of precision in the range 0 to 25.5pdop
- float position dilution of precision in the range 0 to 25.5vdop
- float vertical dilution of precision in the range 0 to 25.5java.lang.IllegalArgumentException
- if fixType, fixQuality, or numSatellites is out of rangepublic int computeBody(byte[] buf, int offset)
computeBody
in class OpenTracElement
buf
- byte array to add the element tooffset
- starting index to store the elementpublic java.lang.String valueString()
valueString
in class OpenTracElement
public int length()
length
in class OpenTracElement
public boolean equalsElement(OpenTracElement other)
equalsElement
in class OpenTracElement
other
- OpenTracElement to compare against this element