: HOW-TO: Android Phone Data Logging and Video Overlay


blk-majik
02-23-2011, 02:38 AM
With a standard Android cell phone and a car mount that doesn't cover the camera, you can record your track session and use an inexpensive app to log your lap times, gps locations, g-forces, and more.

Here is an example video I made of one of my sessions using this method (2 parts):

http://www.youtube.com/watch?v=QHXysdudYGQ

http://www.youtube.com/watch?v=l6_gmYXeeNE

-------------------

Items required:
Android Cellphone - I used an HTC Incredible
TrackMaster (http://trackmaster.trackaroo.com/) by Trackaroo from Android market ($10)
Windows PC
RaceChrono2AVI (http://www.racechrono.com/news/?p=92) software (free)
OPTIONAL: Free 3GP Video Converter (http://www.dvdvideosoft.com/products/dvd/Free-3GP-Video-Converter.htm) (free)
Video Editing Software (I used Adobe Premiere 30-day demo. PowerDirector will also probably work)

------

At the track:
Before you get on the track, start up TrackMaster press the menu button when it gets to the main screen. Add information for your Profile, Vehicle, and Setup.

Next, from the main screen menu, go to Split Markers. Add a new Split Marker Set for your track. Enter the track name, and you'll be shown a satellite view map of your current location. Find the track and map out the split markers you wish to use around the track, starting at the finish line. Use enough markers so that the lines at least sort of represent the shape of the track. I suggest using a few more markers than the course has turns, using two markers for wider corners or sharp U-turn corners. Make sure your markers are in the center of the track, as if you put them off to one side and drive on the other side during a lap, it may not count that split marker and make you lose a lap. See the last couple minutes of my first video for an example of that!

Now you're ready to race! Once you're getting ready to grid your car, from the TrackMaster main screen, press the action/trackball button to start logging. It won't start until you've crossed the first split marker, which will likely occur after your warm-up lap. Before you get to grid, press the Home key to put TrackMaster in the background. Open your camera, switch to video mode, and start recording. Now go kick ass and take names :) When you're done, stop recording the video, go back to TrackMaster, and press the action button again to stop recording.

To view your lap times, split times, G-info, etc for the session, go to Sessions from the main menu and select your session.

-------
At home

Exporting Log Data
After your track day, the first thing you need to do is export all your sessions to CSV files using the RaceChrono format. To do this, go to the Sessions list and long-press the session you want to export until the option menu comes up. Select "Share", then select "Video Data". This will bring up a gmail email with the video data CSV file attached. Just mail it to yourself so you can get the file on your PC.

Creating Overlay Video
Open RaceChrono2AVI. This app is very buggy, so don't do anything experimental. If you're running Win7/Vista/2k3, I'd suggest right-clicking the program link and setting it to run in Windows XP SP2 comparability mode. This makes it much less crash-happy. Once it's going, click the "..." button by the ext box labeled "Racechrono CSV" and select the CSV file you just exported. Then in the drop downs, pick the first and last lap you'd like to replay data from. Then in the space above, drag and drop any components you want to show up in your overlay between the yellow frame at the top left. You can resize the frame as needed. i suggest setting the background and boarder of all your items to transparent. Once everything is where you want it, save your config in case it crashes (pretty common as you probably discovered by now). Now check the 'record avi' check box and push play. You'll have to select the video format you want to save. Microsoft Video worked fine for me, as do the Intel codecs. Play the output video to make sure it looks good and that a second is a actually a second :) Some formats play back too fast or too slow, which causes problems later. If it doesnt play back in WMP, try installing VLC Media Player and trying with it.
If you're still stuck, try this guide: http://www.scribd.com/doc/19200024/Racechrono-Software-Guide

Converting Your Video
Copy the videos you recorded from you phone to your PC. A lot of video editing software doesn't like android's 3GP format. If this applies to you, use Free 3GP Video Converter to convert them to mp4 or avi. This is pretty easy to figure out. Replay the final product and make sure the audio is in sync. If not, try exporting to a different format.

Overlaying Your Videos
Now the tricky part. Your video and your overlay won't be in sync. That is, yoru video starts when you pressed record on your phone, but your overlay doesn't start until the first time you pass the first split marker, which is much later. In your video editing software, you'll have to import your video and do any cropping or rotating you might need. Then import your overlay and position it wherever it needs to go. Then, you'll have to move your overlay in the timeline so that it starts at the right time, relative to where you video is. this is also a good time to trim your video and take out the parts before logging starts and after it ends. Once you have everything cleaned up and aligned, export the finish product to a format of your choosing.

Thats it! Enjoy :)

hollywood_X
02-23-2011, 02:46 AM
Damn thats cool

blk-majik
02-23-2011, 12:53 PM
It's a poor man's traqmate ;)

pdacton
02-23-2011, 12:59 PM
Very cool. When I tried something like this with the iPhone the GPS was all over the place - at times it looked like I was 200 feet off the side of the track! The HTC Incredible GPS must be a lot better than the iPhone.

blk-majik
02-23-2011, 01:19 PM
They make bluetooth GPS receivers that you can use with some aps, too. It makes the GPS resolution MUCH faster, like 10 datapoints per second. In those videos, you can see the dot only updates once a second or so as it is now. Not sure if the iPhone app supports these, but it might make it more usable if it does!

pdacton
02-23-2011, 01:35 PM
They make bluetooth GPS receivers that you can use with some aps, too. It makes the GPS resolution MUCH faster, like 10 datapoints per second. In those videos, you can see the dot only updates once a second or so as it is now. Not sure if the iPhone app supports these, but it might make it more usable if it does!

You're right - just did a quick search and there are a bunch of bluetooth GPS units that work with the iPhone, and run up to 10 Hz. Will definitely invest in one of those before my next track day, which is May 9 & 10 at Watkins Glen with Chin - still 2 novice spots open, if you're interested :)

blk-majik
02-23-2011, 03:33 PM
It's on a Monday/Tuesday? Thats kinda odd. I'd LOVE to do Watkins, but I dunno if I can get off work for that :(

blk-majik
04-02-2011, 06:48 PM
Here's some new video I made from last weekend's trip to the track. I changed to landscape mode and used VirtualDub and Avisynth to do the overlay. It's a bit more cumbersome, but a lot more straightforward and gives a lot better control. If anyone wants more info, just say so and I'll give some more detail.

http://www.youtube.com/watch?v=yC5_HinL5QI

http://www.youtube.com/watch?v=XgdIUFQdwTk

http://www.youtube.com/watch?v=yC5_HinL5QI

http://www.youtube.com/watch?v=g_ANAJuFyfk