08-31-2020, 12:06 PM
(This post was last modified: 08-31-2020, 12:08 PM by turboscholz.
Edit Reason: fix typo
)
(08-31-2020, 11:07 AM)Jens Noritzsch Wrote: At least three Satellites are required, so there is not one time stamp… the OS –somehow– decides the time stamp that is given with a location.
Well, I think your comment contains the root cause of this issue, and I could prove this locally now with an indoor measurement of the acceleration and the location at the same time:
While the acceleration data was recorded from the start of the experiment, the data from the GPS signal was started to be recorded only 10 seconds later, because the GPS satellite connection was so bad indoors. This resulted in a measurement delay of the location data compared to the acceleration data of 10 seconds as well. In the end the acceleration data covered 40 seconds, but the location data only 30 seconds.
When automatically aligning both data files in the end, this is what happens:
Acceleration data | GPS Location data
------------------------------+---------------------------
0.000s (acc_datapoint_0) | 0.000s (gps_datapoint_0)
0.001s (acc_datapoint_1) |
0.002s (acc_datapoint_2) |
... | ...
9.999s (acc_datapoint_999 |
10.000s (acc_datapoint_10000) | 10.000s (gps_datapoint_10)
10.001s (acc_datapoint_10001) |
But actually, this is what should happen because of the delay in the retrieval of GPS location data:
Acceleration data | GPS Location data
------------------------------+---------------------------
0.000s (acc_datapoint_0) | (no data collected yet)
0.001s (acc_datapoint_1) |
0.002s (acc_datapoint_2) |
... |
9.999s (acc_datapoint_9999) |
10.000s (acc_datapoint_10000) | 10.000s (gps_datapoint_0)
10.001s (acc_datapoint_10001) |
... |
20.001s (acc_datapoint_20000) | 20.000s (gps_datapoint_10)
In a nutshell the issue is that both sensors are readout independently and that the time stamps of each data set is not the same from the beginning (when the play button is pressed).
Can this be fixed? I think this is a problem which could be solved on the application source code. When the first GPS data is retrieved, the time which passed already in the experiment should be added to the time of each consecutive data point.