public class GpsMeasurement extends Object implements Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static short |
ADR_STATE_CYCLE_SLIP
The state of the 'Accumulated Delta Range' has a cycle slip detected.
|
static short |
ADR_STATE_RESET
The state of the 'Accumulated Delta Range' has detected a reset.
|
static short |
ADR_STATE_UNKNOWN
The state of the 'Accumulated Delta Range' is invalid or unknown.
|
static short |
ADR_STATE_VALID
The state of the 'Accumulated Delta Range' is valid.
|
static Parcelable.Creator<GpsMeasurement> |
CREATOR |
static byte |
LOSS_OF_LOCK_CYCLE_SLIP
'Loss of lock' detected between the previous and current observation: cycle slip possible.
|
static byte |
LOSS_OF_LOCK_OK
The measurement does not present any indication of 'loss of lock'.
|
static byte |
LOSS_OF_LOCK_UNKNOWN
The indicator is not available or it is unknown.
|
static byte |
MULTIPATH_INDICATOR_DETECTED
The measurement has been indicated to use multi-path.
|
static byte |
MULTIPATH_INDICATOR_NOT_USED
The measurement has been indicated not tu use multi-path.
|
static byte |
MULTIPATH_INDICATOR_UNKNOWN
The indicator is not available or it is unknown.
|
static short |
STATE_BIT_SYNC
The state of the GPS receiver is in bit sync.
|
static short |
STATE_CODE_LOCK
The state of the GPS receiver is ranging code lock.
|
static short |
STATE_MSEC_AMBIGUOUS
The state of the GPS receiver contains millisecond ambiguity.
|
static short |
STATE_SUBFRAME_SYNC
The state of the GPS receiver is in sub-frame sync.
|
static short |
STATE_TOW_DECODED
The state of the GPS receiver has TOW decoded.
|
static short |
STATE_UNKNOWN
The state of GPS receiver the measurement is invalid or unknown.
|
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_ELIDE_DUPLICATES, PARCELABLE_WRITE_RETURN_VALUE
Modifier and Type | Method and Description |
---|---|
int |
describeContents()
Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation.
|
double |
getAccumulatedDeltaRangeInMeters()
Gets the accumulated delta range since the last channel reset, in meters.
|
short |
getAccumulatedDeltaRangeState()
Gets 'Accumulated Delta Range' state.
|
double |
getAccumulatedDeltaRangeUncertaintyInMeters()
Gets the accumulated delta range's uncertainty (1-Sigma) in meters.
|
double |
getAzimuthInDeg()
Gets the azimuth in degrees.
|
double |
getAzimuthUncertaintyInDeg()
Gets the azimuth's uncertainty (1-Sigma) in degrees.
|
int |
getBitNumber()
Gets the number of GPS bits transmitted since Sat-Sun midnight (GPS week).
|
long |
getCarrierCycles()
The number of full carrier cycles between the satellite and the receiver.
|
float |
getCarrierFrequencyInHz()
Gets the carrier frequency at which codes and messages are modulated, it can be L1 or L2.
|
double |
getCarrierPhase()
Gets the RF phase detected by the receiver.
|
double |
getCarrierPhaseUncertainty()
Gets the carrier-phase's uncertainty (1-Sigma).
|
double |
getCn0InDbHz()
Gets the Carrier-to-noise density in dB-Hz.
|
double |
getCodePhaseInChips()
Gets the fraction of the current C/A code cycle.
|
double |
getCodePhaseUncertaintyInChips()
Gets the code-phase's uncertainty (1-Sigma) as a fraction of chips.
|
double |
getDopplerShiftInHz()
Gets the Doppler Shift in Hz.
|
double |
getDopplerShiftUncertaintyInHz()
Gets the Doppler's Shift uncertainty (1-Sigma) in Hz.
|
double |
getElevationInDeg()
Gets the Elevation in degrees.
|
double |
getElevationUncertaintyInDeg()
Gets the elevation's uncertainty (1-Sigma) in degrees.
|
byte |
getLossOfLock()
Gets a value indicating the 'loss of lock' state of the event.
|
byte |
getMultipathIndicator()
Gets a value indicating the 'multipath' state of the event.
|
byte |
getPrn()
Gets the Pseudo-random number (PRN).
|
double |
getPseudorangeInMeters()
Gets the best derived pseudorange by the chipset, in meters.
|
double |
getPseudorangeRateInMetersPerSec()
Gets the Pseudorange rate at the timestamp in m/s.
|
double |
getPseudorangeRateUncertaintyInMetersPerSec()
Gets the pseudorange's rate uncertainty (1-Sigma) in m/s.
|
double |
getPseudorangeUncertaintyInMeters()
Gets the pseudorange's uncertainty (1-Sigma) in meters.
|
long |
getReceivedGpsTowInNs()
Gets the received GPS Time-of-Week at the measurement time, in nanoseconds.
|
long |
getReceivedGpsTowUncertaintyInNs()
Gets the received GPS time-of-week's uncertainty (1-Sigma) in nanoseconds.
|
double |
getSnrInDb()
Gets the Signal-to-Noise ratio (SNR) in dB.
|
short |
getState()
Gets per-satellite sync state.
|
short |
getTimeFromLastBitInMs()
Gets the elapsed time since the last received bit in milliseconds.
|
double |
getTimeOffsetInNs()
Gets the time offset at which the measurement was taken in nanoseconds.
|
boolean |
hasAzimuthInDeg()
Returns true if
getAzimuthInDeg() is available, false otherwise. |
boolean |
hasAzimuthUncertaintyInDeg()
Returns true if
getAzimuthUncertaintyInDeg() is available, false otherwise. |
boolean |
hasBitNumber()
Returns true if
getBitNumber() is available, false otherwise. |
boolean |
hasCarrierCycles()
Returns true if
getCarrierCycles() is available, false otherwise. |
boolean |
hasCarrierFrequencyInHz()
Returns true if
getCarrierFrequencyInHz() is available, false otherwise. |
boolean |
hasCarrierPhase()
Returns true if
getCarrierPhase() is available, false otherwise. |
boolean |
hasCarrierPhaseUncertainty()
Returns true if
getCarrierPhaseUncertainty() is available, false otherwise. |
boolean |
hasCodePhaseInChips()
Returns true if
getCodePhaseInChips() is available, false otherwise. |
boolean |
hasCodePhaseUncertaintyInChips()
Returns true if
getCodePhaseUncertaintyInChips() is available, false otherwise. |
boolean |
hasDopplerShiftInHz()
Returns true if
getDopplerShiftInHz() is available, false otherwise. |
boolean |
hasDopplerShiftUncertaintyInHz()
Returns true if
getDopplerShiftUncertaintyInHz() is available, false otherwise. |
boolean |
hasElevationInDeg()
Returns true if
getElevationInDeg() is available, false otherwise. |
boolean |
hasElevationUncertaintyInDeg()
Returns true if
getElevationUncertaintyInDeg() is available, false otherwise. |
boolean |
hasPseudorangeInMeters()
Returns true if
getPseudorangeInMeters() is available, false otherwise. |
boolean |
hasPseudorangeUncertaintyInMeters()
Returns true if
getPseudorangeUncertaintyInMeters() is available, false otherwise. |
boolean |
hasSnrInDb()
Returns true if
getSnrInDb() is available, false otherwise. |
boolean |
hasTimeFromLastBitInMs()
Returns true if
getTimeFromLastBitInMs() is available, false otherwise. |
boolean |
isPseudorangeRateCorrected()
See
getPseudorangeRateInMetersPerSec() for more details. |
boolean |
isUsedInFix()
Gets a flag indicating whether the GPS represented by the measurement was used for computing
the most recent fix.
|
void |
reset()
Resets all the contents to its original state.
|
void |
resetAzimuthInDeg()
Resets the Azimuth in degrees.
|
void |
resetAzimuthUncertaintyInDeg()
Resets the Azimuth's uncertainty (1-Sigma) in degrees.
|
void |
resetBitNumber()
Resets the bit number within the broadcast frame.
|
void |
resetCarrierCycles()
Resets the number of full carrier cycles between the satellite and the receiver.
|
void |
resetCarrierFrequencyInHz()
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 |
resetCodePhaseInChips()
Resets the Code-phase in chips.
|
void |
resetCodePhaseUncertaintyInChips()
Resets the Code-phase's uncertainty (1-Sigma) in fractions of chips.
|
void |
resetDopplerShiftInHz()
Resets the Doppler shift in Hz.
|
void |
resetDopplerShiftUncertaintyInHz()
Resets the Doppler's shift uncertainty (1-Sigma) in Hz.
|
void |
resetElevationInDeg()
Resets the Elevation in degrees.
|
void |
resetElevationUncertaintyInDeg()
Resets the elevation's uncertainty (1-Sigma) in degrees.
|
void |
resetPseudorangeInMeters()
Resets the Pseudo-range in meters.
|
void |
resetPseudorangeUncertaintyInMeters()
Resets the pseudo-range's uncertainty (1-Sigma) in meters.
|
void |
resetSnrInDb()
Resets the Signal-to-noise ratio (SNR) in dB.
|
void |
resetTimeFromLastBitInMs()
Resets the elapsed time since the last received bit in milliseconds.
|
void |
set(GpsMeasurement measurement)
Sets all contents to the values stored in the provided object.
|
void |
setAccumulatedDeltaRangeInMeters(double value)
Sets the accumulated delta range in meters.
|
void |
setAccumulatedDeltaRangeState(short value)
Sets the 'Accumulated Delta Range' state.
|
void |
setAccumulatedDeltaRangeUncertaintyInMeters(double value)
Sets the accumulated delta range's uncertainty (1-sigma) in meters.
|
void |
setAzimuthInDeg(double value)
Sets the Azimuth in degrees.
|
void |
setAzimuthUncertaintyInDeg(double value)
Sets the Azimuth's uncertainty (1-Sigma) in degrees.
|
void |
setBitNumber(int bitNumber)
Sets the bit number within the broadcast frame.
|
void |
setCarrierCycles(long value)
Sets the number of full carrier cycles between the satellite and the receiver.
|
void |
setCarrierFrequencyInHz(float carrierFrequencyInHz)
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 |
setCn0InDbHz(double value)
Sets the carrier-to-noise density in dB-Hz.
|
void |
setCodePhaseInChips(double value)
Sets the Code-phase in chips.
|
void |
setCodePhaseUncertaintyInChips(double value)
Sets the Code-phase's uncertainty (1-Sigma) in fractions of chips.
|
void |
setDopplerShiftInHz(double value)
Sets the Doppler shift in Hz.
|
void |
setDopplerShiftUncertaintyInHz(double value)
Sets the Doppler's shift uncertainty (1-Sigma) in Hz.
|
void |
setElevationInDeg(double elevationInDeg)
Sets the Elevation in degrees.
|
void |
setElevationUncertaintyInDeg(double value)
Sets the elevation's uncertainty (1-Sigma) in degrees.
|
void |
setLossOfLock(byte value)
Sets the 'loss of lock' status.
|
void |
setMultipathIndicator(byte value)
Sets the 'multi-path' indicator.
|
void |
setPrn(byte value)
Sets the Pseud-random number (PRN).
|
void |
setPseudorangeInMeters(double value)
Sets the Pseudo-range in meters.
|
void |
setPseudorangeRateInMetersPerSec(double value)
Sets the pseudorange rate at the timestamp in m/s.
|
void |
setPseudorangeRateUncertaintyInMetersPerSec(double value)
Sets the pseudorange's rate uncertainty (1-Sigma) in m/s.
|
void |
setPseudorangeUncertaintyInMeters(double value)
Sets the pseudo-range's uncertainty (1-Sigma) in meters.
|
void |
setReceivedGpsTowInNs(long value)
Sets the received GPS time-of-week in nanoseconds.
|
void |
setReceivedGpsTowUncertaintyInNs(long value)
Sets the received GPS time-of-week's uncertainty (1-Sigma) in nanoseconds.
|
void |
setSnrInDb(double snrInDb)
Sets the Signal-to-noise ratio (SNR) in dB.
|
void |
setState(short value)
Sets the sync state.
|
void |
setTimeFromLastBitInMs(short value)
Sets the elapsed time since the last received bit in milliseconds.
|
void |
setTimeOffsetInNs(double value)
Sets the time offset at which the measurement was taken in nanoseconds.
|
void |
setUsedInFix(boolean value)
Sets the Used-in-Fix flag.
|
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 byte LOSS_OF_LOCK_UNKNOWN
public static final byte LOSS_OF_LOCK_OK
public static final byte LOSS_OF_LOCK_CYCLE_SLIP
public static final byte MULTIPATH_INDICATOR_UNKNOWN
public static final byte MULTIPATH_INDICATOR_DETECTED
public static final byte MULTIPATH_INDICATOR_NOT_USED
public static final short STATE_UNKNOWN
public static final short STATE_CODE_LOCK
public static final short STATE_BIT_SYNC
public static final short STATE_SUBFRAME_SYNC
public static final short STATE_TOW_DECODED
public static final short STATE_MSEC_AMBIGUOUS
public static final short ADR_STATE_UNKNOWN
public static final short ADR_STATE_VALID
public static final short ADR_STATE_RESET
public static final short ADR_STATE_CYCLE_SLIP
public static final Parcelable.Creator<GpsMeasurement> CREATOR
public void set(GpsMeasurement measurement)
public void reset()
public byte getPrn()
public void setPrn(byte value)
public double getTimeOffsetInNs()
GpsClock.getTimeInNs()
and should be
interpreted in the same way as indicated by GpsClock.getType()
.
The sign of this value is given by the following equation:
measurement time = time_ns + time_offset_ns
The value provides an individual time-stamp for the measurement, and allows sub-nanosecond
accuracy.public void setTimeOffsetInNs(double value)
public short getState()
getReceivedGpsTowInNs()
.public void setState(short value)
public long getReceivedGpsTowInNs()
getState()
of the GPS receiver, the range of this field can be:
Searching : [ 0 ] : STATE_UNKNOWN
is set
Ranging code lock : [ 0 1 ms ] : STATE_CODE_LOCK
is set
Bit sync : [ 0 20 ms ] : STATE_BIT_SYNC
is set
Subframe sync : [ 0 6 ms ] : STATE_SUBFRAME_SYNC
is set
TOW decoded : [ 0 1 week ] : STATE_TOW_DECODED
is setpublic void setReceivedGpsTowInNs(long value)
public long getReceivedGpsTowUncertaintyInNs()
public void setReceivedGpsTowUncertaintyInNs(long value)
public double getCn0InDbHz()
public void setCn0InDbHz(double value)
public double getPseudorangeRateInMetersPerSec()
getPseudorangeRateUncertaintyInMetersPerSec()
.
The correction of a given Pseudorange Rate value includes corrections from receiver and
satellite clock frequency errors.
isPseudorangeRateCorrected()
identifies the type of value reported.
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
getDopplerShiftInHz()
is given by the equation:
pseudorange rate = -k * doppler shift (where k is a constant)public void setPseudorangeRateInMetersPerSec(double value)
public boolean isPseudorangeRateCorrected()
getPseudorangeRateInMetersPerSec()
for more details.true
if getPseudorangeRateInMetersPerSec()
contains a corrected
value, false
if it contains an uncorrected value.public double getPseudorangeRateUncertaintyInMetersPerSec()
public void setPseudorangeRateUncertaintyInMetersPerSec(double value)
public short getAccumulatedDeltaRangeState()
getAccumulatedDeltaRangeInMeters()
is reset or there is a
cycle slip (indicating 'loss of lock').public void setAccumulatedDeltaRangeState(short value)
public double getAccumulatedDeltaRangeInMeters()
getAccumulatedDeltaRangeUncertaintyInMeters()
.
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 getAccumulatedDeltaRangeInMeters()
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 setAccumulatedDeltaRangeInMeters(double value)
public double getAccumulatedDeltaRangeUncertaintyInMeters()
getAccumulatedDeltaRangeState()
.public void setAccumulatedDeltaRangeUncertaintyInMeters(double value)
getAccumulatedDeltaRangeState()
.public boolean hasPseudorangeInMeters()
getPseudorangeInMeters()
is available, false otherwise.public double getPseudorangeInMeters()
getPseudorangeUncertaintyInMeters()
.
The value is only available if hasPseudorangeInMeters()
is true.public void setPseudorangeInMeters(double value)
public void resetPseudorangeInMeters()
public boolean hasPseudorangeUncertaintyInMeters()
getPseudorangeUncertaintyInMeters()
is available, false otherwise.public double getPseudorangeUncertaintyInMeters()
hasPseudorangeUncertaintyInMeters()
is true.public void setPseudorangeUncertaintyInMeters(double value)
public void resetPseudorangeUncertaintyInMeters()
public boolean hasCodePhaseInChips()
getCodePhaseInChips()
is available, false otherwise.public double getCodePhaseInChips()
getCarrierFrequencyInHz()
.
The reported code-phase includes getCodePhaseUncertaintyInChips()
.
The value is only available if hasCodePhaseInChips()
is true.public void setCodePhaseInChips(double value)
public void resetCodePhaseInChips()
public boolean hasCodePhaseUncertaintyInChips()
getCodePhaseUncertaintyInChips()
is available, false otherwise.public double getCodePhaseUncertaintyInChips()
hasCodePhaseUncertaintyInChips()
is true.public void setCodePhaseUncertaintyInChips(double value)
public void resetCodePhaseUncertaintyInChips()
public boolean hasCarrierFrequencyInHz()
getCarrierFrequencyInHz()
is available, false otherwise.public float getCarrierFrequencyInHz()
hasCarrierFrequencyInHz()
is true.public void setCarrierFrequencyInHz(float carrierFrequencyInHz)
public void resetCarrierFrequencyInHz()
public boolean hasCarrierCycles()
getCarrierCycles()
is available, false otherwise.public long getCarrierCycles()
getCarrierFrequencyInHz()
.
The value is only available if hasCarrierCycles()
is true.public void setCarrierCycles(long value)
public void resetCarrierCycles()
public boolean hasCarrierPhase()
getCarrierPhase()
is available, false otherwise.public double getCarrierPhase()
getCarrierFrequencyInHz()
.
The reported carrier-phase includes getCarrierPhaseUncertainty()
.
The value is only available if hasCarrierPhase()
is true.public void setCarrierPhase(double value)
public void resetCarrierPhase()
public boolean hasCarrierPhaseUncertainty()
getCarrierPhaseUncertainty()
is available, false otherwise.public double getCarrierPhaseUncertainty()
hasCarrierPhaseUncertainty()
is true.public void setCarrierPhaseUncertainty(double value)
public void resetCarrierPhaseUncertainty()
public byte getLossOfLock()
public void setLossOfLock(byte value)
public boolean hasBitNumber()
getBitNumber()
is available, false otherwise.public int getBitNumber()
hasBitNumber()
is true.public void setBitNumber(int bitNumber)
public void resetBitNumber()
public boolean hasTimeFromLastBitInMs()
getTimeFromLastBitInMs()
is available, false otherwise.public short getTimeFromLastBitInMs()
hasTimeFromLastBitInMs()
is true.public void setTimeFromLastBitInMs(short value)
public void resetTimeFromLastBitInMs()
public boolean hasDopplerShiftInHz()
getDopplerShiftInHz()
is available, false otherwise.public double getDopplerShiftInHz()
getCarrierFrequencyInHz()
.
The reported doppler shift includes getDopplerShiftUncertaintyInHz()
.
The value is only available if hasDopplerShiftInHz()
is true.public void setDopplerShiftInHz(double value)
public void resetDopplerShiftInHz()
public boolean hasDopplerShiftUncertaintyInHz()
getDopplerShiftUncertaintyInHz()
is available, false otherwise.public double getDopplerShiftUncertaintyInHz()
hasDopplerShiftUncertaintyInHz()
is true.public void setDopplerShiftUncertaintyInHz(double value)
public void resetDopplerShiftUncertaintyInHz()
public byte getMultipathIndicator()
public void setMultipathIndicator(byte value)
public boolean hasSnrInDb()
getSnrInDb()
is available, false otherwise.public double getSnrInDb()
hasSnrInDb()
is true.public void setSnrInDb(double snrInDb)
public void resetSnrInDb()
public boolean hasElevationInDeg()
getElevationInDeg()
is available, false otherwise.public double getElevationInDeg()
getElevationUncertaintyInDeg()
.
The value is only available if hasElevationInDeg()
is true.public void setElevationInDeg(double elevationInDeg)
public void resetElevationInDeg()
public boolean hasElevationUncertaintyInDeg()
getElevationUncertaintyInDeg()
is available, false otherwise.public double getElevationUncertaintyInDeg()
hasElevationUncertaintyInDeg()
is true.public void setElevationUncertaintyInDeg(double value)
public void resetElevationUncertaintyInDeg()
public boolean hasAzimuthInDeg()
getAzimuthInDeg()
is available, false otherwise.public double getAzimuthInDeg()
getAzimuthUncertaintyInDeg()
.
The value is only available if hasAzimuthInDeg()
is true.public void setAzimuthInDeg(double value)
public void resetAzimuthInDeg()
public boolean hasAzimuthUncertaintyInDeg()
getAzimuthUncertaintyInDeg()
is available, false otherwise.public double getAzimuthUncertaintyInDeg()
hasAzimuthUncertaintyInDeg()
is true.public void setAzimuthUncertaintyInDeg(double value)
public void resetAzimuthUncertaintyInDeg()
public boolean isUsedInFix()
public void setUsedInFix(boolean value)
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())