Java 如何从Google GNSSLogger获取的参数计算伪距?

Java 如何从Google GNSSLogger获取的参数计算伪距?,java,android,gps,android-gps,android-gnss,Java,Android,Gps,Android Gps,Android Gnss,通过GNSS logger应用程序获取的官方GNSS原始测量值提供以下参数: TimeNanos LeapSecond TimeUncertaintyNanos FullBiasNanos BiasNanos BiasUncertaintyNanos DriftNanosPerSecond DriftUncertaintyNanosPerSecond HardwareClockDiscontinuityCount Svid TimeOffsetNano

通过GNSS logger应用程序获取的官方GNSS原始测量值提供以下参数:

TimeNanos   
LeapSecond  
TimeUncertaintyNanos    
FullBiasNanos   
BiasNanos   
BiasUncertaintyNanos
DriftNanosPerSecond 
DriftUncertaintyNanosPerSecond  HardwareClockDiscontinuityCount 
Svid    
TimeOffsetNanos 
State   
ReceivedSvTimeNanos 
ReceivedSvTimeUncertaintyNanos  
Cn0DbHz 
PseudorangeRateMetersPerSecond  
PseudorangeRateUncertaintyMetersPerSecond
我正在从上述数据中寻找原始伪距测量值
PR
。帮点忙

参考文献1:

参考文献2:

其中:
m
-米,
s
-秒

试着这样做:

  • 从一个星座中选择卫星(首先尝试使用GPS)
  • 选择最大值
    ReceivedSvTimeNanos
  • 将每颗卫星的
    增量t
    计算为
    max
    ReceivedSvTimeNanos
    减去当前
    ReceivedSvTimeNanos

    增量t=maxRst-curRst
  • 平均行程时间为70毫秒,光速为299792458米/秒。用它来计算
  • 不要忘记将所有值转换为相同的单位


    有关详细信息,请参阅和

    不幸的是,Android没有直接从API提供伪范围-您必须自己计算

    欧盟GSA在此有一份很好的文件,详细解释了如何使用第2.4节中的GNSS原始测量:

    具体来说,第2.4.2节解释了如何根据Android API提供的数据计算伪范围。这是几页文字,所以我不会在这里直接复制整个内容,但这里是他们共享的示例1,用于计算伽利略、GPS和北斗信号的伪距,当一周的时间被编码时:

    % Select GPS + GAL TOW decoded (state bit 3 enabled)
    pos = find( (gnss.Const == 1 | gnss.Const == 6) & bitand(gnss.State,2^3);
    % Generate the measured time in full GNSS time
    tRx_GNSS = gnss.timeNano(pos) - (gnss.FullBiasNano(1) + gnss.BiasNano(1));
    % Change the valid range from full GNSS to TOW
    tRx = mod(tRx_GNSS(pos),WEEKSEC*1e9);
    % Generate the satellite time
    tTx = gnss.ReceivedSvTime(pos) + gnss.TimeOffsetNano(pos);
    % Generate the pseudorange
    prMilliSeconds = (tRx - tTx );
    pr = prMilliSeconds *Constant.C*1e-9;
    
    % Select GPS + GAL TOW decoded (state bit 3 enabled)
    pos = find( (gnss.Const == 1 | gnss.Const == 6) & bitand(gnss.State,2^3);
    % Generate the measured time in full GNSS time
    tRx_GNSS = gnss.timeNano(pos) - (gnss.FullBiasNano(1) + gnss.BiasNano(1));
    % Change the valid range from full GNSS to TOW
    tRx = mod(tRx_GNSS(pos),WEEKSEC*1e9);
    % Generate the satellite time
    tTx = gnss.ReceivedSvTime(pos) + gnss.TimeOffsetNano(pos);
    % Generate the pseudorange
    prMilliSeconds = (tRx - tTx );
    pr = prMilliSeconds *Constant.C*1e-9;