1

what is the best way to get the time stamp from GNSS? I want to use just Galileo OR (GPS AND Glonass)? At the moment I use

Date gps_time = new Date(location.getTime()); but realized it just gives me the time of the fix. I'm not sure how to get the gps time over location manager...

in GPS-time in Android there is an example delivering gps time but without milliseconds. But I need them too.

Erni24
  • 11
  • 1
  • 3
  • Possible duplicate of [GPS-time in Android](https://stackoverflow.com/questions/7017069/gps-time-in-android) – Morrison Chang Nov 14 '19 at 19:35
  • Right, this helped to get the time. But is there e difference if the phone uses Glonass or GPS? Both areusing different time basis. Older phones can't use the GNSS interface – Erni24 Nov 17 '19 at 13:37
  • Not sure if you found this: https://www.gsa.europa.eu/system/files/reports/gnss_raw_measurement_web_0.pdf – Morrison Chang Nov 17 '19 at 17:01

1 Answers1

0

the ESA pdf and the test program GSPtest helped me.

Just newer phones are able to give GNSS raw measurement back. So with a new phone I took time = (long)(( clock.getTimeNanos() - ( clock.getFullBiasNanos() + (clock.hasBiasNanos() ? clock.getBiasNanos() : 0) ) )/1000000); to get milliseconds and add epoch delta between unix time start and gps time start EPOCH_DELTA = 315964800000L and the leap seconds (in milliseconds 18000).

That's it. (I think)

Erni24
  • 11
  • 1
  • 3