tomojitakasu / RTKLIB

2.44k stars 1.57k forks source link

Where differential correction are implemented rtkrcv #467

Open lbenvenuto91 opened 5 years ago

lbenvenuto91 commented 5 years ago

Dear @tomojitakasu ,

I’m working with rtkrcv but I get some problems with nrtk corrections (in particular MAC corrections which are sent through rtcm3 standard protocol). In particular if I use corrections from 2 different CORS I get two different behaviours: in one case I get fix and float positions, while in the other case I only get single positions. With the command ‘stream’ in the console, I can see that in both case the receiver actually get the corrections (so there are not connection errors or similar).

I’m trying to analise the source code but I can’t find the point where the corrections are applied.

If I understood well, the subroutine ‘rtkpos’ starts the processing procedure calling the function ‘pntpos’ (defined in /src/pntpos.c) which performs a single-point positioning with pseudorange measurements. In this subroutine the SNR mask is applied and the corresponding bad observations excluded from the processing. Once this is done a PPP method is applied in the subroutine ‘pppos’ defined in the source file ‘ppp.c’ This function implements a Kalman-filter based PPP approach: after having updated the solution state and computed the satellite ephemeris and clock, the mask for eclipsing satellites is applied; moreover the function ‘res_ppp’ is called; this function manages the correction of the measurements with all error source terms that have to be included in a PPP processing method. In particular this function uses the subfunction ‘corrmeas’, where the SNR mask is applied, both for Iono-free observations and for single-frequency observations. After these operations the filter is applied and the epochwise solution is computed. What I can't understand in the workflow is where the differential correction are received/read and than applied. I expected to find something similar to what is implemented in the file postpos.c (line 189 and following / input rtcm3 ssr corrections /), but I couldn't find anything, and moreover this file is not called in the workflow of rtkrcv (I guess this file is for post processing postioning).

So finally my question is: where the differential correction are applied in the workflow of rtkrcv?

Thank you very much,

Lorenzo

tomojitakasu commented 5 years ago

If "differential correction" means reference station observation data for baseline processing, they are used to generate DD (double-difference) residuals in the function ddres() of rtkpos.c. Anyway, RTKLIB does not support all of RTCM 3 messages. Some of them are not supported (and no plan even in future versions) like MAC (or MAX) and FKP corrections.

lbenvenuto91 commented 5 years ago

So, according to your answer, when I use correction from a CORS service using MAC as a mountpoin (e.g. in my config file I have: “inpstr2-path =user:password@81.23.86.70:2101/MAC_1:” https://geoportal.regione.liguria.it/servizi/rete-gnss-liguria/correzioni-in-tempo-reale.html), does rtkrcv use only the observables of the nearest permanent station? (and not MAC correction?). Using the “status” command in the console I can see that I get data from fields 1004,1006,1008,1012,1014,1017,1039 of RTCM3 message. @tomojitakasu