Sweet, sweet motorcycle GPS/Video Sync

Discussion in 'Mapping & Navigation' started by rubberneck, May 7, 2009.

  1. rubberneck

    rubberneck Area Man

    Joined:
    Jan 16, 2009
    Oddometer:
    28
    Location:
    Streets of San Francisco
    I recently bought a VIO POV video camera and a Garmin 60csx and thought it might be kind of cool to sync up the video footage with my tracks. I looked around the web for a tool/example that could do this with Google Earth without success so I wrote it myself using the Google Earth and YouTube javascript APIs. There's still a fair amount of cleanup work and enhancements yet to be done, but it turned out pretty cool for the initial cut. The next version will most likely have the virtual camera flying above and behind where the video motorcycle is, with the correct heading.

    You'll need to have the Google Earth plug-in installed, just as you need to install Flash to watch the YouTube on your Interweb. Make sure you wait around long enough to let the Earth show up and zoom in... then play the video. (Those using a Mac should use FireFox rather than Safari).

    <IFRAME src="http://homespunrowdy.com/publicmisc/walker/HHSyncro.html" width=835 height=370>
    No Dice, Jack.
    &nbsp
    </IFRAME>

    The footage is from Hollister Hills a couple of weekends ago for a Doc Wong dual sport clinic. I'm heading to Carnegie this weekend and will try to grab some additional footage/tracks.
    #1
  2. BlueLghtning

    BlueLghtning Riding is my passion

    Joined:
    Feb 16, 2004
    Oddometer:
    5,533
    Location:
    Newnan, GA
    That is awesome! Nice job.

    Being a map geek, its totally cool to follow along on the map.
    #2
  3. Dolly Sod

    Dolly Sod Red Clay Halo

    Joined:
    Aug 18, 2003
    Oddometer:
    14,072
    Location:
    Richmond, Va

    That's very nice.

    What camera are you using?
    #3
  4. rubberneck

    rubberneck Area Man

    Joined:
    Jan 16, 2009
    Oddometer:
    28
    Location:
    Streets of San Francisco
    Thanks. It's the <a href="http://www.vio-pov.com/products/pov_15.php">VIO POV 1.5</a>.

    <img src="http://www.vio-pov.com/images/1_5/pov15_big.jpg">
    #4
  5. EmmEff

    EmmEff Long timer

    Joined:
    Oct 21, 2008
    Oddometer:
    1,824
    Location:
    Innisfil, Ontario, Canada
    Very cool!

    Can you explain some of the technical details? Are you streaming the GPS track to the Google Earth API?
    #5
  6. rubberneck

    rubberneck Area Man

    Joined:
    Jan 16, 2009
    Oddometer:
    28
    Location:
    Streets of San Francisco
    Thanks, MF. So I'm not really "streaming" the track. It's all done with javascript so you can see exactly what's going on behind the scenes. In a nutshell, I'm taking my known tracks in gpx format (xml) for each recorded second and extrapolating each of the points (latitude & longitude) between known points/times for each of the unknown seconds.

    With the raw GPS data in gpx format, the GE view is a bit choppy as you may only have one point explicitly captured every 3, 5, 10 or more seconds. Smoothing out the points is a bit less jarring.

    Once I have an array of the latitudes and longitudes for any given second, I can fetch that point from Google Earth for any given second of the YouTube video. YouTube has an API that returns the current second. If you jump ahead in YouTube, the GE view will follow to that time. The same is true if you rewind.

    I've received some feedback from a couple friends that think it might be even awesomer if I show a static map with a little dot or motorcycle icon to show where the video is currently being taken. That might be my next version... or a toggle switch to show both views. Heading out in the morning to get more data...
    :cromag
    #6
  7. EmmEff

    EmmEff Long timer

    Joined:
    Oct 21, 2008
    Oddometer:
    1,824
    Location:
    Innisfil, Ontario, Canada
    I wish I had the creative genius! :)

    The moving dot on the map would be neat too.

    Thanks for the explanation!
    #7
  8. DocWong

    DocWong Long timer

    Joined:
    Jul 30, 2004
    Oddometer:
    1,183
    Very nice job!

    I like the results of the video camera that's mounted on your helmet. I was leading this ride and the video I got was a lot bumpier due to it being mounted on my bike.
    #8
  9. brooks

    brooks Been here awhile

    Joined:
    Jul 2, 2006
    Oddometer:
    333
    Location:
    Port Angeles
    Hollister hills eh?
    #9
  10. BykBoy

    BykBoy Meshuganeh

    Joined:
    Aug 21, 2003
    Oddometer:
    563
    Location:
    Reston, VA
    :lurk
    #10
  11. DocWong

    DocWong Long timer

    Joined:
    Jul 30, 2004
    Oddometer:
    1,183
    Yes, this footage was taken during the ride part of my dirt riding clinic. Next time, I'll put on knobbies on my 1200 GS and climb Twin Hill and hopefully get video of that climb, should be interesting as it's a long steep climb.
    #11
  12. Jeffy

    Jeffy Hmm...

    Joined:
    Feb 17, 2006
    Oddometer:
    5,470
    Location:
    SF - East Bay
    Wow, I really like what you have done. It would make any trip really easy to follow. :clap

    No one went through the Tank Trap or the Mini Rubicon? :lol3
    #12
  13. rubberneck

    rubberneck Area Man

    Joined:
    Jan 16, 2009
    Oddometer:
    28
    Location:
    Streets of San Francisco
    I'm planning to document part of a trip I'm doing this summer (California to Colorado and back via the Pony Express, parts of the TAT and other random tracks) using this technique. I can basically just leave the camera rolling for about 6 hours at a time and then swap memory cards, and the Garmin just grabs data about where you are as you go.

    The major limitation right now is that YouTube only supports < 10 minute videos. My current plan is to embed links to the more interesting parts of the journey in YouTube within a Google Earth Map. You could zoom into Google Earth, click on a little camera icon, and then watch the video for that particular location.

    I've got a fair amount of design work and testing to do if I actually want to pull this off, but I think it has the potential to be pretty cool -- and informative.

    BTW, I got some nice footage/tracks of a decent get-off at Carnegie this past weekend. I should have it posted by the time the bruise on my left arm fades.
    #13
  14. rubberneck

    rubberneck Area Man

    Joined:
    Jan 16, 2009
    Oddometer:
    28
    Location:
    Streets of San Francisco
    As promised here's the crash from Carnegie. As for why it's posted here, I updated the view in Google Earth this time. I hard-coded the heading, tilt and location of the camera, but it changes the perspective a bit. The good part is at about 1:15

    :kurt
    #14
  15. mhawk

    mhawk n00b

    Joined:
    Oct 10, 2012
    Oddometer:
    2
    Hi Rubberneck- I've been reading about your GE/YouTube/Camera system and have been wondering if you've made any updates to it? I'm really interested in setting up a similar type of system but with 4 GoPro cameras. Any ideas/suggestions are welcomed!
    #15
  16. rubberneck

    rubberneck Area Man

    Joined:
    Jan 16, 2009
    Oddometer:
    28
    Location:
    Streets of San Francisco
    Cool! I haven't played around with it in a couple years, but would be happy to help out. Feel free email me dacawa {at} gmail if you'd like to collaborate.
    #16
  17. mhawk

    mhawk n00b

    Joined:
    Oct 10, 2012
    Oddometer:
    2
    Thanks. I sent an email to the address provided.
    #17