Date and Time of data logging

Inquiry and support for Freematics products
Post Reply
Vasanthi91
Posts: 4
Joined: Sat Mar 11, 2017 8:03 am

Date and Time of data logging

Post by Vasanthi91 »

Hello,

I am trying to collect OBD data over a long period with my car. The date and time is always set to default in the recorded data. It is currently using millis() to obtain the date.

char buf[255];
byte n = getGPSRawData(buf, sizeof(buf));
state |= STATE_GPS_READY;
if (n) {
dataTime = millis();
logData(buf + 4, n - 6);

What can be done to fix this?

Thanks,
Vasanthi
protomor
Posts: 99
Joined: Wed Oct 14, 2015 9:17 am

Re: Date and Time of data logging

Post by protomor »

Can you elaborate what you want instead?

I've had issues with the GPS unit giving the wrong time and then "resyncing" mid way though. My logs show minute (and sometimes huge) jumps in time that most certainly did not happen. I'm thinking about just getting the date/time from the GPS on first boot, then using milis() to offset from there as it's just more accurate.
Vasanthi91
Posts: 4
Joined: Sat Mar 11, 2017 8:03 am

Re: Date and Time of data logging

Post by Vasanthi91 »

The excel files being saved in the SD card have default time. We were planning to use the date of the excel files to sort the date and time.
protomor
Posts: 99
Joined: Wed Oct 14, 2015 9:17 am

Re: Date and Time of data logging

Post by protomor »

I guess you mean the date time stamp on the file itself? The data inside the file is offsets not full time. So you can't sort within a file. I'm not really sure what you're asking. Can you give an example?
Post Reply