public final class GnssMeasurement extends Object implements Parcelable
Modifier and Type | Class and Description |
---|---|
static interface |
GnssMeasurement.MultipathIndicator
The status of the multipath indicator.
|
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static int |
ADR_STATE_CYCLE_SLIP
The state of the 'Accumulated Delta Range' has a cycle slip detected.
|
static int |
ADR_STATE_RESET
The state of the 'Accumulated Delta Range' has detected a reset.
|
static int |
ADR_STATE_UNKNOWN
The state of the 'Accumulated Delta Range' is invalid or unknown.
|
static int |
ADR_STATE_VALID
The state of the 'Accumulated Delta Range' is valid.
|
static Parcelable.Creator<GnssMeasurement> |
CREATOR |
static int |
MULTIPATH_INDICATOR_DETECTED
The measurement shows signs of multi-path.
|
static int |
MULTIPATH_INDICATOR_NOT_DETECTED
The measurement shows no signs of multi-path.
|
static int |
MULTIPATH_INDICATOR_NOT_USED |
static int |
MULTIPATH_INDICATOR_UNKNOWN
The indicator is not available or the presence or absence of multipath is unknown.
|
static int |
STATE_BDS_D2_BIT_SYNC
This Beidou measurement's tracking state has D2 bit sync.
|
static int |
STATE_BDS_D2_SUBFRAME_SYNC
This Beidou measurement's tracking state has D2 sub-frame sync.
|
static int |
STATE_BIT_SYNC
This GNSS measurement's tracking state has bit sync.
|
static int |
STATE_CODE_LOCK
This GNSS measurement's tracking state has code lock.
|
static int |
STATE_GAL_E1B_PAGE_SYNC
This Galileo measurement's tracking state has E1B page sync.
|
static int |
STATE_GAL_E1BC_CODE_LOCK
This Galileo measurement's tracking state has E1B/C code lock.
|
static int |
STATE_GAL_E1C_2ND_CODE_LOCK
This Galileo measurement's tracking state has E1C secondary code lock.
|
static int |
STATE_GLO_STRING_SYNC
This Glonass measurement's tracking state has string sync.
|
static int |
STATE_GLO_TOD_DECODED
This Glonass measurement's tracking state has time-of-day decoded.
|
static int |
STATE_MSEC_AMBIGUOUS
This GNSS measurement's tracking state contains millisecond ambiguity.
|
static int |
STATE_SBAS_SYNC
This SBAS measurement's tracking state has whole second level sync.
|
static int |
STATE_SUBFRAME_SYNC
This GNSS measurement's tracking state has sub-frame sync.
|
static int |
STATE_SYMBOL_SYNC
This GNSS measurement's tracking state has symbol sync.
|
static int |
STATE_TOW_DECODED
This GNSS measurement's tracking state has time-of-week decoded.
|
static int |
STATE_UNKNOWN
This GNSS measurement's tracking state is invalid or unknown.
|
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_ELIDE_DUPLICATES, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
GnssMeasurement() |
Modifier and Type | Method and Description |
---|---|
int |
describeContents()
Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation.
|
double |
getAccumulatedDeltaRangeMeters()
Gets the accumulated delta range since the last channel reset, in meters.
|
int |
getAccumulatedDeltaRangeState()
Gets 'Accumulated Delta Range' state.
|
double |
getAccumulatedDeltaRangeUncertaintyMeters()
Gets the accumulated delta range's uncertainty (1-Sigma) in meters.
|
long |
getCarrierCycles()
The number of full carrier cycles between the satellite and the receiver.
|
float |
getCarrierFrequencyHz()
Gets the carrier frequency at which codes and messages are modulated.
|
double |
getCarrierPhase()
Gets the RF phase detected by the receiver.
|
double |
getCarrierPhaseUncertainty()
Gets the carrier-phase's uncertainty (1-Sigma).
|
double |
getCn0DbHz()
Gets the Carrier-to-noise density in dB-Hz.
|
int |
getConstellationType()
Gets the constellation type.
|
int |
getMultipathIndicator()
Gets a value indicating the 'multipath' state of the event.
|
double |
getPseudorangeRateMetersPerSecond()
Gets the Pseudorange rate at the timestamp in m/s.
|
double |
getPseudorangeRateUncertaintyMetersPerSecond()
Gets the pseudorange's rate uncertainty (1-Sigma) in m/s.
|
long |
getReceivedSvTimeNanos()
Gets the received GNSS satellite time, at the measurement time, in nanoseconds.
|
long |
getReceivedSvTimeUncertaintyNanos()
Gets the error estimate (1-sigma) for the received GNSS time, in nanoseconds.
|
double |
getSnrInDb()
Gets the Signal-to-Noise ratio (SNR) in dB.
|
int |
getState()
Gets per-satellite sync state.
|
int |
getSvid()
Gets the satellite ID.
|
double |
getTimeOffsetNanos()
Gets the time offset at which the measurement was taken in nanoseconds.
|
boolean |
hasCarrierCycles()
|
boolean |
hasCarrierFrequencyHz()
|
boolean |
hasCarrierPhase()
|
boolean |
hasCarrierPhaseUncertainty()
|
boolean |
hasSnrInDb()
|
void |
reset()
Resets all the contents to its original state.
|
void |
resetCarrierCycles()
Resets the number of full carrier cycles between the satellite and the receiver.
|
void |
resetCarrierFrequencyHz()
Resets the Carrier frequency (L1 or L2) in Hz.
|
void |
resetCarrierPhase()
Resets the RF phase detected by the receiver.
|
void |
resetCarrierPhaseUncertainty()
Resets the Carrier-phase's uncertainty (1-Sigma) in cycles.
|
void |
resetSnrInDb()
Resets the Signal-to-noise ratio (SNR) in dB.
|
void |
set(GnssMeasurement measurement)
Sets all contents to the values stored in the provided object.
|
void |
setAccumulatedDeltaRangeMeters(double value)
Sets the accumulated delta range in meters.
|
void |
setAccumulatedDeltaRangeState(int value)
Sets the 'Accumulated Delta Range' state.
|
void |
setAccumulatedDeltaRangeUncertaintyMeters(double value)
Sets the accumulated delta range's uncertainty (1-sigma) in meters.
|
void |
setCarrierCycles(long value)
Sets the number of full carrier cycles between the satellite and the receiver.
|
void |
setCarrierFrequencyHz(float carrierFrequencyHz)
Sets the Carrier frequency (L1 or L2) in Hz.
|
void |
setCarrierPhase(double value)
Sets the RF phase detected by the receiver.
|
void |
setCarrierPhaseUncertainty(double value)
Sets the Carrier-phase's uncertainty (1-Sigma) in cycles.
|
void |
setCn0DbHz(double value)
Sets the carrier-to-noise density in dB-Hz.
|
void |
setConstellationType(int value)
Sets the constellation type.
|
void |
setMultipathIndicator(int value)
Sets the 'multi-path' indicator.
|
void |
setPseudorangeRateMetersPerSecond(double value)
Sets the pseudorange rate at the timestamp in m/s.
|
void |
setPseudorangeRateUncertaintyMetersPerSecond(double value)
Sets the pseudorange's rate uncertainty (1-Sigma) in m/s.
|
void |
setReceivedSvTimeNanos(long value)
Sets the received GNSS time in nanoseconds.
|
void |
setReceivedSvTimeUncertaintyNanos(long value)
Sets the received GNSS time uncertainty (1-Sigma) in nanoseconds.
|
void |
setSnrInDb(double snrInDb)
Sets the Signal-to-noise ratio (SNR) in dB.
|
void |
setState(int value)
Sets the sync state.
|
void |
setSvid(int value)
Sets the Satellite ID.
|
void |
setTimeOffsetNanos(double value)
Sets the time offset at which the measurement was taken in nanoseconds.
|
String |
toString()
Returns a string representation of the object.
|
void |
writeToParcel(Parcel parcel,
int flags)
Flatten this object in to a Parcel.
|
public static final int MULTIPATH_INDICATOR_UNKNOWN
public static final int MULTIPATH_INDICATOR_DETECTED
public static final int MULTIPATH_INDICATOR_NOT_DETECTED
public static final int MULTIPATH_INDICATOR_NOT_USED
public static final int STATE_UNKNOWN
public static final int STATE_CODE_LOCK
public static final int STATE_BIT_SYNC
public static final int STATE_SUBFRAME_SYNC
public static final int STATE_TOW_DECODED
public static final int STATE_MSEC_AMBIGUOUS
public static final int STATE_SYMBOL_SYNC
public static final int STATE_GLO_STRING_SYNC
public static final int STATE_GLO_TOD_DECODED
public static final int STATE_BDS_D2_BIT_SYNC
public static final int STATE_BDS_D2_SUBFRAME_SYNC
public static final int STATE_GAL_E1BC_CODE_LOCK
public static final int STATE_GAL_E1C_2ND_CODE_LOCK
public static final int STATE_GAL_E1B_PAGE_SYNC
public static final int STATE_SBAS_SYNC
public static final int ADR_STATE_UNKNOWN
public static final int ADR_STATE_VALID
public static final int ADR_STATE_RESET
public static final int ADR_STATE_CYCLE_SLIP
public static final Parcelable.Creator<GnssMeasurement> CREATOR
public void set(GnssMeasurement measurement)
public void reset()
public int getSvid()
Interpretation depends on getConstellationType()
.
See GnssStatus.getSvid(int)
.
public void setSvid(int value)
public int getConstellationType()
The return value is one of those constants with CONSTELLATION_
prefix in
GnssStatus
.
public void setConstellationType(int value)
public double getTimeOffsetNanos()
The reference receiver's time from which this is offset is specified by
GnssClock.getTimeNanos()
.
The sign of this value is given by the following equation:
measurement time = TimeNanos + TimeOffsetNanos
The value provides an individual time-stamp for the measurement, and allows sub-nanosecond accuracy.
public void setTimeOffsetNanos(double value)
public int getState()
It represents the current sync state for the associated satellite.
This value helps interpret getReceivedSvTimeNanos()
.
public void setState(int value)
public long getReceivedSvTimeNanos()
For GPS & QZSS, this is:
Given the highest sync state that can be achieved, per each satellite, valid range for this field can be:
Searching : [ 0 ] : STATE_UNKNOWN C/A code lock : [ 0 1ms ] : STATE_CODE_LOCK is set Bit sync : [ 0 20ms ] : STATE_BIT_SYNC is set Subframe sync : [ 0 6s ] : STATE_SUBFRAME_SYNC is set TOW decoded : [ 0 1week ] : STATE_TOW_DECODED is set
Note well: if there is any ambiguity in integer millisecond, STATE_MSEC_AMBIGUOUS
should be set accordingly, in the 'state' field.
This value must be populated if 'state' != STATE_UNKNOWN
.
For Glonass, this is:
Given the highest sync state that can be achieved, per each satellite, valid range for this field can be:
Searching : [ 0 ] : STATE_UNKNOWN C/A code lock : [ 0 1ms ] : STATE_CODE_LOCK is set Symbol sync : [ 0 10ms ] : STATE_SYMBOL_SYNC is set Bit sync : [ 0 20ms ] : STATE_BIT_SYNC is set String sync : [ 0 2s ] : STATE_GLO_STRING_SYNC is set Time of day : [ 0 1day ] : STATE_GLO_TOD_DECODED is set
For Beidou, this is:
Given the highest sync state that can be achieved, per each satellite, valid range for this field can be:
Searching : [ 0 ] : STATE_UNKNOWN C/A code lock : [ 0 1ms ] : STATE_CODE_LOCK is set Bit sync (D2) : [ 0 2ms ] : STATE_BDS_D2_BIT_SYNC is set Bit sync (D1) : [ 0 20ms ] : STATE_BIT_SYNC is set Subframe (D2) : [ 0 0.6s ] : STATE_BDS_D2_SUBFRAME_SYNC is set Subframe (D1) : [ 0 6s ] : STATE_SUBFRAME_SYNC is set Time of week : [ 0 1week ] : STATE_TOW_DECODED is set
For Galileo, this is:
E1BC code lock : [ 0 4ms ] : STATE_GAL_E1BC_CODE_LOCK is set E1C 2nd code lock: [ 0 100ms ] : STATE_GAL_E1C_2ND_CODE_LOCK is set E1B page : [ 0 2s ] : STATE_GAL_E1B_PAGE_SYNC is set Time of week : [ 0 1week ] : STATE_GAL_TOW_DECODED is set
For SBAS, this is:
Given the highest sync state that can be achieved, per each satellite, valid range for this field can be:
Searching : [ 0 ] : STATE_UNKNOWN C/A code lock : [ 0 1ms ] : STATE_CODE_LOCK is set Symbol sync : [ 0 2ms ] : STATE_SYMBOL_SYNC is set Message : [ 0 1s ] : STATE_SBAS_SYNC is set
public void setReceivedSvTimeNanos(long value)
public long getReceivedSvTimeUncertaintyNanos()
public void setReceivedSvTimeUncertaintyNanos(long value)
public double getCn0DbHz()
Typical range: 10-50 db-Hz.
The value contains the measured C/N0 for the signal at the antenna input.
public void setCn0DbHz(double value)
public double getPseudorangeRateMetersPerSecond()
The error estimate for this value is
getPseudorangeRateUncertaintyMetersPerSecond()
.
The value is uncorrected, i.e. corrections for receiver and satellite clock frequency errors are not included.
A positive 'uncorrected' value indicates that the SV is moving away from the receiver. The sign of the 'uncorrected' 'pseudorange rate' and its relation to the sign of 'doppler shift' is given by the equation:
pseudorange rate = -k * doppler shift (where k is a constant)
public void setPseudorangeRateMetersPerSecond(double value)
public double getPseudorangeRateUncertaintyMetersPerSecond()
The uncertainty is represented as an absolute (single sided) value.
public void setPseudorangeRateUncertaintyMetersPerSecond(double value)
public int getAccumulatedDeltaRangeState()
It indicates whether getAccumulatedDeltaRangeMeters()
is reset or there is a
cycle slip (indicating 'loss of lock').
public void setAccumulatedDeltaRangeState(int value)
public double getAccumulatedDeltaRangeMeters()
The error estimate for this value is getAccumulatedDeltaRangeUncertaintyMeters()
.
The availability of the value is represented by getAccumulatedDeltaRangeState()
.
A positive value indicates that the SV is moving away from the receiver.
The sign of getAccumulatedDeltaRangeMeters()
and its relation to the sign of
getCarrierPhase()
is given by the equation:
accumulated delta range = -k * carrier phase (where k is a constant)
public void setAccumulatedDeltaRangeMeters(double value)
public double getAccumulatedDeltaRangeUncertaintyMeters()
The uncertainty is represented as an absolute (single sided) value.
The status of the value is represented by getAccumulatedDeltaRangeState()
.
public void setAccumulatedDeltaRangeUncertaintyMeters(double value)
The status of the value is represented by getAccumulatedDeltaRangeState()
.
public boolean hasCarrierFrequencyHz()
public float getCarrierFrequencyHz()
For GPS, e.g., it can be L1 or L2. If the field is not set, it is the primary common use frequency, e.g. L1 for GPS.
The value is only available if hasCarrierFrequencyHz()
is true
.
public void setCarrierFrequencyHz(float carrierFrequencyHz)
public void resetCarrierFrequencyHz()
public boolean hasCarrierCycles()
public long getCarrierCycles()
The reference frequency is given by the value of getCarrierFrequencyHz()
.
The value is only available if hasCarrierCycles()
is true
.
public void setCarrierCycles(long value)
public void resetCarrierCycles()
public boolean hasCarrierPhase()
public double getCarrierPhase()
Range: [0.0, 1.0].
This is the fractional part of the complete carrier phase measurement.
The reference frequency is given by the value of getCarrierFrequencyHz()
.
The error estimate for this value is getCarrierPhaseUncertainty()
.
The value is only available if hasCarrierPhase()
is true
.
public void setCarrierPhase(double value)
public void resetCarrierPhase()
public boolean hasCarrierPhaseUncertainty()
public double getCarrierPhaseUncertainty()
The uncertainty is represented as an absolute (single sided) value.
The value is only available if hasCarrierPhaseUncertainty()
is true
.
public void setCarrierPhaseUncertainty(double value)
public void resetCarrierPhaseUncertainty()
public int getMultipathIndicator()
public void setMultipathIndicator(int value)
public boolean hasSnrInDb()
public double getSnrInDb()
The value is only available if hasSnrInDb()
is true
.
public void setSnrInDb(double snrInDb)
public void resetSnrInDb()
public void writeToParcel(Parcel parcel, int flags)
Parcelable
writeToParcel
in interface Parcelable
parcel
- The Parcel in which the object should be written.flags
- Additional flags about how the object should be written.
May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE
.public int describeContents()
Parcelable
Parcelable.writeToParcel(Parcel, int)
,
the return value of this method must include the
Parcelable.CONTENTS_FILE_DESCRIPTOR
bit.describeContents
in interface Parcelable
Parcelable.CONTENTS_FILE_DESCRIPTOR
public String toString()
Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())