Russells Logo

Ruffle's Data Logging Project


Data Analysis

Collecting all the data is triffic... but naff all use without some means to make use of it.

The raw CAN-Bus data is recorded to the SD-Card in a CSV format producing files that look like this:


That's not a whole lot of use unless you're going to manually work out that the 0x100 packet is for the RPM and the first two data bytes (07 and F7) should be combined and converted into decimal to give you 2,039 RPM. The RPM CAN-Bus packet is simple; the others get a lot more complicated.

So the Data Logger's got an inbuilt export feature that converts the raw CAN-Bus data into a more friendly format that outputs a line for each GPS position. You end up with a file that looks like this:

1553340586.900861,52.829117,-1.381930,1.601000,1847,0,-0.32, 1.96,-4.10, 0.00, 3.16, 2.86,0,0,88.00,16.00,1,0,2,0
1553340586.997741,52.829105,-1.381930,1.410000,1882,0,-0.32, 1.96,-3.91, 0.00, 3.16, 2.82,0,0,88.00,16.00,1,0,2,0
1553340587.596818,52.829105,-1.381919,2.244000,1968,0,-0.32, 1.96,-4.10, 0.00, 2.95, 2.69,0,0,88.00,16.00,1,0,2,0
1553340590.800801,52.829094,-1.381919,0.302000,1890,0,-0.45, 1.84, 1.95, 0.00, 0.00, 0.00,0,0,86.00,16.00,1,0,2,0

Perhaps showing it in a tabular form illustrates it better

1553340586.90086152.829117-1.3819301.60100018471-0.32 1.96-4.10 0.00 3.16 2.860088.0016.001020
1553340586.99774152.829105-1.3819301.41000018821-0.32 1.96-3.91 0.00 3.16 2.820088.0016.001020
1553340587.59681852.829105-1.3819192.24400019681-0.32 1.96-4.10 0.00 2.95 2.690088.0016.001020
1553340590.80080152.829094-1.3819190.30200018901-0.45 1.84 1.95 0.00 0.00 0.000086.0016.001020

Each column heading describes what's being shown and the unit of measure. So "RPM:int" means it the bike's current RPM and the values are integers. The "TPS:percent" column shows the Throttle Position Sensor as a percentage (this is the throttle controlled by the ECU - the Grip column shows how much you're twisting the 'throttle' on the handlebars.

You can pull this CSV into your favorite spreadsheet program and play with it to your heart's content. Tip: you can paste the Lat/Long figures into Google Maps to see exactly where the data point was recorded; just seperate the lat/long numbers with a comma.

In order to keep the size of file manageable for analysis, the export function only outputs a 'Log Point' each time the GPS position changes and the RPM value is greater than zero; in other words when the bike is moving under it's own power. The Logger builds up the CAN-Bus received between each Log Point and outputs the summation.

Better Analysis

While looking at the data in a spreadsheet can be interesting, the aim (pun almost intended) has got to be displaying the datapoints in a graphical format together with the position on a circuit map.

The best known, in race bike circles, Data Logger is probably AiM but although their Race Studio software is free to download, they intentionally do not publish their input data format so unless someone has reverse engineered it, that's a dead end.

There are other very similar products and some are more open with their data formats but for now I'm working with Tom of Serious Racing to add the data logger information to his impressive lap displays. I like Serious-Racing as it's been done by an enthusiast and is provided FOC - just like my logger :)

Producing output for a different format wouldn't be that hard and it could easily be built into the Logger's firmware as a compile time option.

Valid HTML 4.01 Transitional