Commit Graph

260 Commits

Author SHA1 Message Date
Lucas De Marchi 2c38e31c93 Remove use of PSTR
The PSTR is already define as a NOP for all supported platforms. It's
only needed for AVR so here we remove all the uses throughout the
codebase.

This was automated with a simple python script so it also converts
places which spans to multiple lines, removing the matching parentheses.

AVR-specific places were not changed.
2015-10-30 14:35:04 +09:00
Michael Oborne 8ec9ab6ad3 AP_GPS: add SBF and GSOF to gps documentation 2015-10-06 15:00:46 +11:00
Michael Oborne 0fceb76493 AP_GPS_GSOF: add trimble gsof driver 2015-10-06 15:00:46 +11:00
Randy Mackay f1322252ae GPS: fix GNSS_MODE param descriptions
Thanks to Michael DuBreuil for noticing the problem and providing the correction
2015-09-09 13:40:32 +09:00
Michael du Breuil 9f02834f6d AP_GPS: Broadcast vDOP data over mavlink 2015-09-09 11:38:12 +10:00
Michael Oborne 993904f01c AP_GPS_SBF: add init string and increase union size 2015-09-07 12:11:47 +10:00
Michael Oborne cce46cf0c5 AP_GPS_SBF: add support for Septentrio gps 2015-09-03 19:43:31 +10:00
Randy Mackay 6701d53d49 GPS: add GNSS_MODE parameter bitmask 2015-09-01 12:19:59 +09:00
Andrew Tridgell 2c7a113790 AP_GPS: ensure all GPS drivers give headings as 0..360 degrees
this prevents inconsistency between interfaces, and fixes a MAVLink
reporting bug with UAVCAN GPS
2015-08-31 08:24:35 +10:00
Gustavo Jose de Sousa 67db430583 AP_GPS: standardize inclusion of libaries headers
This commit changes the way libraries headers are included in source files:

 - If the header is in the same directory the source belongs to, so the
 notation '#include ""' is used with the path relative to the directory
 containing the source.

 - If the header is outside the directory containing the source, then we use
 the notation '#include <>' with the path relative to libraries folder.

Some of the advantages of such approach:

 - Only one search path for libraries headers.

 - OSs like Windows may have a better lookup time.
2015-08-11 16:28:43 +10:00
Michael du Breuil c704102dcd AP_GPS: Default the value of hdop to 99.99 if no value has been read yet. 2015-08-04 22:10:02 +09:00
Michael du Breuil 9d53aa77eb AP_GPS: Add reboot required docstring 2015-07-25 10:56:19 +09:00
Michael du Breuil 22b16b4532 AP_GPS: Enable selecting what GNSS system to use if the reciever supports it
Ublox 7 and 8 seires use a UBX-CFG-GNSS message to enable satellite constellations. The default value does not enable any additional ones, and any constellations the reciever doesn't report knowing about are not configured.
2015-07-22 21:31:10 +10:00
Michael du Breuil 47592a1953 AP_GPS: Raise the baud rate on a ublox GPS if using RAW logging
the implementation leaves an easy path forward for providing a different startup blob for all the GPS's if raw logging is enabled
2015-07-22 21:31:09 +10:00
Michael du Breuil 19bb96b9cb AP_GPS: Improve startup logic for detecting what gps is connected
Remove race condition on sending intial blob to the GPS, it was possible to send a blob that got the GPS configured enough to allow the autodetect to take over (and then some drivers like ublox would not finish sending the blob, which has potential details that the driver might have needed to send)

Limit the delay to checking for NMEA gps to only checking after all the available baud rates have been checked

Since a UBlox will actually report having DGPS (due to SBAS or RTCM data) actually report this as the highest supported mode
2015-07-22 21:31:09 +10:00
Randy Mackay 6f72d202fe GPS: fix parameter descriptions 2015-07-21 19:50:12 +09:00
Lucas De Marchi 9d59b43920 AP_GPS: use ARRAY_SIZE macro 2015-07-21 14:24:54 +09:00
Julien BERAUD b32259307d AP_GPS: Add baudrate 230400 for GPS
Needed by bebop gps by default
2015-07-10 10:12:52 +10:00
Randy Mackay ef20676c67 GPS: fix INJECT_TO param desc and add definition
No functional change
2015-06-27 16:31:03 +09:00
Andrew Tridgell f77ffd30f6 AP_GPS: fixed HIL GPS driver to make have vertical velocity sticky 2015-06-17 12:46:56 +10:00
Tom Pittenger 3544549cf4 AP_GPS: Allow switching primary GPS instance with 1 sat difference
Rapid switching between GPS receivers can cause real problems.
Switch if:
1) secondary GPS has 1 more satellite for at least 20 seconds
OR
2) secondary GPS has 2 more satellites for at least 5 seconds

