Adding GPS to Raspberry Pi running PiAware / Dump1090?

I did some searching through the forums but found nothing concrete. Here’s my situation: I already have the RaspPi on the roof with its USB SDR dongle and connected to the 1090 MHz antenna. I have a USB GPS dongle and nice external GPS antenna as well, and would like to be able to monitor the GPS constellation from the house. Is there a way to add the GPS via a USB port and have the data available not only to precisely establish the ADS-B station location but also for me to use the GPS for other purposes (mostly statistics), perhaps through a network port? I am novice enough with the RaspPi to not know whether I can run other code simultaneously with the PiAware / Dump1090.

Any ideas would be helpful.

Cheers and 73 - Jon N7UV

1 Like

You probably want to run something like gpsd, I would guess.
Wouldn’t see any problems with that coexisting with dump1090 et al, assuming you don’t run into USB power draw problems.

Edit: And some more detailed instructions: blog.retep.org/2012/06/18/gettin … pberry-pi/

Jon–

using GPSD will get you basic GPS location and timing. You can also use GPS to run NTP, giving you more accurate timing. That takes extra work. See for example:

http://www.satsignal.eu/ntp/Raspberry-Pi-NTP.html#user-mode

which is the best I’ve found so far and walks through things in detail.

Note that the latest and greatest kernel, 3.18, introduces dev_tree, which changes (some might say screws up) how software interacts with various interfaces such as i2c, gpio, and the like.

having something like dump1090 automagically detect the shared memory segments updated by GPSD and dealing with location information would be interesting to see…

cheers and 73

bob k6rtm

The Adafruit Ultimate GPS Hat for Raspberry Pi looks like a nice hardware option, since it may be able to fit inside of your existing case.
learn.adafruit.com/adafruit-ult … i?view=all
adafruit.com/products/2324

After dealing with no-name eBay GPS modules, the Adafruit Ultimate GPS (breakout or hat form) is the way to go for me – I don’t have the time to spend futzing around with the others.

bob krtm

Is there any advantage to be gained running GPS on the Pi?

  • can Dump1090 / PiAware use the GPS positional or time info (especially if the Pi time is set by NTP)?

Them GPS hats looks pretty cool. Maybe something to try.

Not currently. It would be nice to hook into gpsd if it’s there for position info. If you’re running NTP, piaware will pick up on the time indirectly via the system time.

Just one more thing to add to the to-do list. You’re up to Vol 16 now?

1 Like

I got a GPS antenna USB connector to do this and there is a dearth of information on how to have
the Raspberry Pi, use that GPS information to determine the Antenna position for MLAT etc.

I wanted to put the Raspberry Pi at the mast heard, with the GPS antenna mounted as close as possible to the antenna. This might also be a way of keeping track of the GPS differential for more accurate MLAT?

Is there any software for the Raspberry Pi for a GPS dongle at the antenna?

@ramjet
as suggested by obj (some years ago) gpsd is the way to go.
i have an el-cheapo u-blox7 based USB gps (10$ or so) and works well with my pi.

sudo apt-get install -y gpsd
sudo apt-get install -y gpsd-clients
sudo apt-get install -y python-gps
sudo apt-get install -y libcap-dev
sudo apt-get install -y pps-tools

then in /boot/cmdline.txt add

console=ttyACM0,115200

and in /etc/rc/local add (before the exit 0)

sudo gpsd /dev/ttyACM0 -F /var/run/gpsd.sock

reboot and then, in command line run :
sudo cgps -s and if all went well, you’ll see the gps output on-screen,
or if in raspbian desktop run the app gpsmon.

flightaware auto detects and uses gpsd positions.

HTH
evangel

4 Likes

Those little u-blox7 GPS dongles are great, and the price is certainly right at around US$8 shipped.

I use them for hamradio JT modes, when away from an internet connection. Timing is everything with the JT modes.

That said, what is the advantage/need of using a GPS receiver with the RPi/Piaware combo? Internet connectivity must always be present if feeding. The location is easily set using the map on the webpage. Timing/clocking does not seem to be an issue.

Thanks.

Their isn’t much advantage to using a GPS receiver. We don’t use GPS for MLAT and NTP is good enough for timing.

We have seen users that put piaware inside their car and the GPS (using gspd) will update their site position on FlightAware.

1 Like

Ok, thanks.

No plans to go mobile, but always open to new applications.

evangelyul,
Can you elaborate?
Is this a present file or a new file?
you mention boot/cmdline.txt (add)
etc/rc/local add (before exit 0)

reboot
then put in command line run:
sudo cgps -s ?

Some detailed instructions would be appreciated.

1 Like

@ramjet555

after installing the software i mentioned earlier…

file : cmdline.txt is under directory/folder /boot - use to set gps as serial device/speed
open file with nano sudo nano /boot/cmdline.txt and add
console=ttyACM0,115200
file : rc.local is under directory/folder /etc - use to run automated scripts / specific files upon system boot.
open or create (if it does not exist) sudo nano /etc/rc.local and add
sudo gpsd /dev/ttyACM0 -F /var/run/gpsd.sock before the line exit 0 .

now reboot the device
so after reboot to confirm the gps is active, test it by running the following in the command line:
sudo cgps -s you’ll get a similar display

cgps-1

note:you can omit sudo if you are looged-in as user ‘root’

sorry cant do any more detail than this, that gift is possessed by user abcd567 :grinning:

brgds
evangel

ed1 : a nice tutorial here : [Getting GPS to work on a Raspberry PI – Peter Mount's Blog]

3 Likes

David.Baker please contact me about the mobile use as this is what I am trying to do. I travel in my vehicle for work and would like to set up my FlightAware to automatically update based on my current location. I do have a tablet in the vehicle displaying FlightAware. Thanks, Michael

It should be enough if you get a working gpsd set up; piaware will use data from there by default.

(i.e. if cgps is outputting the right location, piaware will see that location too)

1 Like

Do I need any extra code lines for this to see the GPS hatter?

I’d love to see this working for a “mobile” dump1090 installation. I’d love to have dump1090 know where I was, and recenter the map, re-distance the places, etc.