Environment
- RTKLIB-EX: 2.5.1
- Receiver: Unicore UM980
- Input format: Unicore binary (
-r unicore)
- Tool:
convbin
Problem
RINEX observation files generated by convbin contain a large number of GPS Loss of Lock Indicators (LLI), resulting in thousands of apparent cycle slips in RTKPLOT.
The same raw binary converted with the official Unicore Converter.exe does not exhibit these GPS cycle slips.
Investigation
I instrumented decode_obsvmb() in src/rcv/unicore.c to trace the lock time handling.
The relevant code is:
tt = timediff(raw->time, raw->tobs[sat - 1][idx]);
lli = lockt - raw->lockt[sat - 1][idx] + 0.05 <= tt ? LLI_SLIP : 0;
The lock time logic itself appears to work correctly.
However, the trace revealed that two different GPS observation codes are assigned to the same observation index (idx).
Example:
2 UNICORE_LOCK G05 idx=1 code=20 tt=1.000000 lock_prev=1.010000 lock=2.010000 dlock=1.000000 lli=0
2 UNICORE_LOCK G05 idx=1 code=17 tt=0.000000 lock_prev=2.010000 lock=0.000000 dlock=-2.010000 lli=1
Both observations use the same raw->lockt[sat-1][idx] and raw->tobs[sat-1][idx] entries.
As a consequence:
- the first signal updates the stored lock time;
- the second signal immediately compares against the first signal's lock time;
- this generates a false LLI (
LLI_SLIP).
This pattern repeats throughout the file, producing thousands of false GPS cycle slips.
Cause
sig2code() returns CODE_L2L, but checkpri() does not explicitly handle this code.
As a result, CODE_L2L remains mapped to the standard L2 observation index, where it collides with another L2 observation.
Temporary fix tested
Adding an explicit handling for CODE_L2L in checkpri() eliminates the collision and completely removes the false GPS cycle slips.
After this modification:
- GPS observations become continuous in RTKPLOT (attached).
- The generated RINEX behaves consistently with the official Unicore Converter output.
Question
Is this the expected handling for CODE_L2L, or should it instead receive its own dedicated observation index?
I'd be happy to prepare a pull request once the preferred solution is confirmed.
Example of RTKPLOT (Sat Vis) observations from a RINEX file generated with RTKLIB_EX 2.5.1, showing numerous false GPS cycle slips.

Example of RTKPLOT (Sat Vis) observations from a RINEX file generated with the patched convbin, showing that the false GPS cycle slips have disappeared.

Environment
-r unicore)convbinProblem
RINEX observation files generated by
convbincontain a large number of GPS Loss of Lock Indicators (LLI), resulting in thousands of apparent cycle slips in RTKPLOT.The same raw binary converted with the official Unicore
Converter.exedoes not exhibit these GPS cycle slips.Investigation
I instrumented
decode_obsvmb()insrc/rcv/unicore.cto trace the lock time handling.The relevant code is:
The lock time logic itself appears to work correctly.
However, the trace revealed that two different GPS observation codes are assigned to the same observation index (
idx).Example:
Both observations use the same
raw->lockt[sat-1][idx]andraw->tobs[sat-1][idx]entries.As a consequence:
LLI_SLIP).This pattern repeats throughout the file, producing thousands of false GPS cycle slips.
Cause
sig2code()returnsCODE_L2L, butcheckpri()does not explicitly handle this code.As a result,
CODE_L2Lremains mapped to the standard L2 observation index, where it collides with another L2 observation.Temporary fix tested
Adding an explicit handling for
CODE_L2Lincheckpri()eliminates the collision and completely removes the false GPS cycle slips.After this modification:
Question
Is this the expected handling for
CODE_L2L, or should it instead receive its own dedicated observation index?I'd be happy to prepare a pull request once the preferred solution is confirmed.
Example of RTKPLOT (Sat Vis) observations from a RINEX file generated with RTKLIB_EX 2.5.1, showing numerous false GPS cycle slips.

Example of RTKPLOT (Sat Vis) observations from a RINEX file generated with the patched

convbin, showing that the false GPS cycle slips have disappeared.