tomojitakasu / RTKLIB

2.5k stars 1.59k forks source link

Bug in the file src/rtcm3e.c, Glonass #58

Open doupov opened 9 years ago

doupov commented 9 years ago

Dear group If using str2str input stream NVS and from the output stream RTCM3, I disappear GLONASS satellites. Am I doing something wrong?

Roanish commented 9 years ago

I have discovered this issue also. It is a bug in the rtcm3 decoder/encoder code in the 1012 message format where the sv channel is not passed through with the correct variable.

I made a mod which fixes this but never got around to doing a push.

I am writing this on my phone. But when I get back to my PC I will send more info.

Roanish. On 8 Nov 2014 11:16, "doupov" notifications@github.com wrote:

Dear group If using str2str input stream NVS and from the output stream RTCM3, I disappear GLONASS satellites. Am I doing something wrong?

— Reply to this email directly or view it on GitHub https://github.com/tomojitakasu/RTKLIB/issues/58.

Roanish commented 9 years ago

Details:

The bug presents itself in the file src/rtcm3e.c It will affect 1009 1010 1011 and 1012 glonass messages.

The lines of code affected: 584, 620, 658, 698.

code: fcn=fcn_glo(sat,rtcm);

fcn_glo() is null with standard glonass messages unless a 1020 ephemerides message has also been decoded (which isn't the case most of the time). This means that the RTCM3 glonass SV's all get encoded with a null channel number of -7 in the output stream. This obviously confuses your gnss receiver.

I got around this by assigning the sv channel to a new variable in the decoder (NVS decoder in your case) and re assigning it to the 'fcn' variable in the encoder. As the channel will always stay the same for each SV, this works fine.

I'm sorry i do not have a specific fix for you, mine was a bandaid patch with a different decoder and will not work with NVS. This bug should be fixed in the root code anyway, shouldn't be an issue for tomojitakasu or another coder to fix.

Ta,

Roanish.