tomojitakasu / RTKLIB

2.58k stars 1.63k forks source link

Ordering of ephemerides : RINEX vs RTCM #66

Closed asymingt closed 8 years ago

asymingt commented 9 years ago

Hi Tomoji

I've managed to load NAV data from combined RINEX 3.02 broadcast ephemerides (using pull request #65). My goal is to package the NAV data into RTCM3 type 1019 and 1020 messages over TCP. I have noticed however that readrnx() appears to order the nav.eph array by the order given in the RINEX file (all satellites, all times). However, encode_type1019() expects the nav.eph array to be ordered such that the ephemeride for satellite with id n is located at nav.eph[n-1]. Is there a way to preprocess the nav.eph array for use by the RTCM3 NAV encoders?

Thanks Andrew

tomojitakasu commented 9 years ago

Usually, RINEX NAV includes multiple ephemerides for a satellite. To generate RTCM nav message, you have to select one of them. So you can write codes to select an ephemeris in nav struct derived from RINEX and save it to nav in rtcm sturct for gen_rtcm3().