public
final
class
GnssMeasurement
extends Object
implements
Parcelable
java.lang.Object | |
↳ | android.location.GnssMeasurement |
A class representing a GNSS satellite measurement, containing raw and computed information.
Constants | |
---|---|
int |
ADR_STATE_CYCLE_SLIP
The state of the 'Accumulated Delta Range' has a cycle slip detected. |
int |
ADR_STATE_RESET
The state of the 'Accumulated Delta Range' has detected a reset. |
int |
ADR_STATE_UNKNOWN
The state of the 'Accumulated Delta Range' is invalid or unknown. |
int |
ADR_STATE_VALID
The state of the 'Accumulated Delta Range' is valid. |
int |
MULTIPATH_INDICATOR_DETECTED
The measurement shows signs of multi-path. |
int |
MULTIPATH_INDICATOR_NOT_DETECTED
The measurement shows no signs of multi-path. |
int |
MULTIPATH_INDICATOR_UNKNOWN
The indicator is not available or the presence or absence of multipath is unknown. |
int |
STATE_BDS_D2_BIT_SYNC
This Beidou measurement's tracking state has D2 bit sync. |
int |
STATE_BDS_D2_SUBFRAME_SYNC
This Beidou measurement's tracking state has D2 sub-frame sync. |
int |
STATE_BIT_SYNC
This GNSS measurement's tracking state has bit sync. |
int |
STATE_CODE_LOCK
This GNSS measurement's tracking state has code lock. |
int |
STATE_GAL_E1BC_CODE_LOCK
This Galileo measurement's tracking state has E1B/C code lock. |
int |
STATE_GAL_E1B_PAGE_SYNC
This Galileo measurement's tracking state has E1B page sync. |
int |
STATE_GAL_E1C_2ND_CODE_LOCK
This Galileo measurement's tracking state has E1C secondary code lock. |
int |
STATE_GLO_STRING_SYNC
This Glonass measurement's tracking state has string sync. |
int |
STATE_GLO_TOD_DECODED
This Glonass measurement's tracking state has time-of-day decoded. |
int |
STATE_MSEC_AMBIGUOUS
This GNSS measurement's tracking state contains millisecond ambiguity. |
int |
STATE_SBAS_SYNC
This SBAS measurement's tracking state has whole second level sync. |
int |
STATE_SUBFRAME_SYNC
This GNSS measurement's tracking state has sub-frame sync. |
int |
STATE_SYMBOL_SYNC
This GNSS measurement's tracking state has symbol sync. |
int |
STATE_TOW_DECODED
This GNSS measurement's tracking state has time-of-week decoded. |
int |
STATE_UNKNOWN
This GNSS measurement's tracking state is invalid or unknown. |
Inherited constants |
---|
From
interface
android.os.Parcelable
|
Fields | |
---|---|
public
static
final
Creator<GnssMeasurement> |
CREATOR
|
Public methods | |
---|---|
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()
Returns |
boolean
|
hasCarrierFrequencyHz()
Returns |
boolean
|
hasCarrierPhase()
Returns |
boolean
|
hasCarrierPhaseUncertainty()
Returns |
boolean
|
hasSnrInDb()
Returns |
String
|
toString()
Returns a string representation of the object. |
void
|
writeToParcel(Parcel parcel, int flags)
Flatten this object in to a Parcel. |
Inherited methods | |
---|---|
From
class
java.lang.Object
| |
From
interface
android.os.Parcelable
|
int ADR_STATE_CYCLE_SLIP
The state of the 'Accumulated Delta Range' has a cycle slip detected.
Constant Value: 4 (0x00000004)
int ADR_STATE_RESET
The state of the 'Accumulated Delta Range' has detected a reset.
Constant Value: 2 (0x00000002)
int ADR_STATE_UNKNOWN
The state of the 'Accumulated Delta Range' is invalid or unknown.
Constant Value: 0 (0x00000000)
int ADR_STATE_VALID
The state of the 'Accumulated Delta Range' is valid.
Constant Value: 1 (0x00000001)
int MULTIPATH_INDICATOR_DETECTED
The measurement shows signs of multi-path.
Constant Value: 1 (0x00000001)
int MULTIPATH_INDICATOR_NOT_DETECTED
The measurement shows no signs of multi-path.
Constant Value: 2 (0x00000002)
int MULTIPATH_INDICATOR_UNKNOWN
The indicator is not available or the presence or absence of multipath is unknown.
Constant Value: 0 (0x00000000)
int STATE_BDS_D2_BIT_SYNC
This Beidou measurement's tracking state has D2 bit sync.
Constant Value: 256 (0x00000100)
int STATE_BDS_D2_SUBFRAME_SYNC
This Beidou measurement's tracking state has D2 sub-frame sync.
Constant Value: 512 (0x00000200)
int STATE_BIT_SYNC
This GNSS measurement's tracking state has bit sync.
Constant Value: 2 (0x00000002)
int STATE_CODE_LOCK
This GNSS measurement's tracking state has code lock.
Constant Value: 1 (0x00000001)
int STATE_GAL_E1BC_CODE_LOCK
This Galileo measurement's tracking state has E1B/C code lock.
Constant Value: 1024 (0x00000400)
int STATE_GAL_E1B_PAGE_SYNC
This Galileo measurement's tracking state has E1B page sync.
Constant Value: 4096 (0x00001000)
int STATE_GAL_E1C_2ND_CODE_LOCK
This Galileo measurement's tracking state has E1C secondary code lock.
Constant Value: 2048 (0x00000800)
int STATE_GLO_STRING_SYNC
This Glonass measurement's tracking state has string sync.
Constant Value: 64 (0x00000040)
int STATE_GLO_TOD_DECODED
This Glonass measurement's tracking state has time-of-day decoded.
Constant Value: 128 (0x00000080)
int STATE_MSEC_AMBIGUOUS
This GNSS measurement's tracking state contains millisecond ambiguity.
Constant Value: 16 (0x00000010)
int STATE_SBAS_SYNC
This SBAS measurement's tracking state has whole second level sync.
Constant Value: 8192 (0x00002000)
int STATE_SUBFRAME_SYNC
This GNSS measurement's tracking state has sub-frame sync.
Constant Value: 4 (0x00000004)
int STATE_SYMBOL_SYNC
This GNSS measurement's tracking state has symbol sync.
Constant Value: 32 (0x00000020)
int STATE_TOW_DECODED
This GNSS measurement's tracking state has time-of-week decoded.
Constant Value: 8 (0x00000008)
int STATE_UNKNOWN
This GNSS measurement's tracking state is invalid or unknown.
Constant Value: 0 (0x00000000)
int describeContents ()
Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation. For example, if the object will
include a file descriptor in the output of writeToParcel(Parcel, int)
,
the return value of this method must include the
CONTENTS_FILE_DESCRIPTOR
bit.
Returns | |
---|---|
int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. |
double getAccumulatedDeltaRangeMeters ()
Gets the accumulated delta range since the last channel reset, in meters.
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)
Returns | |
---|---|
double |
int getAccumulatedDeltaRangeState ()
Gets 'Accumulated Delta Range' state.
It indicates whether getAccumulatedDeltaRangeMeters()
is reset or there is a
cycle slip (indicating 'loss of lock').
Returns | |
---|---|
int |
double getAccumulatedDeltaRangeUncertaintyMeters ()
Gets the accumulated delta range's uncertainty (1-Sigma) in meters.
The uncertainty is represented as an absolute (single sided) value.
The status of the value is represented by getAccumulatedDeltaRangeState()
.
Returns | |
---|---|
double |
long getCarrierCycles ()
The number of full carrier cycles between the satellite and the receiver.
The reference frequency is given by the value of getCarrierFrequencyHz()
.
The value is only available if hasCarrierCycles()
is true
.
Returns | |
---|---|
long |
float getCarrierFrequencyHz ()
Gets the carrier frequency at which codes and messages are modulated.
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
.
Returns | |
---|---|
float |
double getCarrierPhase ()
Gets the RF phase detected by the receiver.
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
.
Returns | |
---|---|
double |
double getCarrierPhaseUncertainty ()
Gets the carrier-phase's uncertainty (1-Sigma).
The uncertainty is represented as an absolute (single sided) value.
The value is only available if hasCarrierPhaseUncertainty()
is true
.
Returns | |
---|---|
double |
double getCn0DbHz ()
Gets the Carrier-to-noise density in dB-Hz.
Typical range: 10-50 db-Hz.
The value contains the measured C/N0 for the signal at the antenna input.
Returns | |
---|---|
double |
int getConstellationType ()
Gets the constellation type.
The return value is one of those constants with CONSTELLATION_
prefix in
GnssStatus
.
Returns | |
---|---|
int |
int getMultipathIndicator ()
Gets a value indicating the 'multipath' state of the event.
Returns | |
---|---|
int |
double getPseudorangeRateMetersPerSecond ()
Gets the Pseudorange rate at the timestamp in m/s.
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)
Returns | |
---|---|
double |
double getPseudorangeRateUncertaintyMetersPerSecond ()
Gets the pseudorange's rate uncertainty (1-Sigma) in m/s.
The uncertainty is represented as an absolute (single sided) value.
Returns | |
---|---|
double |
long getReceivedSvTimeNanos ()
Gets the received GNSS satellite time, at the measurement time, in nanoseconds.
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
Returns | |
---|---|
long |
long getReceivedSvTimeUncertaintyNanos ()
Gets the error estimate (1-sigma) for the received GNSS time, in nanoseconds.
Returns | |
---|---|
long |
double getSnrInDb ()
Gets the Signal-to-Noise ratio (SNR) in dB.
The value is only available if hasSnrInDb()
is true
.
Returns | |
---|---|
double |
int getState ()
Gets per-satellite sync state.
It represents the current sync state for the associated satellite.
This value helps interpret getReceivedSvTimeNanos()
.
Returns | |
---|---|
int |
int getSvid ()
Gets the satellite ID.
Interpretation depends on getConstellationType()
.
See getSvid(int)
.
Returns | |
---|---|
int |
double getTimeOffsetNanos ()
Gets the time offset at which the measurement was taken in nanoseconds.
The reference receiver's time from which this is offset is specified by
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.
Returns | |
---|---|
double |
boolean hasCarrierCycles ()
Returns true
if getCarrierCycles()
is available, false
otherwise.
Returns | |
---|---|
boolean |
boolean hasCarrierFrequencyHz ()
Returns true
if getCarrierFrequencyHz()
is available, false
otherwise.
Returns | |
---|---|
boolean |
boolean hasCarrierPhase ()
Returns true
if getCarrierPhase()
is available, false
otherwise.
Returns | |
---|---|
boolean |
boolean hasCarrierPhaseUncertainty ()
Returns true
if getCarrierPhaseUncertainty()
is available, false
otherwise.
Returns | |
---|---|
boolean |
boolean hasSnrInDb ()
Returns true
if getSnrInDb()
is available, false
otherwise.
Returns | |
---|---|
boolean |
String toString ()
Returns a string representation of the object. In general, the
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())
Returns | |
---|---|
String |
a string representation of the object. |
void writeToParcel (Parcel parcel, int flags)
Flatten this object in to a Parcel.
Parameters | |
---|---|
parcel |
Parcel :
The Parcel in which the object should be written. |
flags |
int :
Additional flags about how the object should be written.
May be 0 or PARCELABLE_WRITE_RETURN_VALUE .
|