harshadms / galileo-sdr-sim

Galileo E1B/C Signal Generator
33 stars 9 forks source link

date2gal #13

Open le0nidus opened 3 weeks ago

le0nidus commented 3 weeks ago

In the function void date2gal(const datetime_t t, galtime_t g), which is a copy of date2gps in GPS-SDR-SIM, the calculation is wrong. According to GST (Galileo System Time), the start epoch is 00:00 UT on Sunday 22nd August 1999 (midnight between 21st and 22nd August). In the code the start epoch is midnight between Jan 5 and Jan 6 in 1980. This difference may cause to wrong time transmission in the nav messages (leading the receiver to sense a wrong UTC time). https://www.gsc-europa.eu/galileoSystemTime

le0nidus commented 3 weeks ago

gal2date also needs a fix for the same reasons. Maybe it's better to hold 2 structs: galtime_t and gpstime_t, so if this project and GPS-SDR-SIM will ever be merged, the merge will be easy. the usage will be in a way that all the conversions and times in the project will use gpstime_t, and only nav messages will use galtime_t

harshadms commented 4 days ago

Ah yes, that makes sense. I do plan to merge GPS-SDR-SIM :)