Fields Summary |
---|
private static final String | TAG |
private int | mFlags |
private byte | mPrn |
private double | mTimeOffsetInNs |
private short | mState |
private long | mReceivedGpsTowInNs |
private long | mReceivedGpsTowUncertaintyInNs |
private double | mCn0InDbHz |
private double | mPseudorangeRateInMetersPerSec |
private double | mPseudorangeRateUncertaintyInMetersPerSec |
private short | mAccumulatedDeltaRangeState |
private double | mAccumulatedDeltaRangeInMeters |
private double | mAccumulatedDeltaRangeUncertaintyInMeters |
private double | mPseudorangeInMeters |
private double | mPseudorangeUncertaintyInMeters |
private double | mCodePhaseInChips |
private double | mCodePhaseUncertaintyInChips |
private float | mCarrierFrequencyInHz |
private long | mCarrierCycles |
private double | mCarrierPhase |
private double | mCarrierPhaseUncertainty |
private byte | mLossOfLock |
private int | mBitNumber |
private short | mTimeFromLastBitInMs |
private double | mDopplerShiftInHz |
private double | mDopplerShiftUncertaintyInHz |
private byte | mMultipathIndicator |
private double | mSnrInDb |
private double | mElevationInDeg |
private double | mElevationUncertaintyInDeg |
private double | mAzimuthInDeg |
private double | mAzimuthUncertaintyInDeg |
private boolean | mUsedInFix |
private static final int | HAS_NO_FLAGS |
private static final int | HAS_SNR |
private static final int | HAS_ELEVATION |
private static final int | HAS_ELEVATION_UNCERTAINTY |
private static final int | HAS_AZIMUTH |
private static final int | HAS_AZIMUTH_UNCERTAINTY |
private static final int | HAS_PSEUDORANGE |
private static final int | HAS_PSEUDORANGE_UNCERTAINTY |
private static final int | HAS_CODE_PHASE |
private static final int | HAS_CODE_PHASE_UNCERTAINTY |
private static final int | HAS_CARRIER_FREQUENCY |
private static final int | HAS_CARRIER_CYCLES |
private static final int | HAS_CARRIER_PHASE |
private static final int | HAS_CARRIER_PHASE_UNCERTAINTY |
private static final int | HAS_BIT_NUMBER |
private static final int | HAS_TIME_FROM_LAST_BIT |
private static final int | HAS_DOPPLER_SHIFT |
private static final int | HAS_DOPPLER_SHIFT_UNCERTAINTY |
public static final byte | LOSS_OF_LOCK_UNKNOWNThe indicator is not available or it is unknown. |
public static final byte | LOSS_OF_LOCK_OKThe measurement does not present any indication of 'loss of lock'. |
public static final byte | LOSS_OF_LOCK_CYCLE_SLIP'Loss of lock' detected between the previous and current observation: cycle slip possible. |
public static final byte | MULTIPATH_INDICATOR_UNKNOWNThe indicator is not available or it is unknown. |
public static final byte | MULTIPATH_INDICATOR_DETECTEDThe measurement has been indicated to use multi-path. |
public static final byte | MULTIPATH_INDICATOR_NOT_USEDThe measurement has been indicated not tu use multi-path. |
public static final short | STATE_UNKNOWNThe state of GPS receiver the measurement is invalid or unknown. |
public static final short | STATE_CODE_LOCKThe state of the GPS receiver is ranging code lock. |
public static final short | STATE_BIT_SYNCThe state of the GPS receiver is in bit sync. |
public static final short | STATE_SUBFRAME_SYNCThe state of the GPS receiver is in sub-frame sync. |
public static final short | STATE_TOW_DECODEDThe state of the GPS receiver has TOW decoded. |
public static final short | ADR_STATE_UNKNOWNThe state of the 'Accumulated Delta Range' is invalid or unknown. |
public static final short | ADR_STATE_VALIDThe state of the 'Accumulated Delta Range' is valid. |
public static final short | ADR_STATE_RESETThe state of the 'Accumulated Delta Range' has detected a reset. |
public static final short | ADR_STATE_CYCLE_SLIPThe state of the 'Accumulated Delta Range' has a cycle slip detected. |
public static final Creator | CREATOR |
Methods Summary |
---|
public int | describeContents()
return 0;
|
public double | getAccumulatedDeltaRangeInMeters()Gets the accumulated delta range since the last channel reset, in meters.
The reported value includes {@link #getAccumulatedDeltaRangeUncertaintyInMeters()}.
The availability of the value is represented by {@link #getAccumulatedDeltaRangeState()}.
return mAccumulatedDeltaRangeInMeters;
|
public short | getAccumulatedDeltaRangeState()Gets 'Accumulated Delta Range' state.
It indicates whether {@link #getAccumulatedDeltaRangeInMeters()} is reset or there is a
cycle slip (indicating 'loss of lock').
return mAccumulatedDeltaRangeState;
|
private java.lang.String | getAccumulatedDeltaRangeStateString()Gets a string representation of the 'Accumulated Delta Range state'.
For internal and logging use only.
switch (mAccumulatedDeltaRangeState) {
case ADR_STATE_UNKNOWN:
return "Unknown";
case ADR_STATE_VALID:
return "Valid";
case ADR_STATE_RESET:
return "Reset";
case ADR_STATE_CYCLE_SLIP:
return "CycleSlip";
default:
return "<Invalid>";
}
|
public double | getAccumulatedDeltaRangeUncertaintyInMeters()Gets the accumulated delta range's uncertainty (1-Sigma) in meters.
The uncertainty is represented as an absolute (single sided) value.
return mAccumulatedDeltaRangeUncertaintyInMeters;
|
public double | getAzimuthInDeg()Gets the azimuth in degrees.
Range: [0, 360).
The reported azimuth includes {@link #getAzimuthUncertaintyInDeg()}.
The value is only available if {@link #hasAzimuthInDeg()} is true.
return mAzimuthInDeg;
|
public double | getAzimuthUncertaintyInDeg()Gets the azimuth's uncertainty (1-Sigma) in degrees.
Range: [0, 180].
The uncertainty is represented as an absolute (single sided) value.
The value is only available if {@link #hasAzimuthUncertaintyInDeg()} is true.
return mAzimuthUncertaintyInDeg;
|
public int | getBitNumber()Gets the number of GPS bits transmitted since Sat-Sun midnight (GPS week).
The value is only available if {@link #hasBitNumber()} is true.
return mBitNumber;
|
public long | getCarrierCycles()The number of full carrier cycles between the satellite and the receiver.
The reference frequency is given by the value of {@link #getCarrierFrequencyInHz()}.
The value is only available if {@link #hasCarrierCycles()} is true.
return mCarrierCycles;
|
public float | getCarrierFrequencyInHz()Gets the carrier frequency at which codes and messages are modulated, it can be L1 or L2.
If the field is not set, the carrier frequency corresponds to L1.
The value is only available if {@link #hasCarrierFrequencyInHz()} is true.
return mCarrierFrequencyInHz;
|
public double | getCarrierPhase()Gets the RF phase detected by the receiver.
Range: [0.0, 1.0].
This is usually the fractional part of the complete carrier phase measurement.
The reference frequency is given by the value of {@link #getCarrierFrequencyInHz()}.
The reported carrier-phase includes {@link #getCarrierPhaseUncertainty()}.
The value is only available if {@link #hasCarrierPhase()} is true.
return mCarrierPhase;
|
public 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 {@link #hasCarrierPhaseUncertainty()} is true.
return mCarrierPhaseUncertainty;
|
public double | getCn0InDbHz()Gets the Carrier-to-noise density in dB-Hz.
Range: [0, 63].
The value contains the measured C/N0 for the signal at the antenna input.
return mCn0InDbHz;
|
public double | getCodePhaseInChips()Gets the fraction of the current C/A code cycle.
Range: [0, 1023]
The reference frequency is given by the value of {@link #getCarrierFrequencyInHz()}.
The reported code-phase includes {@link #getCodePhaseUncertaintyInChips()}.
The value is only available if {@link #hasCodePhaseInChips()} is true.
return mCodePhaseInChips;
|
public double | getCodePhaseUncertaintyInChips()Gets the code-phase's uncertainty (1-Sigma) as a fraction of chips.
The uncertainty is represented as an absolute (single sided) value.
The value is only available if {@link #hasCodePhaseUncertaintyInChips()} is true.
return mCodePhaseUncertaintyInChips;
|
public double | getDopplerShiftInHz()Gets the Doppler Shift in Hz.
A positive value indicates that the SV is moving toward the receiver.
The reference frequency is given by the value of {@link #getCarrierFrequencyInHz()}.
The reported doppler shift includes {@link #getDopplerShiftUncertaintyInHz()}.
The value is only available if {@link #hasDopplerShiftInHz()} is true.
return mDopplerShiftInHz;
|
public double | getDopplerShiftUncertaintyInHz()Gets the Doppler's Shift uncertainty (1-Sigma) in Hz.
The uncertainty is represented as an absolute (single sided) value.
The value is only available if {@link #hasDopplerShiftUncertaintyInHz()} is true.
return mDopplerShiftUncertaintyInHz;
|
public double | getElevationInDeg()Gets the Elevation in degrees.
Range: [-90, 90]
The reported elevation includes {@link #getElevationUncertaintyInDeg()}.
The value is only available if {@link #hasElevationInDeg()} is true.
return mElevationInDeg;
|
public double | getElevationUncertaintyInDeg()Gets the elevation's uncertainty (1-Sigma) in degrees.
Range: [0, 90]
The uncertainty is represented as an absolute (single sided) value.
The value is only available if {@link #hasElevationUncertaintyInDeg()} is true.
return mElevationUncertaintyInDeg;
|
public byte | getLossOfLock()Gets a value indicating the 'loss of lock' state of the event.
return mLossOfLock;
|
private java.lang.String | getLossOfLockString()Gets a string representation of the 'loss of lock'.
For internal and logging use only.
switch (mLossOfLock) {
case LOSS_OF_LOCK_UNKNOWN:
return "Unknown";
case LOSS_OF_LOCK_OK:
return "Ok";
case LOSS_OF_LOCK_CYCLE_SLIP:
return "CycleSlip";
default:
return "<Invalid>";
}
|
public byte | getMultipathIndicator()Gets a value indicating the 'multipath' state of the event.
return mMultipathIndicator;
|
private java.lang.String | getMultipathIndicatorString()Gets a string representation of the 'multi-path indicator'.
For internal and logging use only.
switch(mMultipathIndicator) {
case MULTIPATH_INDICATOR_UNKNOWN:
return "Unknown";
case MULTIPATH_INDICATOR_DETECTED:
return "Detected";
case MULTIPATH_INDICATOR_NOT_USED:
return "NotUsed";
default:
return "<Invalid>";
}
|
public byte | getPrn()Gets the Pseudo-random number (PRN).
Range: [1, 32]
return mPrn;
|
public double | getPseudorangeInMeters()Gets the best derived pseudorange by the chipset, in meters.
The reported pseudorange includes {@link #getPseudorangeUncertaintyInMeters()}.
The value is only available if {@link #hasPseudorangeInMeters()} is true.
return mPseudorangeInMeters;
|
public double | getPseudorangeRateInMetersPerSec()Gets the Pseudorange rate at the timestamp in m/s.
The reported value includes {@link #getPseudorangeRateUncertaintyInMetersPerSec()}.
return mPseudorangeRateInMetersPerSec;
|
public double | getPseudorangeRateUncertaintyInMetersPerSec()Gets the pseudorange's rate uncertainty (1-Sigma) in m/s.
The uncertainty is represented as an absolute (single sided) value.
return mPseudorangeRateUncertaintyInMetersPerSec;
|
public double | getPseudorangeUncertaintyInMeters()Gets the pseudorange's uncertainty (1-Sigma) in meters.
The value contains the 'pseudorange' and 'clock' uncertainty in it.
The uncertainty is represented as an absolute (single sided) value.
The value is only available if {@link #hasPseudorangeUncertaintyInMeters()} is true.
return mPseudorangeUncertaintyInMeters;
|
public long | getReceivedGpsTowInNs()Gets the received GPS Time-of-Week at the measurement time, in nanoseconds.
The value is relative to the beginning of the current GPS week.
Given {@link #getState()} of the GPS receiver, the range of this field can be:
Searching : [ 0 ] : {@link #STATE_UNKNOWN} is set
Ranging code lock : [ 0 1 ms ] : {@link #STATE_CODE_LOCK} is set
Bit sync : [ 0 20 ms ] : {@link #STATE_BIT_SYNC} is set
Subframe sync : [ 0 6 ms ] : {@link #STATE_SUBFRAME_SYNC} is set
TOW decoded : [ 0 1 week ] : {@link #STATE_TOW_DECODED} is set
return mReceivedGpsTowInNs;
|
public long | getReceivedGpsTowUncertaintyInNs()Gets the received GPS time-of-week's uncertainty (1-Sigma) in nanoseconds.
return mReceivedGpsTowUncertaintyInNs;
|
public double | getSnrInDb()Gets the Signal-to-Noise ratio (SNR) in dB.
The value is only available if {@link #hasSnrInDb()} is true.
return mSnrInDb;
|
public short | getState()Gets per-satellite sync state.
It represents the current sync state for the associated satellite.
This value helps interpret {@link #getReceivedGpsTowInNs()}.
return mState;
|
private java.lang.String | getStateString()Gets a string representation of the 'sync state'.
For internal and logging use only.
switch (mState) {
case STATE_UNKNOWN:
return "Unknown";
case STATE_BIT_SYNC:
return "BitSync";
case STATE_CODE_LOCK:
return "CodeLock";
case STATE_SUBFRAME_SYNC:
return "SubframeSync";
case STATE_TOW_DECODED:
return "TowDecoded";
default:
return "<Invalid>";
}
|
public short | getTimeFromLastBitInMs()Gets the elapsed time since the last received bit in milliseconds.
Range: [0, 20].
The value is only available if {@link #hasTimeFromLastBitInMs()} is true.
return mTimeFromLastBitInMs;
|
public double | getTimeOffsetInNs()Gets the time offset at which the measurement was taken in nanoseconds.
The reference receiver's time is specified by {@link GpsClock#getTimeInNs()} and should be
interpreted in the same way as indicated by {@link 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.
return mTimeOffsetInNs;
|
public boolean | hasAzimuthInDeg()Returns true if {@link #getAzimuthInDeg()} is available, false otherwise.
return isFlagSet(HAS_AZIMUTH);
|
public boolean | hasAzimuthUncertaintyInDeg()Returns true if {@link #getAzimuthUncertaintyInDeg()} is available, false otherwise.
return isFlagSet(HAS_AZIMUTH_UNCERTAINTY);
|
public boolean | hasBitNumber()Returns true if {@link #getBitNumber()} is available, false otherwise.
return isFlagSet(HAS_BIT_NUMBER);
|
public boolean | hasCarrierCycles()Returns true if {@link #getCarrierCycles()} is available, false otherwise.
return isFlagSet(HAS_CARRIER_CYCLES);
|
public boolean | hasCarrierFrequencyInHz()Returns true if {@link #getCarrierFrequencyInHz()} is available, false otherwise.
return isFlagSet(HAS_CARRIER_FREQUENCY);
|
public boolean | hasCarrierPhase()Returns true if {@link #getCarrierPhase()} is available, false otherwise.
return isFlagSet(HAS_CARRIER_PHASE);
|
public boolean | hasCarrierPhaseUncertainty()Returns true if {@link #getCarrierPhaseUncertainty()} is available, false otherwise.
return isFlagSet(HAS_CARRIER_PHASE_UNCERTAINTY);
|
public boolean | hasCodePhaseInChips()Returns true if {@link #getCodePhaseInChips()} is available, false otherwise.
return isFlagSet(HAS_CODE_PHASE);
|
public boolean | hasCodePhaseUncertaintyInChips()Returns true if {@link #getCodePhaseUncertaintyInChips()} is available, false otherwise.
return isFlagSet(HAS_CODE_PHASE_UNCERTAINTY);
|
public boolean | hasDopplerShiftInHz()Returns true if {@link #getDopplerShiftInHz()} is available, false otherwise.
return isFlagSet(HAS_DOPPLER_SHIFT);
|
public boolean | hasDopplerShiftUncertaintyInHz()Returns true if {@link #getDopplerShiftUncertaintyInHz()} is available, false otherwise.
return isFlagSet(HAS_DOPPLER_SHIFT_UNCERTAINTY);
|
public boolean | hasElevationInDeg()Returns true if {@link #getElevationInDeg()} is available, false otherwise.
return isFlagSet(HAS_ELEVATION);
|
public boolean | hasElevationUncertaintyInDeg()Returns true if {@link #getElevationUncertaintyInDeg()} is available, false otherwise.
return isFlagSet(HAS_ELEVATION_UNCERTAINTY);
|
public boolean | hasPseudorangeInMeters()Returns true if {@link #getPseudorangeInMeters()} is available, false otherwise.
return isFlagSet(HAS_PSEUDORANGE);
|
public boolean | hasPseudorangeUncertaintyInMeters()Returns true if {@link #getPseudorangeUncertaintyInMeters()} is available, false otherwise.
return isFlagSet(HAS_PSEUDORANGE_UNCERTAINTY);
|
public boolean | hasSnrInDb()Returns true if {@link #getSnrInDb()} is available, false otherwise.
return isFlagSet(HAS_SNR);
|
public boolean | hasTimeFromLastBitInMs()Returns true if {@link #getTimeFromLastBitInMs()} is available, false otherwise.
return isFlagSet(HAS_TIME_FROM_LAST_BIT);
|
private void | initialize()
mFlags = HAS_NO_FLAGS;
setPrn(Byte.MIN_VALUE);
setTimeOffsetInNs(Long.MIN_VALUE);
setState(STATE_UNKNOWN);
setReceivedGpsTowInNs(Long.MIN_VALUE);
setReceivedGpsTowUncertaintyInNs(Long.MAX_VALUE);
setCn0InDbHz(Double.MIN_VALUE);
setPseudorangeRateInMetersPerSec(Double.MIN_VALUE);
setPseudorangeRateUncertaintyInMetersPerSec(Double.MIN_VALUE);
setAccumulatedDeltaRangeState(ADR_STATE_UNKNOWN);
setAccumulatedDeltaRangeInMeters(Double.MIN_VALUE);
setAccumulatedDeltaRangeUncertaintyInMeters(Double.MIN_VALUE);
resetPseudorangeInMeters();
resetPseudorangeUncertaintyInMeters();
resetCodePhaseInChips();
resetCodePhaseUncertaintyInChips();
resetCarrierFrequencyInHz();
resetCarrierCycles();
resetCarrierPhase();
resetCarrierPhaseUncertainty();
setLossOfLock(LOSS_OF_LOCK_UNKNOWN);
resetBitNumber();
resetTimeFromLastBitInMs();
resetDopplerShiftInHz();
resetDopplerShiftUncertaintyInHz();
setMultipathIndicator(MULTIPATH_INDICATOR_UNKNOWN);
resetSnrInDb();
resetElevationInDeg();
resetElevationUncertaintyInDeg();
resetAzimuthInDeg();
resetAzimuthUncertaintyInDeg();
setUsedInFix(false);
|
private boolean | isFlagSet(int flag)
return (mFlags & flag) == flag;
|
public boolean | isUsedInFix()Gets a flag indicating whether the GPS represented by the measurement was used for computing
the most recent fix.
return mUsedInFix;
|
public void | reset()Resets all the contents to its original state.
initialize();
|
public void | resetAzimuthInDeg()Resets the Azimuth in degrees.
resetFlag(HAS_AZIMUTH);
mAzimuthInDeg = Double.NaN;
|
public void | resetAzimuthUncertaintyInDeg()Resets the Azimuth's uncertainty (1-Sigma) in degrees.
resetFlag(HAS_AZIMUTH_UNCERTAINTY);
mAzimuthUncertaintyInDeg = Double.NaN;
|
public void | resetBitNumber()Resets the bit number within the broadcast frame.
resetFlag(HAS_BIT_NUMBER);
mBitNumber = Integer.MIN_VALUE;
|
public void | resetCarrierCycles()Resets the number of full carrier cycles between the satellite and the receiver.
resetFlag(HAS_CARRIER_CYCLES);
mCarrierCycles = Long.MIN_VALUE;
|
public void | resetCarrierFrequencyInHz()Resets the Carrier frequency (L1 or L2) in Hz.
resetFlag(HAS_CARRIER_FREQUENCY);
mCarrierFrequencyInHz = Float.NaN;
|
public void | resetCarrierPhase()Resets the RF phase detected by the receiver.
resetFlag(HAS_CARRIER_PHASE);
mCarrierPhase = Double.NaN;
|
public void | resetCarrierPhaseUncertainty()Resets the Carrier-phase's uncertainty (1-Sigma) in cycles.
resetFlag(HAS_CARRIER_PHASE_UNCERTAINTY);
mCarrierPhaseUncertainty = Double.NaN;
|
public void | resetCodePhaseInChips()Resets the Code-phase in chips.
resetFlag(HAS_CODE_PHASE);
mCodePhaseInChips = Double.NaN;
|
public void | resetCodePhaseUncertaintyInChips()Resets the Code-phase's uncertainty (1-Sigma) in fractions of chips.
resetFlag(HAS_CODE_PHASE_UNCERTAINTY);
mCodePhaseUncertaintyInChips = Double.NaN;
|
public void | resetDopplerShiftInHz()Resets the Doppler shift in Hz.
resetFlag(HAS_DOPPLER_SHIFT);
mDopplerShiftInHz = Double.NaN;
|
public void | resetDopplerShiftUncertaintyInHz()Resets the Doppler's shift uncertainty (1-Sigma) in Hz.
resetFlag(HAS_DOPPLER_SHIFT_UNCERTAINTY);
mDopplerShiftUncertaintyInHz = Double.NaN;
|
public void | resetElevationInDeg()Resets the Elevation in degrees.
resetFlag(HAS_ELEVATION);
mElevationInDeg = Double.NaN;
|
public void | resetElevationUncertaintyInDeg()Resets the elevation's uncertainty (1-Sigma) in degrees.
resetFlag(HAS_ELEVATION_UNCERTAINTY);
mElevationUncertaintyInDeg = Double.NaN;
|
private void | resetFlag(int flag)
mFlags &= ~flag;
|
public void | resetPseudorangeInMeters()Resets the Pseudo-range in meters.
resetFlag(HAS_PSEUDORANGE);
mPseudorangeInMeters = Double.NaN;
|
public void | resetPseudorangeUncertaintyInMeters()Resets the pseudo-range's uncertainty (1-Sigma) in meters.
resetFlag(HAS_PSEUDORANGE_UNCERTAINTY);
mPseudorangeUncertaintyInMeters = Double.NaN;
|
public void | resetSnrInDb()Resets the Signal-to-noise ratio (SNR) in dB.
resetFlag(HAS_SNR);
mSnrInDb = Double.NaN;
|
public void | resetTimeFromLastBitInMs()Resets the elapsed time since the last received bit in milliseconds.
resetFlag(HAS_TIME_FROM_LAST_BIT);
mTimeFromLastBitInMs = Short.MIN_VALUE;
|
public void | set(android.location.GpsMeasurement measurement)Sets all contents to the values stored in the provided object.
mFlags = measurement.mFlags;
mPrn = measurement.mPrn;
mTimeOffsetInNs = measurement.mTimeOffsetInNs;
mState = measurement.mState;
mReceivedGpsTowInNs = measurement.mReceivedGpsTowInNs;
mReceivedGpsTowUncertaintyInNs = measurement.mReceivedGpsTowUncertaintyInNs;
mCn0InDbHz = measurement.mCn0InDbHz;
mPseudorangeRateInMetersPerSec = measurement.mPseudorangeRateInMetersPerSec;
mPseudorangeRateUncertaintyInMetersPerSec =
measurement.mPseudorangeRateUncertaintyInMetersPerSec;
mAccumulatedDeltaRangeState = measurement.mAccumulatedDeltaRangeState;
mAccumulatedDeltaRangeInMeters = measurement.mAccumulatedDeltaRangeInMeters;
mAccumulatedDeltaRangeUncertaintyInMeters =
measurement.mAccumulatedDeltaRangeUncertaintyInMeters;
mPseudorangeInMeters = measurement.mPseudorangeInMeters;
mPseudorangeUncertaintyInMeters = measurement.mPseudorangeUncertaintyInMeters;
mCodePhaseInChips = measurement.mCodePhaseInChips;
mCodePhaseUncertaintyInChips = measurement.mCodePhaseUncertaintyInChips;
mCarrierFrequencyInHz = measurement.mCarrierFrequencyInHz;
mCarrierCycles = measurement.mCarrierCycles;
mCarrierPhase = measurement.mCarrierPhase;
mCarrierPhaseUncertainty = measurement.mCarrierPhaseUncertainty;
mLossOfLock = measurement.mLossOfLock;
mBitNumber = measurement.mBitNumber;
mTimeFromLastBitInMs = measurement.mTimeFromLastBitInMs;
mDopplerShiftInHz = measurement.mDopplerShiftInHz;
mDopplerShiftUncertaintyInHz = measurement.mDopplerShiftUncertaintyInHz;
mMultipathIndicator = measurement.mMultipathIndicator;
mSnrInDb = measurement.mSnrInDb;
mElevationInDeg = measurement.mElevationInDeg;
mElevationUncertaintyInDeg = measurement.mElevationUncertaintyInDeg;
mAzimuthInDeg = measurement.mAzimuthInDeg;
mAzimuthUncertaintyInDeg = measurement.mAzimuthUncertaintyInDeg;
mUsedInFix = measurement.mUsedInFix;
|
public void | setAccumulatedDeltaRangeInMeters(double value)Sets the accumulated delta range in meters.
mAccumulatedDeltaRangeInMeters = value;
|
public void | setAccumulatedDeltaRangeState(short value)Sets the 'Accumulated Delta Range' state.
switch (value) {
case ADR_STATE_UNKNOWN:
case ADR_STATE_VALID:
case ADR_STATE_RESET:
case ADR_STATE_CYCLE_SLIP:
mAccumulatedDeltaRangeState = value;
break;
default:
Log.d(TAG, "Sanitizing invalid 'Accumulated Delta Range state': " + value);
mAccumulatedDeltaRangeState = ADR_STATE_UNKNOWN;
break;
}
|
public void | setAccumulatedDeltaRangeUncertaintyInMeters(double value)Sets the accumulated delta range's uncertainty (1-sigma) in meters.
The availability of the value is represented by {@link #getAccumulatedDeltaRangeState()}.
mAccumulatedDeltaRangeUncertaintyInMeters = value;
|
public void | setAzimuthInDeg(double value)Sets the Azimuth in degrees.
setFlag(HAS_AZIMUTH);
mAzimuthInDeg = value;
|
public void | setAzimuthUncertaintyInDeg(double value)Sets the Azimuth's uncertainty (1-Sigma) in degrees.
setFlag(HAS_AZIMUTH_UNCERTAINTY);
mAzimuthUncertaintyInDeg = value;
|
public void | setBitNumber(int bitNumber)Sets the bit number within the broadcast frame.
setFlag(HAS_BIT_NUMBER);
mBitNumber = bitNumber;
|
public void | setCarrierCycles(long value)Sets the number of full carrier cycles between the satellite and the receiver.
setFlag(HAS_CARRIER_CYCLES);
mCarrierCycles = value;
|
public void | setCarrierFrequencyInHz(float carrierFrequencyInHz)Sets the Carrier frequency (L1 or L2) in Hz.
setFlag(HAS_CARRIER_FREQUENCY);
mCarrierFrequencyInHz = carrierFrequencyInHz;
|
public void | setCarrierPhase(double value)Sets the RF phase detected by the receiver.
setFlag(HAS_CARRIER_PHASE);
mCarrierPhase = value;
|
public void | setCarrierPhaseUncertainty(double value)Sets the Carrier-phase's uncertainty (1-Sigma) in cycles.
setFlag(HAS_CARRIER_PHASE_UNCERTAINTY);
mCarrierPhaseUncertainty = value;
|
public void | setCn0InDbHz(double value)Sets the carrier-to-noise density in dB-Hz.
mCn0InDbHz = value;
|
public void | setCodePhaseInChips(double value)Sets the Code-phase in chips.
setFlag(HAS_CODE_PHASE);
mCodePhaseInChips = value;
|
public void | setCodePhaseUncertaintyInChips(double value)Sets the Code-phase's uncertainty (1-Sigma) in fractions of chips.
setFlag(HAS_CODE_PHASE_UNCERTAINTY);
mCodePhaseUncertaintyInChips = value;
|
public void | setDopplerShiftInHz(double value)Sets the Doppler shift in Hz.
setFlag(HAS_DOPPLER_SHIFT);
mDopplerShiftInHz = value;
|
public void | setDopplerShiftUncertaintyInHz(double value)Sets the Doppler's shift uncertainty (1-Sigma) in Hz.
setFlag(HAS_DOPPLER_SHIFT_UNCERTAINTY);
mDopplerShiftUncertaintyInHz = value;
|
public void | setElevationInDeg(double elevationInDeg)Sets the Elevation in degrees.
setFlag(HAS_ELEVATION);
mElevationInDeg = elevationInDeg;
|
public void | setElevationUncertaintyInDeg(double value)Sets the elevation's uncertainty (1-Sigma) in degrees.
setFlag(HAS_ELEVATION_UNCERTAINTY);
mElevationUncertaintyInDeg = value;
|
private void | setFlag(int flag)
mFlags |= flag;
|
public void | setLossOfLock(byte value)Sets the 'loss of lock' status.
switch (value) {
case LOSS_OF_LOCK_UNKNOWN:
case LOSS_OF_LOCK_OK:
case LOSS_OF_LOCK_CYCLE_SLIP:
mLossOfLock = value;
break;
default:
Log.d(TAG, "Sanitizing invalid 'loss of lock': " + value);
mLossOfLock = LOSS_OF_LOCK_UNKNOWN;
break;
}
|
public void | setMultipathIndicator(byte value)Sets the 'multi-path' indicator.
switch (value) {
case MULTIPATH_INDICATOR_UNKNOWN:
case MULTIPATH_INDICATOR_DETECTED:
case MULTIPATH_INDICATOR_NOT_USED:
mMultipathIndicator = value;
break;
default:
Log.d(TAG, "Sanitizing invalid 'muti-path indicator': " + value);
mMultipathIndicator = MULTIPATH_INDICATOR_UNKNOWN;
break;
}
|
public void | setPrn(byte value)Sets the Pseud-random number (PRN).
mPrn = value;
|
public void | setPseudorangeInMeters(double value)Sets the Pseudo-range in meters.
setFlag(HAS_PSEUDORANGE);
mPseudorangeInMeters = value;
|
public void | setPseudorangeRateInMetersPerSec(double value)Sets the pseudorange rate at the timestamp in m/s.
mPseudorangeRateInMetersPerSec = value;
|
public void | setPseudorangeRateUncertaintyInMetersPerSec(double value)Sets the pseudorange's rate uncertainty (1-Sigma) in m/s.
mPseudorangeRateUncertaintyInMetersPerSec = value;
|
public void | setPseudorangeUncertaintyInMeters(double value)Sets the pseudo-range's uncertainty (1-Sigma) in meters.
setFlag(HAS_PSEUDORANGE_UNCERTAINTY);
mPseudorangeUncertaintyInMeters = value;
|
public void | setReceivedGpsTowInNs(long value)Sets the received GPS time-of-week in nanoseconds.
mReceivedGpsTowInNs = value;
|
public void | setReceivedGpsTowUncertaintyInNs(long value)Sets the received GPS time-of-week's uncertainty (1-Sigma) in nanoseconds.
mReceivedGpsTowUncertaintyInNs = value;
|
public void | setSnrInDb(double snrInDb)Sets the Signal-to-noise ratio (SNR) in dB.
setFlag(HAS_SNR);
mSnrInDb = snrInDb;
|
public void | setState(short value)Sets the sync state.
switch (value) {
case STATE_UNKNOWN:
case STATE_BIT_SYNC:
case STATE_CODE_LOCK:
case STATE_SUBFRAME_SYNC:
case STATE_TOW_DECODED:
mState = value;
break;
default:
Log.d(TAG, "Sanitizing invalid 'sync state': " + value);
mState = STATE_UNKNOWN;
break;
}
|
public void | setTimeFromLastBitInMs(short value)Sets the elapsed time since the last received bit in milliseconds.
setFlag(HAS_TIME_FROM_LAST_BIT);
mTimeFromLastBitInMs = value;
|
public void | setTimeOffsetInNs(double value)Sets the time offset at which the measurement was taken in nanoseconds.
mTimeOffsetInNs = value;
|
public void | setUsedInFix(boolean value)Sets the Used-in-Fix flag.
mUsedInFix = value;
|
public java.lang.String | toString()
final String format = " %-29s = %s\n";
final String formatWithUncertainty = " %-29s = %-25s %-40s = %s\n";
StringBuilder builder = new StringBuilder("GpsMeasurement:\n");
builder.append(String.format(format, "Prn", mPrn));
builder.append(String.format(format, "TimeOffsetInNs", mTimeOffsetInNs));
builder.append(String.format(format, "State", getStateString()));
builder.append(String.format(
formatWithUncertainty,
"ReceivedGpsTowInNs",
mReceivedGpsTowInNs,
"ReceivedGpsTowUncertaintyInNs",
mReceivedGpsTowUncertaintyInNs));
builder.append(String.format(format, "Cn0InDbHz", mCn0InDbHz));
builder.append(String.format(
formatWithUncertainty,
"PseudorangeRateInMetersPerSec",
mPseudorangeRateInMetersPerSec,
"PseudorangeRateUncertaintyInMetersPerSec",
mPseudorangeRateUncertaintyInMetersPerSec));
builder.append(String.format(
format,
"AccumulatedDeltaRangeState",
getAccumulatedDeltaRangeStateString()));
builder.append(String.format(
formatWithUncertainty,
"AccumulatedDeltaRangeInMeters",
mAccumulatedDeltaRangeInMeters,
"AccumulatedDeltaRangeUncertaintyInMeters",
mAccumulatedDeltaRangeUncertaintyInMeters));
builder.append(String.format(
formatWithUncertainty,
"PseudorangeInMeters",
hasPseudorangeInMeters() ? mPseudorangeInMeters : null,
"PseudorangeUncertaintyInMeters",
hasPseudorangeUncertaintyInMeters() ? mPseudorangeUncertaintyInMeters : null));
builder.append(String.format(
formatWithUncertainty,
"CodePhaseInChips",
hasCodePhaseInChips() ? mCodePhaseInChips : null,
"CodePhaseUncertaintyInChips",
hasCodePhaseUncertaintyInChips() ? mCodePhaseUncertaintyInChips : null));
builder.append(String.format(
format,
"CarrierFrequencyInHz",
hasCarrierFrequencyInHz() ? mCarrierFrequencyInHz : null));
builder.append(String.format(
format,
"CarrierCycles",
hasCarrierCycles() ? mCarrierCycles : null));
builder.append(String.format(
formatWithUncertainty,
"CarrierPhase",
hasCarrierPhase() ? mCarrierPhase : null,
"CarrierPhaseUncertainty",
hasCarrierPhaseUncertainty() ? mCarrierPhaseUncertainty : null));
builder.append(String.format(format, "LossOfLock", getLossOfLockString()));
builder.append(String.format(
format,
"BitNumber",
hasBitNumber() ? mBitNumber : null));
builder.append(String.format(
format,
"TimeFromLastBitInMs",
hasTimeFromLastBitInMs() ? mTimeFromLastBitInMs : null));
builder.append(String.format(
formatWithUncertainty,
"DopplerShiftInHz",
hasDopplerShiftInHz() ? mDopplerShiftInHz : null,
"DopplerShiftUncertaintyInHz",
hasDopplerShiftUncertaintyInHz() ? mDopplerShiftUncertaintyInHz : null));
builder.append(String.format(format, "MultipathIndicator", getMultipathIndicatorString()));
builder.append(String.format(
format,
"SnrInDb",
hasSnrInDb() ? mSnrInDb : null));
builder.append(String.format(
formatWithUncertainty,
"ElevationInDeg",
hasElevationInDeg() ? mElevationInDeg : null,
"ElevationUncertaintyInDeg",
hasElevationUncertaintyInDeg() ? mElevationUncertaintyInDeg : null));
builder.append(String.format(
formatWithUncertainty,
"AzimuthInDeg",
hasAzimuthInDeg() ? mAzimuthInDeg : null,
"AzimuthUncertaintyInDeg",
hasAzimuthUncertaintyInDeg() ? mAzimuthUncertaintyInDeg : null));
builder.append(String.format(format, "UsedInFix", mUsedInFix));
return builder.toString();
|
public void | writeToParcel(android.os.Parcel parcel, int flags)
parcel.writeInt(mFlags);
parcel.writeByte(mPrn);
parcel.writeDouble(mTimeOffsetInNs);
parcel.writeInt(mState);
parcel.writeLong(mReceivedGpsTowInNs);
parcel.writeLong(mReceivedGpsTowUncertaintyInNs);
parcel.writeDouble(mCn0InDbHz);
parcel.writeDouble(mPseudorangeRateInMetersPerSec);
parcel.writeDouble(mPseudorangeRateUncertaintyInMetersPerSec);
parcel.writeInt(mAccumulatedDeltaRangeState);
parcel.writeDouble(mAccumulatedDeltaRangeInMeters);
parcel.writeDouble(mAccumulatedDeltaRangeUncertaintyInMeters);
parcel.writeDouble(mPseudorangeInMeters);
parcel.writeDouble(mPseudorangeUncertaintyInMeters);
parcel.writeDouble(mCodePhaseInChips);
parcel.writeDouble(mCodePhaseUncertaintyInChips);
parcel.writeFloat(mCarrierFrequencyInHz);
parcel.writeLong(mCarrierCycles);
parcel.writeDouble(mCarrierPhase);
parcel.writeDouble(mCarrierPhaseUncertainty);
parcel.writeByte(mLossOfLock);
parcel.writeInt(mBitNumber);
parcel.writeInt(mTimeFromLastBitInMs);
parcel.writeDouble(mDopplerShiftInHz);
parcel.writeDouble(mDopplerShiftUncertaintyInHz);
parcel.writeByte(mMultipathIndicator);
parcel.writeDouble(mSnrInDb);
parcel.writeDouble(mElevationInDeg);
parcel.writeDouble(mElevationUncertaintyInDeg);
parcel.writeDouble(mAzimuthInDeg);
parcel.writeDouble(mAzimuthUncertaintyInDeg);
parcel.writeInt(mUsedInFix ? 1 : 0);
|