public abstract class SubFrame extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static int |
PARITY_SIZE
Size of parity field.
|
static int |
PREAMBLE_VALUE
TLM preamble.
|
protected static int |
WORD_SIZE
Words size.
|
| Modifier | Constructor and Description |
|---|---|
protected |
SubFrame(int[] words,
int nbFields)
Simple constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
checkParity(int previous,
int current)
Check parity.
|
int |
getAlert()
Get alert flag.
|
int |
getAntiSpoofing()
Get anti-spoofing flag.
|
protected int |
getField(int fieldIndex)
Get a field.
|
int |
getId()
Get sub-frame id.
|
int |
getIntegrityStatus()
Get integrity status flag.
|
int |
getMessage()
Get telemetry message.
|
int |
getPreamble()
Get telemetry preamble.
|
int |
getTow()
Get Time Of Week of next 12 second message.
|
boolean |
hasParityErrors()
Check if the sub-frame has parity errors.
|
static SubFrame |
parse(EncodedMessage encodedMessage)
Builder for sub-frames.
|
protected void |
setField(int fieldIndex,
int wordIndex,
int shift,
int nbBits,
int[] words)
Set a field.
|
protected void |
setField(int fieldIndex,
int wordIndexMSB,
int shiftMSB,
int nbBitsMSB,
int wordIndexLSB,
int shiftLSB,
int nbBitsLSB,
int[] words)
Set a field.
|
public static final int PREAMBLE_VALUE
protected static final int WORD_SIZE
protected static final int PARITY_SIZE
protected SubFrame(int[] words,
int nbFields)
words - raw wordsnbFields - number of fields in the sub-frame
(including TLM and HOW data fields, excluding non-information and parity)public static SubFrame parse(EncodedMessage encodedMessage)
This builder creates the proper sub-frame type corresponding to the ID in handover word and the SV Id for sub-frames 4 and 5.
encodedMessage - encoded message containing exactly one sub-frameSubFrame1,
SubFrame2,
SubFrame3,
SubFrame4A0,
SubFrame4A1,
SubFrame4B,
SubFrame4C,
SubFrame4D,
SubFrame4E,
SubFrameAlmanac,
SubFrameDummyAlmanacpublic static boolean checkParity(int previous,
int current)
This implements algorithm in table 20-XIV from IS-GPS-200N
previous - previous 30 bits word (only two least significant bits are used)current - current 30 bits wordpublic boolean hasParityErrors()
protected int getField(int fieldIndex)
The field indices are defined as constants in the various sub-frames classes.
fieldIndex - field index (counting from 0)protected void setField(int fieldIndex,
int wordIndex,
int shift,
int nbBits,
int[] words)
fieldIndex - field index (counting from 0)wordIndex - word index (counting from 1, to match IS-GPS-200 tables)shift - right shift to apply (i.e. number of LSB bits for next fields that should be removed)nbBits - number of bits in the fieldwords - raw 30 bits wordsprotected void setField(int fieldIndex,
int wordIndexMSB,
int shiftMSB,
int nbBitsMSB,
int wordIndexLSB,
int shiftLSB,
int nbBitsLSB,
int[] words)
fieldIndex - field index (counting from 0)wordIndexMSB - word index containing MSB (counting from 1, to match IS-GPS-200 tables)shiftMSB - right shift to apply to MSB (i.e. number of LSB bits for next fields that should be removed)nbBitsMSB - number of bits in the MSBwordIndexLSB - word index containing LSB (counting from 1, to match IS-GPS-200 tables)shiftLSB - right shift to apply to LSB (i.e. number of LSB bits for next fields that should be removed)nbBitsLSB - number of bits in the LSBwords - raw 30 bits wordspublic int getPreamble()
public int getMessage()
public int getIntegrityStatus()
public int getTow()
public int getAlert()
public int getAntiSpoofing()
public int getId()
Copyright © 2002-2023 CS GROUP. All rights reserved.