GNSS weeks and seconds to UTC

I am attempting to read in GPS data with the time stamp in GNSS weeks and seconds. I have the function:

createGPSDate(int weeks, CalculusFieldElement milliseconds)

but I always get the return error createGPSDate is not defined. I am importing all of org.orekit.time so that’s not the problem. Further still, what is the Calculus Field Element that it takes in the millisecond argument?

Alternatively, I found the function

GNSSDate(int weekNumber, double milliInWeek, SatelliteSystem system, TimeScales timeScales)

which looks like it will also do what I want, but I cannot seem to define the Satellite System nor do I really know what that is.


Hi @separnell

The createGPSDate(...) method has been removed of AbsoluteDate class 4 years ago. It has been deprecated in 9.3 version and removed in 10.0 version. The current way to initialize GNSS epoch is, like you propose in you message, to use the GNSSDate class.

Orekit supports different GNSS time scales: GPS, Galileo, Beidou, QZSS, Clonass, and IRNSS. Those time scales have different reference epochs and different number of week cycle (i.e., number of weeks before a GNSS rollover). So, the SatelliteSystem parameter in the GNSSDate constructor is used to define the time scale of the GNSS date. Therefore, you have two possibilities:

  • If you know the time scale of your GNSS epoch, uses the SatelliteSystem key correponding to it (i.e., SatelliteSystem.GPS for GPS, SatelliteSystem.GALILEO for Galileo, etc.)
  • If you don’t know it, probably it is GPS. So, uses SatelliteSystem.GPS.

Best regards,