Can you help me with a few data logging concepts?

Discussion on the Lua Scripting capabilities for RaceCapture/Pro. Also see the <a href="http://autosportlabs.net/RaceCapturePro_Lua_Scripting">Lua Scripting Guide</a>

Moderators: JeffC, stieg

Post Reply
davef_dci
Posts: 38
Joined: Wed Mar 22, 2017 4:57 am

Can you help me with a few data logging concepts?

Post by davef_dci »

Howdy,

I am running a race capture pro unit in an older Dodge Neon for endurance (Chump car) racing. We're playing around with the OBDII - CAN interface but so far all our meaningful data is coming into race capture via analog sensors wired into the unit and calibrated. This includes oil pressure, oil temp, h20 temp, wideband O2, MAP, RPM and fuel level.

We're running a non-OEM fuel map and would like to create a log of RPM, O2 and MAP readings so we can analyze our O2 readings over a range of operating conditions and possibly tweak our fuel map.

I am assuming we want to generate an ASCII or CSV file on the SD card that has a dump of data that looks something like:

Time RPM O2 MAP Speed Gear etc....
12:23:34.5 5775 13.4 2.34 96 4th
12:23:35.0 5702 12.9 3.21 91 4th

I think our thinking is that we would be able to create a large enough pool of data that we could go back and create a view of our fuel map by post-processing the RPM, o2 and MAP readings in Excel or something like that.

I am unclear on how to best do this and confused about the logging features in general.

I am assuming this needs to be done by writing data to the SD card and viewing it after our race - which is fine. We're not necessarily looking to do this in real time from the pits - although that would be cool.

When I enable logging in my LUA script - i.e. startlogging() - what exactly is logged? Does this function simply capture any data that is being written to the output window using the println function or something else?

If so, is the basic strategy to set up the timing on your ontick() function and use the Println() function to output the data you want to the SD card or am i conceptually confused.

Is there a strategy you would recommend to get the data we need?

gizmodo
Posts: 138
Joined: Mon Aug 05, 2013 10:22 pm

Post by gizmodo »

Logging is handled by the RaceCapture device, you don't need to do anything other than starting and stopping it. You do that by using lua to start and stop the log or by pushing the button on the unit. It will log all the channels you have setup.

The print and println functions are for debugging when you have the lua scripting window open in the application and the poll log checkbox is checked. As far as I know there is no way to write to the SD card.

davef_dci
Posts: 38
Joined: Wed Mar 22, 2017 4:57 am

Post by davef_dci »

Got it. So this data gets "logged" to the SD card?

What frequency is the data stored at and is this adjustable?
What format does the data show up as

(I don't have access to the car or the race capture unit so I can't experiment right now. Just wondering what to expect).

gizmodo
Posts: 138
Joined: Mon Aug 05, 2013 10:22 pm

Post by gizmodo »

The log is just a simple csv file. You configure the rate you want each channel logged in the RaceCapture app by selecting the frequency. It is sparsely populated in that you will see empty entries for slow logging channels. Here is a sample from one of my logs (I truncated the first line so it wouldn't break the page layout).

"Interval"|"ms"|0|0|1,"Utc"|"ms"|0|0|1,"TPS"|"%"|0|100|50,"Brake"|"PSI"|0|2000|50,"Battery"|"Volts"|0.0|20.0|1,"AccelX"|"G"|-3.0|3.0|25,"AccelY"|"G"|-3.0|3.0|25,"AccelZ"|"G"|-3.0|3.0|25...
75044,1499894679725,0,0,14.19,0.1,0.03,0.98,-1,-0,-1,780,1,1,1,61,57,50,48,49,50,50,53,50,51,47,46,46,46,47,14,51,54,52,44,44,45,46,49,49,48,48,45,42,42,42,42,44.73605,-93.071991,0.0,0.0,10
75064,1499894679745,0,0,,,,,,,,780,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
75084,1499894679765,0,0,,0.1,0.03,0.98,-1,-0,-1,780,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

Post Reply