Coby Wheel
BMW Garage BMW Meets Register Search Today's Posts Mark Forums Read

Go Back   BMW M3 and BMW M4 Forum > BMW F80 M3 / F82 M4 Technical Topics > Track / Autocross / Dragstrip / Driving Techniques

Post Reply
 
Thread Tools Search this Thread
      11-29-2021, 10:16 AM   #1
TrackEnthusiast
Private
64
Rep
52
Posts

Drives: 125i 2014
Join Date: Jan 2016
Location: Brazil

iTrader: (0)

Found a way to get high quality telemetry for F-series

So, I needed to learn how to code (Node.js)... and since simply watching classes is not the way, you acctually have to code to learn, I taught to myself: "Well, maybe I should think of a project I would like to do". Than, being a trully track day addict, I decided "Ok then, maybe I should do something related to cars and racing" and then I remebered reading in this forums that many people were interested in getting the data from the MLaptimer app, so I decided to start there: making a web app to get the telemetry data from the app files to render videos. That was a pretty easy task and, when it was nearly finished, I discovered somethnig really, really cool. To explain what it is, I'll have to start from the beggining.

At that time, (6 months ago) besides learning to code, I also needed to buy an appropriate GPS to record my track activities (karting, tracking an old opel Kadett and a BMW 125i F20). The GPS data from MLaptimer, despite coming from the cars GPS, is as bad as the data from any smartphone, since navigation GPS chips operates at 1 Hz. So, I was allways browsing the web after a good deal for a Qstars or any other bluetooth GPS. However, they are expensive and also it would be a pain to integrate 3 different data sources: The video from the GoPro, the sensor data from the MLaptimer app and the GPS. I considered acquiring a OBDII stick and then using HLT or RaceChrono to put everything together, as many people do. My problem with this solution was that I know from previous attempts that data acquired with this OBDII dongles, many times, is not accurate. Also, that would be too many things to setup before getting in the track...

