sammmlow / LEOGPS

:earth_asia: :satellite: :earth_asia: :satellite: LEOGPS - Satellite Navigation with GPS on Python!
MIT License
63 stars 15 forks source link

Robustness against dropped data #14

Closed ANDREWNGT closed 1 year ago

ANDREWNGT commented 1 year ago

Hi!

I have a situation where my GPS receivers log data at 1 Hz, but with infrequent data corruption (0.1% of the time or maybe 1 second of drop every few minutes out of collection of 4 hours), resulting in some dropping of PVT data.

Issue: Current LEOGPS cannot proceed with data with 0.1% droppage.

Solutions:

  1. Either increase timestep parameter in GUI, which might affect accuracy
  2. Preprocess RINEX observation file and interpolate before processing in LEOGPS. Currently testing this via Bernese RNXSMT. From the manual, RNXSMT corrects for cycle slips. I'm not sure if it is able to correct for missing time step data?

The function that is not robust against dropped data is phasep.ph2fil() in line 611 of phasesep.py. The hatch filter requires comparison to the data 1 second before, even if the selected timestep is greater than 1 second.

Any other suggestions on how to deal with this? Any suggestions also to preprocess RINEX observation file for input into LEOGPS?

sammmlow commented 1 year ago

Thanks for flagging this! What do you mean by infrequent data corruption? Which file are you referring to? LEOGPS currently responds to incomplete data entries in RINEX files by just rejecting the entire line entirely if the number of elements in that line does not match what the RINEX header (top of OBS file) suggests. For a quick fix, disable or comment out the hatch filter - it is not strictly necessary to perform hatch filtering.

ANDREWNGT commented 1 year ago

I refer specifically to the Rinex 2.1 observation files. I have a situation where my timestep is 20 seconds, with hatch filter off. LEOGPS reads that the timestep it expects at 11:20:20 is missing, and code stops there. Is it possible to implement a try loop somewhere which skips and continues the code if the data point it expects is missing? debug_rinex

Also, FYI, RNXSMT in bernese does not seem to interpolate missing time step data. It only repairs cycle slips (due to loss of GPS lock).

ANDREWNGT commented 1 year ago

It appears that if the reason that the LEOGPS cannot progress with dropped RINEX data is because the for loop expects a data point at every time step it expects. I have debugged with a try & except loop, so that if there is no data at the time step expected, the algorithm progresses.

With this, I do not need to produce an interpolated RINEX file in order to get LEOGPS to run. I will propose my code changes for review in a pull request!