I just realised that on android the timestamps you get from a GPS Location update are in ms since epoch whereas the timestamps of SensorEvent updates(e.g. of the Accelerometer) are in ns since startup.
I would like to convert the GPS timestamps to the format of the SensorEvent timestamps, does anyone know a good method to do this?
I tried the following:
I measured once the time of system startup since epoch:
startupTime = System.currentTimeMillis() - SystemClock.uptimeMillis();
For each gps location update I subtract the startup time:
timestamp = loc.getTime() - startupTime;
But those converted timestamps do still not conform to SensorEvent timestamps, there is still a difference of a couple of seconds...