Modifying datalogger.h data format?

Inquiry and support for Freematics products
Post Reply
Wermz
Posts: 11
Joined: Thu Feb 02, 2017 8:40 am

Modifying datalogger.h data format?

Post by Wermz »

Hello,

First, let me preface my post with A) I am a total Arduino noob and do not know how to write code, but can upload it. and B) It looks like you have done a lot of hard work to come up with a quality product.

I am looking at purchasing Kit-3 so i can data log track days and make videos with telemetry overlay for gauges. RPM, throttle position, speed, etc. However in studying the data format I don't believe that it will work for the programs i use for the telemetry data, as they all use hard set columns. So i was wondering if it would be possible with the hardware you have in this kit, could it be made to provide data in set columns with header titles? so that all specific data is in a column. With one row being one time stamp?

I hope this makes sense, if not i could attach some samples. I would hate to make the investment and not get it to do what i need ultimately.

thank you.
protomor
Posts: 99
Joined: Wed Oct 14, 2015 9:17 am

Re: Modifying datalogger.h data format?

Post by protomor »

With coding you can do that. I'm not sure what your aim is. Are you trying to do a live data feed to gauges? Or are you trying to do some ex post facto data overlay on videos? If so, I'm already working on it.

The current issue with the out of the box code is that it doesn't log data all at once. It logs as things come in. Because the OBD2 protocol can take time to respond, the logger still collects accelerometer and gps data. As a result, you could have a few situations where you have a few GPS samples before you get an rpm sample from the OBD2 ELM327. You could lock it down so that you only log data when you receive data from the OBD2 protocol but I like having the extra data points. As a result, I'm working on some code to modify the datalog AFTER it's pulled from the SD card to tween the data in between.

Remember, this isn't a finished product. It's a DIY solution. If you want that, you should look into something else.
Wermz
Posts: 11
Joined: Thu Feb 02, 2017 8:40 am

Re: Modifying datalogger.h data format?

Post by Wermz »

Hello, thank you for the reply.

In direct answers to your questions; No live streaming of data. My primary goal is to use DashWare for gauge overlays on videos, and maybe some real time data while on-track that there is currently no gauge for.

Thank you for the explanation of how the code works, i was wondering if that is how the OBD2 polling worked. Can it be set to do 5 or 10hertz polling cycles?

If you don't mind my asking, how are you planning on performing the Linear interpolation of the missing data points? As I too was wondering if that might occur. I know DashWare has a function for that, and i believe that most spread sheet programs can do that as well.

Lastly I don't mind a little DIY as the tinkerer in me loves that stuff. I'm probably going to get it just for that alone, and in the mean time keep studying Stanley's code.
Wermz
Posts: 11
Joined: Thu Feb 02, 2017 8:40 am

Re: Modifying datalogger.h data format?

Post by Wermz »

Just ordered kit-3 so i can start tinkering. :)
protomor
Posts: 99
Joined: Wed Oct 14, 2015 9:17 am

Re: Modifying datalogger.h data format?

Post by protomor »

I just whipped up some code to translate from the output of the freematics unit to the way torque reads. That way, DashWare doesn't need to know the information came from somewhere else (I'm going to use DashWare too). For right not, I'm being lazy and just dropping the missing data points but averaging what they were first. In the future, I'll just linearly interpolate between points to make up the missing data.

OBD2 polling is as fast as the OBD2 protocol will spit things out and the freematics unit can read it. I can't tell you what it is because it changes based on how bad your code is and how fast your car's ECU is. Plus the more PIDs you pull, the slower your response is. I can get a batch of 4 PIDs back in 0.3 seconds on my older subaru, but the same data comes back in 0.1 seconds on my 2006 pontiac GTO.
Wermz
Posts: 11
Joined: Thu Feb 02, 2017 8:40 am

Re: Modifying datalogger.h data format?

Post by Wermz »

I've been using Dash ware for a long time. I like it a lot. Funny I have never noticed that it had a torque data profile.

So my stuff just came in and it all works perfectly. So naturally I'm afraid to tinker with any code for fear of messing something up. lol
Post Reply