But then, for pure luck, the solution for his problem glanced right in front of my eyes: A friend of mine was showing me the footage of a kart session he acquired with his GoPro 7 camera and then rendered with race render, which also renders to the video the track drawing as acquired by the cameras GPS (all GoPro's from Hero 5 on have GPS). By watching the track drawing, I realized that the cameras GPS was really good, because I had recently drove that same track in a hot lap with my 125i and the track drawing I had from the cars GPS was pretty squared. Then, I asked him to show me the data file that race render generates from the GoPro video and, in the file, I could see that the cameras GPS was generating nearly 20 pts/sec. Then I had a blast: Why not using the GoPro to film and also as the GPS and then integrating the MLaptimer app data by synchronizing the high resolution GPS track from the camera with the low resolution GPS track from the app?

It took me a couple of months to code everything and also a couple of track days to test, but news is: IT WORKS BEUATIFULLY! Even with the camera inside the car, the GPS data from the GoPro is accurate enough to time the laps within 0.05 s. So, just to clarify how it works: You have to enable GPS in the camera and put it to record when you start your session, as you would normally do. At the same time you put MLaptimer app to record and, latter on, the code I wrote will process the video and the MLaptimer file in the browser and generates a .csv file wich you can use to render the data to the video with the app you like better. I used Dashware, since it is free and allows to personalize the dashes. Only thing it is windows only (sorry mac users).

Video rendered from the .csv file with DashWare:



At this point maybe you are thinking "rendering videos with dashes is not that cool, there are many other ways to achieve that, including the BMW OBDII dongle, which costs 200 bucks". And you are right, rendering videos is not the coolest part. What is really cool about the code I wrote is that, besides outputing the .csv file from the parsed data, it will also output a .vbo file which you can open with Circuit Tools and then compare your laps and sessions with all sensor data integrated!!! That is really cool, you can analyze your laps by sectors, ompare different racing lines, position of your braking, throtle modulation in the corners, and more, all in sync with the track footage!



Comparing 2 fast laps with circuit tools (my computer laged a little when I made the video, but you get the point). In the graphs below the video you can see throtle position and braking G-force (combination of brake switch signal with longitudinal G force). Besides that, you could also have graphs for gear (auto-only), engine RPM, GPS speed and g forces. So, how cool is that?
Appreciate 6
      11-29-2021, 12:15 PM   #2
NYG
Brigadier General
NYG's Avatar
United_States
10580
Rep
3,643
Posts

Drives: Corvette Z06
Join Date: Feb 2017
Location: Brooklyn, NY

iTrader: (0)

We've got another Brazilian engineer on our hands! Good stuff.

My problem with the GoPro GPS is that while it does get a decent map of the track the speed/accel/decel is always atrocious for me. It's off by a significant amount. The overall lap time is more or less ok but the important data is always really screwy. I need to use OBD for speed. Maybe the new GoPros are better though? When I tried this it was with a Hero 5 Black.
Appreciate 0
      11-29-2021, 09:15 PM   #3
TrackEnthusiast
Private
64
Rep
52
Posts

Drives: 125i 2014
Join Date: Jan 2016
Location: Brazil

iTrader: (0)

Quote:
Originally Posted by NYG View Post
We've got another Brazilian engineer on our hands! Good stuff.

My problem with the GoPro GPS is that while it does get a decent map of the track the speed/accel/decel is always atrocious for me. It's off by a significant amount. The overall lap time is more or less ok but the important data is always really screwy. I need to use OBD for speed. Maybe the new GoPros are better though? When I tried this it was with a Hero 5 Black.
Hi man, thanks for the interest. I am curious about what you just said: The track drawing was good but the speed was off? That's strange, since position and speed should allways display the same accuracy. About he accel/deccel, that's really difficult to capture properly with a GoPro or cell phone, because the mounting stiffness will allways be too low and interfere with the accelerometers, besides the poor positioning (should be as low as possible in the car to be good).

I've done some extensive testing with my GoPro hero 5 black and figured out that, taking some precautions, you can get a very high quality GPS track. First and more important: The GoPro needs time to find satellites and get a decent GPS lock before start recording. After you hit record, the camera doesn't look for satellites anymore. In practice, what you have to do is to turn on the camera (side button) and leave it in open sky for a couple of minutes before start recording. Second is the camera mounting position. Above the car is ideal, however, in the car low under the windscreen is almost as good as outside. Alternatively, if you have a sun roof, fixed below it works fine most of the time, but you'll see 1 to 2 m error in some sections.

Cool thing is, GoPro is only for video and GPS. The car sensors MLaptimer acquires data from are VERY, VERY good. The accelerometers readings doesn't come from the iPhone sensors, but from the cars sensors. Look carefully at the gauges in the video below. The accelerometers and the rpm gaguge responds to every bump on the track. In the round G meter, you can see the weight shifting front to rear in the bends. It is really sensible. Last, about speed, the app also uses GPS speed (it acquires 1 pt/sec, but averages to 2 pt/sec). Because of that, in my code, I decided to use the GoPro GPS based speed and, as long as I could test, it was accurate.

If you still interested, send me PM and I'll give you access to the code so you can test.

Appreciate 0
      01-30-2022, 05:05 PM   #4
TrackEnthusiast
Private
64
Rep
52
Posts

Drives: 125i 2014
Join Date: Jan 2016
Location: Brazil

iTrader: (0)

New setup: 2 GoPros and picture in picture video

So, another track day done. Lots of fun with other BMW enthusiasts. Also, I tried a new setup for my telemetry rig: Used the GoPro 5 right under the windshield, for better track view and also better GPS signal. And used a GoPro 4 under the sunroof, just to get the driver perspective. Below the result, hope your guys like and, if anyone wants to use a similar rigup, just let me know and I'll explain better how to.

Appreciate 1
NYG10579.50
      02-01-2022, 09:25 AM   #5
SYT_Shadow
///M Powered for Life
SYT_Shadow's Avatar
11469
Rep
10,328
Posts

Drives: E90M/E92M/M4GTS/M4GT4/X5M
Join Date: Sep 2010
Location: Greenwich, CT

iTrader: (2)

Impressive work, thank you for sharing
Appreciate 0
Post Reply

Bookmarks

Tags
gopro, mlaptimer, telemetry, track day

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -5. The time now is 11:04 PM.




f80post
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
1Addicts.com, BIMMERPOST.com, E90Post.com, F30Post.com, M3Post.com, ZPost.com, 5Post.com, 6Post.com, 7Post.com, XBimmers.com logo and trademark are properties of BIMMERPOST