Difference between revisions of "GPSd position"
m (→Hardware) |
|||
(11 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
<categorytree style="float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;" mode=pages>Tools</categorytree> | |||
__TOC__ | |||
== Display a GPS position == | == Display a GPS position == | ||
Sometimes it is useful to display an external GPS position on the GCS. That might be your ground station position (e.g. if operating from a moving ship) or you walking through the field with your laptop searching an outlanded aircraft. | |||
The external gps position will be displayed through a dark red dot surrounded by a black circle. If the gps data is lost/older than 10s the red dot will get a light red circle. | |||
[[Image:Gpsd_pos_ok.png|left|thumb|GPSd position ok]] | |||
[[Image:Gpsd_pos_lost.png|left|thumb|GPSd position is lost]] | |||
<br style="clear:both"> | |||
=== Hardware === | |||
[[File:GPS_Sirf3_USB.jpg|200px|thumb|left|USB GPS dongle]] | |||
To get GPS in you groundstation laptop, simples is to use a USB GPS plug. There are many, quick search on the internet with "USB GPS" will no doubt give you a result. | |||
=== Using gpsd === | === Using gpsd === | ||
The GPS receiver could be connected through a serial port, USB, Bluetooth, a network, ... The gpsd package is used to interface to the receiver. On some Linux distributions the gpsd daemon is started automatically by default (e.g. Ubuntu 9.10) and might confuse the modem operation that also uses the serial/USB port. It is a good idea to disable the automatic startup of gpsd or at least change the configuration to only access one given port as described below. It can be turned off by running | |||
If gpsd is not installed, install it via: | |||
$ sudo apt-get install libgps-dev gpsd | |||
Then configure it via: | |||
$ sudo dpkg-reconfigure gpsd | |||
There are several ways to tell gpsd how to connect to your receiver. The simplest is to start gpsd (as root) with the device you want. | |||
gpsd /dev/ttyUSB0 | sudo gpsd /dev/ttyUSB0 | ||
If your GPS receiver is always connected to the same port (and can not be confused with another Paparazzi modem) you can put the device into '''/etc/default/gpsd''' and start gpsd automatically. There should be a way that udev takes care of that. | If your GPS receiver is always connected to the same port (and can not be confused with another Paparazzi modem) you can put the device into '''/etc/default/gpsd''' and start gpsd automatically. There should be a way that udev takes care of that. | ||
Line 18: | Line 41: | ||
DAEMON_OPTS="" | DAEMON_OPTS="" | ||
DEVICES="/dev/ttyS2" | DEVICES="/dev/ttyS2" | ||
USBAUTO="false" | USBAUTO="false"and start it through the '''GPSd position display''' in the Paparazzi Center Tools bar or by hand | ||
A Bluetooth GPS receiver can be configured in '''/etc/bluetooth/rfcomm.conf'''. In this example it can be used as '''/dev/rfcomm0''' (put your GPS devices Bluetooth address). | A Bluetooth GPS receiver can be configured in '''/etc/bluetooth/rfcomm.conf'''. In this example it can be used as '''/dev/rfcomm0''' (put your GPS devices Bluetooth address). | ||
Line 27: | Line 50: | ||
} | } | ||
=== | On some Linux distributions it is needed to bind the rfcomm | ||
sudo rfcomm bind 0 | |||
=== Installing gpsd2ivy === | |||
The small tool that gets the position info from gpsd and forwards that to the ivy bus so that the gcs can display it is called gpsd2ivy. It can be started through the '''GPSd position display''' in the Paparazzi Center Tools bar. | |||
Install the needed gps libraries: | |||
sudo apt-get install libgps-dev gpsd | |||
or | |||
sudo apt-get install --install-suggests paparazzi-dev | |||
Then compile gpsd2ivy via: | |||
cd sw/ground_segment/tmtc | cd sw/ground_segment/tmtc | ||
make gpsd2ivy | make gpsd2ivy | ||
manually it is started by | |||
./gpsd2ivy | ./gpsd2ivy | ||
=== Using gpsd2ivy === | |||
It seams that you need to get first the location of your drone before having the one of your ground station. You might want to restart the gpsd2ivy program in order to force the calculation of a new position of your ground station (will staying in GCS). | |||
[[Category:Tools]] [[Category:User_Documentation]] |
Latest revision as of 09:27, 11 November 2014
Display a GPS position
Sometimes it is useful to display an external GPS position on the GCS. That might be your ground station position (e.g. if operating from a moving ship) or you walking through the field with your laptop searching an outlanded aircraft.
The external gps position will be displayed through a dark red dot surrounded by a black circle. If the gps data is lost/older than 10s the red dot will get a light red circle.
Hardware
To get GPS in you groundstation laptop, simples is to use a USB GPS plug. There are many, quick search on the internet with "USB GPS" will no doubt give you a result.
Using gpsd
The GPS receiver could be connected through a serial port, USB, Bluetooth, a network, ... The gpsd package is used to interface to the receiver. On some Linux distributions the gpsd daemon is started automatically by default (e.g. Ubuntu 9.10) and might confuse the modem operation that also uses the serial/USB port. It is a good idea to disable the automatic startup of gpsd or at least change the configuration to only access one given port as described below. It can be turned off by running
If gpsd is not installed, install it via:
$ sudo apt-get install libgps-dev gpsd
Then configure it via:
$ sudo dpkg-reconfigure gpsd
There are several ways to tell gpsd how to connect to your receiver. The simplest is to start gpsd (as root) with the device you want.
sudo gpsd /dev/ttyUSB0
If your GPS receiver is always connected to the same port (and can not be confused with another Paparazzi modem) you can put the device into /etc/default/gpsd and start gpsd automatically. There should be a way that udev takes care of that.
START_DAEMON="true" DAEMON_OPTS="" DEVICES="/dev/ttyS2" USBAUTO="false"and start it through the GPSd position display in the Paparazzi Center Tools bar or by hand
A Bluetooth GPS receiver can be configured in /etc/bluetooth/rfcomm.conf. In this example it can be used as /dev/rfcomm0 (put your GPS devices Bluetooth address).
rfcomm0 { bind yes; device 00:06:66:00:53:AE; }
On some Linux distributions it is needed to bind the rfcomm
sudo rfcomm bind 0
Installing gpsd2ivy
The small tool that gets the position info from gpsd and forwards that to the ivy bus so that the gcs can display it is called gpsd2ivy. It can be started through the GPSd position display in the Paparazzi Center Tools bar.
Install the needed gps libraries:
sudo apt-get install libgps-dev gpsd
or
sudo apt-get install --install-suggests paparazzi-dev
Then compile gpsd2ivy via:
cd sw/ground_segment/tmtc make gpsd2ivy
manually it is started by
./gpsd2ivy
Using gpsd2ivy
It seams that you need to get first the location of your drone before having the one of your ground station. You might want to restart the gpsd2ivy program in order to force the calculation of a new position of your ground station (will staying in GCS).