GPS + Camera fun with the Raspberry Pi

July 15, 2013 4 Comments

We had some fun with our Raspberry Pi last weekend on a road trip to Michigan.  We mounted the Raspberry Pi Camera Module using a hacked up Multicomp case, and we also ran one of our GPS modules to track our position!  We found this article to be quite helpful in getting our GPS to work.

 

First off, a bit about our setup.  Here is a video showing the setup and the output from the GPS: 

To control the Pi in the car, we used on of our mini keyboards.  Naturally we did not type as we drove!

 

 

 

On the way out of Chicago, we had the camera mounted in the back window.  Here is a timelapse showing our drive from Wilmette, IL all the way to Grand Blanc, MI.  The video takes nearly 5 hours and compresses it to 1.5 minutes!

 

When we arrived at our destination, we discovered that the GPS logging wasn't working.  It turns out we started the logger before we started the GPS Daemon (I hate it when that happens).  So no GPS data for the trip to Michigan.

The next day we fixed that problem and got some good GPS data for our initial drive from Grand Blanc to Lansing.  Using the command "gpxlogger -d -f trip.log", you can log the data to a file.  Then, just use a site like gpsvisualizer.com to process the data into a Google map like this one:
Along that route we also logged our pictures into another timelapse, this time with the Raspberry Pi camera mounted in the front of the car.  We used the program "mencoder" to encode the video into an .avi file right on the Pi.  We probably need to play with the frame rate a bit to make this smoother, but not bad for a $35 computer!  



4 Responses

Craig
Craig

December 03, 2014

I am pretty sure you could have a CRON job that checks for connectivity and then sends the file.

Sean
Sean

November 16, 2014

Great article! I’ve got a Pi set up to create a .GPX file as well as a current position .KML file. Is there a way to have the Pi auto-upload either/both those files whenever it comes into wifi range of home, or as the signal drops and reconnects with a 3G dongle? Thanks!

Craig L
Craig L

July 27, 2013

Gary,

We don’t have any long Raspberry Pi cables, but I found a link to someone that made one: http://www.raspberrypi.org/phpBB3/viewtopic.php?p=362714#p362714

That is a great idea for a new product, BTW!

We haven’t figured out how to marry up the GPS and photo data, but I am sure it can be done. We got the GPS code off Adafruit’s tutorial site: http://learn.adafruit.com/adafruit-ultimate-gps-on-the-raspberry-pi

For making timelapse videos, check out this blog post: http://chicagodist.com/blogs/news/8287563-raspberry-pi-camera-for-timelapse-videos

cheers,
Craig

gary brown
gary brown

July 26, 2013

This is EXACTLY what I want to add to my little 16’ Scamp fiberglass trailer. I figured on putting my Pi in the trailer with the GPS and Camera at appropriate spots. The GPS would detect movement. When the Scamp is still… one picture every couple of minutes. When “on the road”… every 15 seconds.

Do you have any code and construction details? BTW… do you know if the camera cable can be extended with an added cable, or is it tied to it’s given length by the Magic of Electronics?

Leave a comment

Comments will be approved before showing up.


Also in News

The Raspberry Pi Pico
The Raspberry Pi Pico

July 28, 2021

Raspberry Pi Pico’s are a great microcontroller that has a fair amount of range, despite the slightly more tricky set up process, once it’s ready to go there’s a lot you can do. 

Continue Reading

Raspberry Pi Troubleshooting

June 30, 2021

Continue Reading

An introduction to soldering
An introduction to soldering

June 08, 2021

Soldering is a good skill to learn and improve throughout your making and DIY-ing, there’s quite a few situations where it will be the best option for a more permanent build.

Continue Reading