How to Setup GPS Tracker for Raspberry Pi

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Applause] [Music] [Music] in this tutorial we're going to show you how to set up a generic GPS receiver for a Raspberry Pi model B+ so if your Raspberry Pi has internet that's actually not sufficient to reliably geolocate your device and the reason is because a remote web machine only would know your internet access point router and that router IP address actually doesn't necessarily map to any any physical location especially in a world where ISPs Internet service providers rotate IP addresses especially for mobile mobile data and mobile internet so in order to reliably get GPS coordinates you actually do need a physical device that is able to read satellite data and that's what this is here it could do more than just longitude latitude GPS that can do things like altitude climb movement speed that sort of thing but the primary purpose is to reliably locate a device at any given point so the first thing we're going to do is actually power and turn on our Raspberry Pi but we're going to turn it on without the GPS without the GPS unit plugged in and the reason we're going to do that is so that we're going to be able to find which port the GPS unit is attached to so let's just first turn this on okay so we have a Raspberry Pi turned on and again the GPS receiver is not plugged in and the reason we did that is so that we can see what serial it's going to show up as in our console here so we can show the different cereals if we go to dev and then do a list so we can just kind of take a look at this we can see TTY and then there's something called TTY m am a zero and that's probably like our keyboard or something like that but we can kind of just get a feel okay so these are the current cereals and whatever we plug in is going to show up here so I'm going to go ahead and plug in the GPS receiver and then we can refresh the list and we should be able to see our device show up ok so again I'm just taking my GPS receiver and I'm picking any USB port to plug it into ok that looks good ok and then let's refresh our list here LS ok so there's a new device TTY a CMO so because that wasn't there before we know that that represents the GPS so now we need to install a little bit of software and it needs to bind to that serial the name of the package is called GPS D and that's what we're going to use to read the GPS data I'm going to go ahead and start running some commands here ok so now that we have our GPS receiver plugged in and we know what serial it's tied to we're going go ahead and install the gpsd package so the first command is just going to be sudo apt-get install gpsd gpsd - clients and Python - GPS now okay I already had it installed so it was pretty quick and then we're going to stop the gpsd service rebind it to the to the correct serial and then restart it so that command is going to be sudo system sudo systemctl stop gpsd dot socket and then sudo systemctl disable gps DDoS okay okay and then i noticed that there was one other change that we should make in the package so let's go ahead and do that there is a config file that we're going to edit I'm going to use them turning to them Lib system system D system gpsd dots socket so I already edited this I believe but basically out of the box it's gonna give you the local host IP of 127.0.0.1 and you want to change that to ooo so I already change that here but if you hadn't changed that yet you would make that change and then you did : X and that will close out of that file and save it at the same time and then now we're just going to kill any ongoing process so sudo kill all any ongoing process around gpsd no process found that's fine all right so now we're going to bind gpsd to the serial that we found so let's go ahead and do that so sudo gpsd so this is telling the package where it should listen to essentially and in my case it's TTY AC and now there's a bunch of utilities that gpsd gives us but essentially we want to be able to read our GPS data so one of those such utilities is called GPS Mon it's a GPS monitor so let's go ahead and run that and see if we get any data GPS Mon okay all right so we can now see some GPS data coming in again it keeps going in and out but we can see we have a latitude here and a longitude so we're gonna take that and you can see now it's gone again we're gonna take that and we're gonna plug that into Google Maps and see what it gives us for the actual address so let's go ahead and do that okay so let's plug in the coordinates that the GPS gave us so currently it's set to New York we are in Boston so if this is accurate at all it shouldn't move this over to having been in Boston so okay it was reading for latitude 42 dot three four one nine four and then for longitude it was reading West which I guess is negative seven one dot oh nine nine one six eight and then we're gonna do get a dress and see where that puts us okay so it didn't quite get my address but I'll tell you this is a cross street of my address so very close now I don't know if that's due to the GPS going in and out and that's why it's not exactly my address or if I didn't add enough decimals when I put the longitude and latitude in there so it could be you know one or the other but very accurate I mean it's my neighborhood it's right near my street so anyways that's how you use the GPS receiver to get your actual GPS coordinates on any Raspberry Pi and again this is just a generic receiver that I a GPS receiver that I got on Amazon so this approach should work for you know most of the GPS receivers that you see on Amazon anyways thank you for listening you
Info
Channel: Data Slayer
Views: 137,810
Rating: undefined out of 5
Keywords: raspberry pi, raspberry pi 3 b+, raspberry pi 3, raspberry pi zero w, internet of things, GPS receiver, etcher, raspberry pi tutorial, arduino, arm cpu, install raspbian on micro sd card, install raspbian, how to configure raspberry pi gps, install gps on raspberry pi, usb gps, google maps gps, google earth gps, External GPS Antenna, raspberrypi gps module, raspberry pi gps module, gpsd, gpsmon, raspberry pi gps tracker, gps hat
Id: A1zmhxcUOxw
Channel Id: undefined
Length: 9min 52sec (592 seconds)
Published: Sat Nov 03 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.