Racing Telemetry On A Cockpit View


[Martin] has a Lotus Elise and access to a track. Sounds like fun, huh? The only problem is that the dashcam videos he makes are a little bit boring. Sure, they show him flying around the track, but without some sort of data it’s really hard to improve his driving skills. After thinking about it for a while, [Martin] decided he could use his Raspberry Pi and camera module to record videos from the dashboard of his car, and overlay engine data such as RPM, throttle, and speed right on top of the video.

Capturing video is the easy part of this build – [Martin] just connected his Raspi camera module and used the standard raspivid capture utility. Overlaying data on this captured video was a bit harder, though.

[Martin] had previously written about using the Raspi to read OBD-II data into his Raspi. Combine this with a Python script to write subtitles for his movies, and he’s off to the races, with a video and data replay of every move on the track.

The resulting movie and subtitle files can be reencoded to an HD movie. Reencoding a 13 minute HD video took 9 hours on the Raspi. We’d suggest doing this with a more powerful compy, but at least [Martin] has a great solution to fix his slightly uninformative track videos.

10 thoughts on “Racing Telemetry On A Cockpit View

  1. The Pi has hardware-accelerated h.264 encoding (which is how it saves the movies in realtime in the first place). RaspiVid leverages Broadcom’s “MMAL” pipeline-based multimedia processing API for this, basically connecting the camera output to the encoder input, and saving out the encoder output. It would be possible to do the overlay in a custom-written MMAL component, attached between the camera and the encoder.

  2. I have been wanting to do this for everyday driving and security. My plan was to put a RasPi in my car with a webcam as a dashcam/security camera using motion to record the frames. I thought it would be cool to overlay GPS and speed info on the frames with/instead of time/date. Two issues, one was that motion didn’t allow for overlay of text like that second the RasPi would choke on large frame pics. I could only get it to record 150×150 pixel pictures. I think it was lag in the USB chip or hub that was preventing full 720p frames.

    I got a RasPi camera module the other day and plan to try again, I still would like to overlay info from GPSd on the frames. This seems promising.

  3. Very cool. Gotta say, it’d be way more entertaining if there was audio too. Of the engine, of course, not some cheesy music soundtrack.

    Another thing that might be interesting, maybe even helpful, would be a brake indicator. Just a dot in the telemetry display that appears when you hit the binders.

      1. That depends. IIRC, Formula 1 telemetry generally shows that race drivers use brakes (and throttle) pretty much as on/off switches. It makes sense; if you’re braking at something less than 100%, you could shave off a fraction of a second by braking slightly later instead.

        On the other hand, if you can get the full position data, it would be interesting to use it to see how true that is in this case.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.