Fixes https://github.com/diydrones/ardupilot/pull/2320
2015-06-11 21:33:06 +10:00
Micheal Knight ee85d37ee2 AP_GPS: added logging of RXM_RAW messages for UBlox
this will allow for post-flight RTK processing of DF logs
2015-05-05 13:25:34 +10:00
Andrew Tridgell f21aa17980 AP_GPS: fixed sending of GPS_RAW_INT with multiple links
thanks to ziltoid2 for this fix! See PR #2132
2015-04-24 08:21:00 +10:00
Niels Joubert a5beef00d1 GPS: Official Swift Binary Protocol GPS Driver v3 for Piksi GPS
DRIVER FEATURES:
- All logic for RTK vs Normal now lives inside Piksi
- Supports observation uplink through telem radio
- Supports full SBP packet logging
- Reports high-rate green blinking to indicate RTK lock.
- Switchable to accept only Float or Integer RTK locks.

THIS REQUIRES PIKSI FIRMWARE v0.14 OR HIGHER
- Uses Piksi's new Pseudo-Absolute-Positioning mode
- Onboard Piksi must have Pseudo-Absolute mode enabled
- Ground Station Piksi must have a surveyed location in settings
- Ground Station Piksi must send its location to Onboard Piksi.

NEXT STEPS REQUIRED:
- EKF needs to take higher accuracy GPS into account
- EKF needs to take GPS RTK height into account
- GCS needs to support sending SBP observation packets
--- MAVProxy patch forthcoming
2015-04-24 08:01:32 +10:00
Randy Mackay 7e43eaafab GPS: TYPE param description to PX4-UAVCAN 2015-04-23 20:17:26 +09:00
Randy Mackay cbcd32d698 GPS: integrate Serial Manager instance 2015-04-01 14:59:20 -07:00
Grant Morphett e7e9e1adf0 AP_GPS: Changes to fix the warnings in rover sitl build.
We are starting the process of resolving all the warnings in the
ardupilot builds of all vehicles and platforms.
2015-02-11 18:16:45 +11:00
Andrew Tridgell 362b53e1da AP_GPS: force flow control off on GPS serial ports 2015-01-29 15:53:20 +11:00
Andrew Tridgell 9ba2fefde3 AP_GPS: update for find_serial() change 2015-01-29 15:37:08 +11:00
Randy Mackay ebf5f98dbd GPS: detect_instance does not set uart rx, tx size 2015-01-29 14:05:12 +11:00
Randy Mackay 2eddecb10d GPS: use SerialManager for init 2015-01-29 14:05:12 +11:00
Andrew Tridgell ef55a3c6a6 AP_GPS: keep reporting GPS status messages when no GPS at 1Hz
to ensure the GCS knows that we have lost the GPS we need to keep
reporting GPS_RAW_INT messages when the GPS disappears. Sending at 1Hz
should be sufficient

