如何利用Google GNSS Logger获取的参数计算原始伪距PR?
Alright, let's break down exactly how to compute the raw pseudorange using the parameters you've listed from Google's GNSS Logger app. I'll walk you through each step with clear, actionable formulas using the variables provided.
Core Concept
Pseudorange is essentially the time it takes for a GNSS satellite signal to reach the receiver multiplied by the speed of light. So our goal is to first calculate that propagation time, then scale it to distance.
Step-by-Step Calculation
1. Compute the Receiver's GNSS System Time
First, we need to convert the device's hardware clock time to the GNSS system time (e.g., GPS time, GLONASS time) using the bias parameters:
GnssTimeNanos = TimeNanos - (FullBiasNanos + BiasNanos)
TimeNanos: The device's hardware clock timestamp (in nanoseconds)FullBiasNanos: The total offset between the GNSS system time and the device's hardware clock (accounts for long-term drift)BiasNanos: A short-term correction to the hardware clock bias
2. Calculate Signal Propagation Time
Next, we find how long the signal traveled from the satellite to the receiver. We need to adjust the satellite's transmit time to match the GNSS system time first:
PropagationTimeNanos = GnssTimeNanos - (ReceivedSvTimeNanos + TimeOffsetNanos)
ReceivedSvTimeNanos: The satellite's internal timestamp when it sent the signal (in nanoseconds)TimeOffsetNanos: The offset between the individual satellite's clock and the overall GNSS system time (critical for constellations like GLONASS where satellites have unique clock offsets)
3. Convert Propagation Time to Pseudorange
Finally, convert the time (in nanoseconds) to distance (in meters) using the speed of light (c = 299792458 m/s):
PR = (PropagationTimeNanos * 1e-9) * c
- The
1e-9converts nanoseconds to seconds, since the speed of light is measured in meters per second.
Important Notes
- Validate Satellite State: Always check the
Stateparameter first. Only use measurements where the satellite is in a valid state (e.g., code lock achieved—look for flags likeSTATE_CODE_LOCKin the bitmask). Discard measurements from satellites that aren't properly tracked. - Uncertainty Calculation: If you need the pseudorange uncertainty, use the
ReceivedSvTimeUncertaintyNanosthe same way:PR_Uncertainty = (ReceivedSvTimeUncertaintyNanos * 1e-9) * c - Leap Seconds: The
LeapSecondparameter accounts for the difference between GNSS time and UTC. For raw pseudorange calculation (which uses GNSS system time), you typically don't need this unless you're converting to UTC-based timestamps later.
This logic aligns with how Google's official GNSS measurement tools handle pseudorange derivation—you'll find similar calculations in their open-source implementations.
内容的提问来源于stack exchange,提问作者Aniket Raj

