Page 1 of 1

Date and Time of data logging

Posted: Tue Apr 11, 2017 10:44 pm
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

Re: Date and Time of data logging

Posted: Tue Apr 11, 2017 11:29 pm
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.

Re: Date and Time of data logging

Posted: Fri Apr 21, 2017 5:28 am
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.

Re: Date and Time of data logging

Posted: Fri Apr 21, 2017 8:27 pm
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?