rtklib cycle slip detection

table of Contents

 

 

1 LLI method to detect cycle slip

2 MW method to detect cycle slip



 

 

1 LLI method to detect cycle slip

 

/* detect cycle slip by LLI --------------------------------------------------*/
/* args   : rtk_t  *rtk       IO  gps solution structure
*          obsd_t *obs       I   satellite observations
*          int     i         I   index of obs
*          int    rcv        I   1: rover receiver; 2: base receiver 
*/
static void detslp_ll(rtk_t *rtk, const obsd_t *obs, int i, int rcv)
{
    unsigned int slip,LLI;
    int f,sat=obs[i].sat;
    
    trace(3,"detslp_ll: i=%d rcv=%d\r\n",i,rcv);
    
    for (f=0;f<rtk->opt.nf;f++) {   //nf是频点个数(1:L1,2:L1+L2,3:L1+L2+L5)
        
        if (obs[i].L[f]==0.0|| //L当前相位
            fabs(timediff(obs[i].time,rtk->ssat[sat-1].pt[rcv-1][f]))<DTTOL) {
            continue;
        }
        /* restore previous LLI */
        if (rcv==1) LLI=getbitu(&rtk->ssat[sat-1].slip[f],0,2); /* rover */
        else        LLI=getbitu(&rtk->ssat[sat-1].slip[f],2,2); /* base  */
        
        /* detect slip by cycle slip flag in LLI */
        if (rtk->tt>=0.0) { /* forward */
            if (obs[i].LLI[f]&1) {
                errmsg(rtk,"slip detected forward  (sat=%2d rcv=%d F=%d LLI=%x)\r\n",
                       sat,rcv,f+1,obs[i].LLI[f]);
            }
            slip=obs[i].LLI[f];
        }
        else { /* backward */
            if (LLI&1) {
                errmsg(rtk,"slip detected backward (sat=%2d rcv=%d F=%d LLI=%x)\r\n",
                       sat,rcv,f+1,LLI);
            }
            slip=LLI;
        }
        /* detect slip by parity unknown flag transition in LLI */
        if (((LLI&2)&&!(obs[i].LLI[f]&2))||(!(LLI&2)&&(obs[i].LLI[f]&2))) {
            errmsg(rtk,"slip detected half-cyc (sat=%2d rcv=%d F=%d LLI=%x->%x)\r\n",
                   sat,rcv,f+1,LLI,obs[i].LLI[f]);
            slip|=1;
        }
        /* save current LLI */
        if (rcv==1) setbitu(&rtk->ssat[sat-1].slip[f],0,2,obs[i].LLI[f]);
        else        setbitu(&rtk->ssat[sat-1].slip[f],2,2,obs[i].LLI[f]);
        
        /* save slip and half-cycle valid flag */
        rtk->ssat[sat-1].slip[f]|=(unsigned char)slip;
        rtk->ssat[sat-1].half[f]=(obs[i].LLI[f]&2)?0:1;
    }
}
  1. Due to the forward processing and the backward processing, there are differences in the use of LLI for cycle slip judgment. Therefore, in the processing process, only forward as an example;
  2. LLI=getbitu(&rtk->ssat[sat-1].slip[f],0,2); First, take out the cycle slip flag of the satellite in the previous epoch and store it in the LLI variable, which will then be used to determine the upper Whether one epoch and the current epoch, the half-cycle jump flag (LLI&2, that is, bit 1 of LLI) has changed;
  3. slip=obs[i].LLI[f]; Assign the LLI in the original observations of the current epoch to the slip variable;
  4. If the half-cycle jump signs of the previous epoch and the current epoch are different, it is considered that there is a cycle slip, and the 0th position of slip is set to 1.
  5. Store the LLI and cycle slip of the current epoch.

Note: The difference between backward processing and forward processing: Carefully observe the code, you will find that in backward processing, the judgment cycle slip uses the LLI of the previous epoch instead of the LLI of the current epoch, and the forward processing , The LLI of the current epoch is used. Reason: Suppose the whole week ambiguity of a group of 8 consecutive epochs is: 1-1-1-1-50-50-50-50. At epoch 5, LLI=1. Then in the forward processing, it is okay to mark the fifth epoch as a cycle slip, because at epoch 5, the ambiguity of the whole week changes from 1 to 50. But in the backward processing, although the LLI of epoch 5 in the original data is 1, the actual cycle slip should be at epoch 4, because in the backward processing, the ambiguity of the whole week of epoch 4 jumps from 50 to 1.

 

 

 

 

2 MW method to detect cycle slip

 

 

 

 

  1. GF combination is essentially calculation GF = \ lambda_1 \ phi_1- \ lambda_2 \ phi_2 = \ lambda_1N_1- \ lambda_2N_2. If no cycle slip occurs, then the GF value of the previous epoch and the current epoch should be the same.
  2. GF combination can derive its noise according to its expression: σ GF = 2 σ L \sigma_{GF}=\sqrt{2}\sigma_LσGF​=2​σL​. The threshold of the cycle slip detection can also be set according to the noise level. In GAMP, the threshold is also adjusted according to the sampling interval and altitude angle. If you are interested, you can refer to its paper and code.

Guess you like

Origin blog.csdn.net/miracle_eicont/article/details/111823457