Fixes issue #1722
2015-01-02 17:10:23 +11:00
Andrew Tridgell 3354cb37d0 AP_GPS: fixed vertical velocity in Replay
fixed NavEKF use of velocity velocity
2014-12-09 18:57:17 +11:00
Andrew Tridgell d3b087d2c1 AP_GPS: fixed build on non-PX4 platforms 2014-11-14 14:48:42 +11:00
Andrew Tridgell e69582aa1c AP_GPS: added PX4EXPERIMENTAL to GPS type drop down 2014-11-14 14:39:46 +11:00
Holger Steinhaus abad58874c AP_GPS: enable GNSS modules handled by PX4 firmware via GPS_TYPE
GNSS modules handled by PX4 drivers are not auto-detectable, some are not even
connected to a UART port. The activation is therefore controlled by GPS_TYPE
only. Baud rate and port settings (if applicable) have to be handled by the PX4
firmware.
2014-11-14 14:36:10 +11:00
Randy Mackay 8a776f8ff8 GPS: init primary_instance to zero 2014-10-29 12:04:13 +09:00
Benoit PEREIRA DA SILVA 010d267376 GPS: use primary for Notification 2014-10-29 12:04:12 +09:00
Andrew Tridgell 15470bd81b AP_GPS: added GPS_MIN_ELEV parameter
allows setting of satellite elevation mask in degrees
2014-09-04 14:46:10 +10:00
Andrew Tridgell 840a4dee1e AP_GPS: added GPS_SBAS_MODE parameter
allows SBAS to be enabled/disabled
2014-09-04 14:46:10 +10:00
Andrew Tridgell cd50fe82b6 AP_GPS: fixed GPS time in HIL
account for 10 year difference in epoch between unix time and GPS time
2014-09-04 06:37:42 +10:00
Andrew Tridgell b296508da4 AP_GPS: make setHIL take const references 2014-08-09 22:50:15 +10:00
Randy Mackay f630f9abc3 GPS: exclude SIRF and NMEA on APM copter build
This only works for the centralised builder, the modified Arduino IDE
will still include the NMEA and SIRF drivers meaning it will require
approximately 4k additional flash which may push us over the limit on
the APM2.  Users will instead need to exclude other features to get
below the APM1/2 flash limit.
2014-07-13 15:41:11 +09:00
Niels Joubert 2b1169b0ab AP_GPS: SwiftNav RTK Driver and GPS AutoSwitch param 2014-06-30 10:29:56 +10:00
Randy Mackay 69ad632e2a GPS: correct NAVFILTER parameter description
These corrected values match the GPS_Engine_Setting enum in GPS.h
Thanks to Adolfo R for noticing the issue and providing the fix
2014-05-20 22:08:40 +09:00
Andrew Tridgell 3b8839d2f7 AP_GPS: fixed num_sensors on APM2 2014-04-11 21:32:55 +10:00
Andrew Tridgell a821b0e198 AP_GPS: fixed a build warning
Debug() should not be exposed in public headers
2014-04-10 10:28:55 +10:00
Andrew Tridgell 43ebd86bb1 AP_GPS: disable SBP driver on APM2
the driver uses double precision floating point, which can't work on
8bit AVR with gcc
2014-04-05 21:47:46 +11:00
Niels Joubert 33576dfdd9 AP_GPS: Swift Binary Protocol SINGLE-POINT-POSITIONING Driver
This is the SBP driver for Piksi, Lodestar and other forthcoming Swift Navigation GPSes.
This driver currently implements three things:
- Implements a lightweight SBP protocol detection system
- Implements Piksi as a single-point-positioning GPS (same as ublox/others)
- Implements hardware logging of GPS health and baseline messages

Forthcoming iin future updates:
- Need to implement the RTK functionality
2014-04-05 13:42:23 +11:00
Andrew Tridgell 67ed5b73ef AP_GPS: added lock_port() interface
used by SERIAL_CONTROL message
2014-04-05 07:34:33 +11:00
Andrew Tridgell d9d038345a AP_GPS: save 800 bytes of code space on APM2
we can assume a single GPS
2014-04-04 10:08:28 +11:00
Andrew Tridgell 9f857529ca AP_GPS: auto-switch primary GPS based on status and number of satellites 2014-04-04 08:32:34 +11:00
Andrew Tridgell e40a048009 AP_GPS: handle multiple GPS in GPS setHIL() 2014-04-02 07:55:28 +11:00
Andrew Tridgell 79f5618f6f AP_GPS: zero state structure on driver release
this ensures no values are left from the previous driver
2014-04-02 07:55:28 +11:00
Andrew Tridgell 7e2ef0cfc0 AP_GPS: fixed GPS for Replay 2014-04-01 17:25:15 +11:00
Andrew Tridgell 77e2f48581 AP_GPS: fixed notify updates for new API 2014-04-01 06:38:25 +11:00
Andrew Tridgell 9781175bf5 AP_GPS: fixed handling of driver destruction
this allows for more complex destructors, and ensures we don't have
multiple backends allocated at once per instance
2014-04-01 06:38:25 +11:00
Andrew Tridgell 7ceba8dce4 AP_GPS: prevent double allocation of GPS drivers 2014-04-01 06:38:25 +11:00
Andrew Tridgell 0191355488 AP_GPS: fixed init strings to all be in progmem
and sent async ...
2014-04-01 06:38:25 +11:00
Andrew Tridgell 368daf89f1 AP_GPS: new GPS API
This is a complete rewrite of the GPS driver structure, with a static
main driver and separate backend drivers. This will allow proper
support for multiple GPSes, and will allow parameters to be set on the
GPS object
2014-04-01 06:38:23 +11:00