Commit Graph

112 Commits

Author SHA1 Message Date
priseborough be0096e812 AP_GPS: Allow the user to specify the GPS time delay
If the user sets a non-zero value of the delay it will be used in preference over the default value for that GPS type.
If the GPS type is unknown and the parameter is set to zero, then a default delay of 1 sample period will be used (eg 200ms for 5Hz).
2017-01-27 16:57:42 +09:00
Andrew Tridgell 5d18f3a453 AP_GPS: added backend specific get_lag() function
the ublox7 and 8 seem to produce lower lag, around 120ms. Separately
we should also look at running these at 10Hz and see if that helps.
2017-01-27 16:57:42 +09:00
Michael du Breuil 0cf41c9288 AP_GPS: Force ublox baud rate if we are allowed to config the GPS 2017-01-26 07:48:22 +09:00
Michael du Breuil c696137a42 AP_GPS: Update the number of leapseconds 2017-01-18 18:07:26 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas b7f32e216d AP_GPS: update parameter descriptions 2017-01-09 13:32:28 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas 9aaeb6fe1a AP_GPS: Add missing GPS Types 2017-01-06 21:24:42 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas 8419045aea Spell in comments 2017-01-06 10:57:39 -08:00
murata fd153f2861 AP_GPS: Change search method of GPS type to switch statement.
AP_GPS: Correct the tab code to white space.
2016-12-21 10:31:43 +09:00
murata c808ee2f49 Global: To nullptr from NULL.
RC_Channel: To nullptr from NULL.

AC_Fence: To nullptr from NULL.

AC_Avoidance: To nullptr from NULL.

AC_PrecLand: To nullptr from NULL.

DataFlash: To nullptr from NULL.

SITL: To nullptr from NULL.

GCS_MAVLink: To nullptr from NULL.

DataFlash: To nullptr from NULL.

AP_Compass: To nullptr from NULL.

Global: To nullptr from NULL.

Global: To nullptr from NULL.
2016-11-02 16:04:47 -02:00
Randy Mackay aeb1de08f5 AP_GPS: fix MAV compile error 2016-10-29 16:45:00 +09:00
Randy Mackay 9290ee65cc AP_GPS: MAV driver uses existing baud rates
GPS_INPUT messages can arrive through any mavlink serial port so we shouldn't be modifying any port's baud rates.
2016-10-29 14:33:44 +09:00
Peter Barker 7b75a4ec09 AP_GPS: add missing parameter metadata 2016-10-27 09:15:03 -07:00
priseborough 1dec6dd9b0 AP_GPS: Update parameter documentation
Add brief description of body frame conventions.
2016-10-27 14:54:45 +11:00
priseborough b51c9dea6c AP_GPS: Add parameters defining antenna offset in body frame 2016-10-27 14:54:41 +11:00
Mathieu OTHACEHE 152edf7189 Global: remove mode line from headers
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02:00
Andrew Tridgell 500df1edf2 AP_GPS: support GPS_RTCM_DATA fragmented MAVLink message
support re-assembly of RTCM data packets
2016-10-11 11:00:35 +11:00
Michael du Breuil cf5e79f80e AP_GPS: ublox support user controlled rate updates
Also corrects accepting bad nav rates as configured, and fixes a incorrect
index as to which GPS is being updated
2016-10-11 10:44:51 +11:00
Michael du Breuil 3e3f539a6a AP_GPS: Raise target baud of u-blox devices
A knockon effect is that we need less config strings as raw logging
on u-blox will use the same baud rates
2016-10-11 10:44:50 +11:00
Michael du Breuil 9c4b3ec1e1 AP_GPS: Fix incorrect incrementing of last_baud rate
This is a revert of 7c3b8dceb which tried to start at index 0 of the
array of baudrates, however because of the way last_baud is used
this lead to a GPS always being reported as being 1 index off which
lead to users getting reports of baud rates that their GPS wasn't
configured for

Also renames last_baud to be current_baud as that is how it's
actuallly used and should reduce future confusion

And fixed some tabs/vs space issues around where the last_baud rate
was incremented.
2016-09-25 08:50:47 -07:00
Michael Oborne 11c376588d AP_GPS_NOVA: support tersus/novatel/comnav gps 2016-09-20 10:53:49 +10:00
Matthew Brener 06388b0417 Global: Fix typos 2016-09-17 00:36:36 -03:00
Lee Hicks 51e8d8a294 AP_GPS: Don't send config blob to GPS unless AUTO_CONFIG=1
All GPS types will recieve startup up blob config. For
some recievers this will cause them to hang. This commit
only allows sending of blobs if AUTO_CONFIG=1. Fixes #2622
2016-08-16 10:56:37 +10:00
Lee Hicks 7c3b8dceb9 AP_GPS: Fixed GPS serial speeds starting at 1 instead of 0
The counting of this will increment the counter before
selecting the baud speed, skipping the first baud rate.
2016-08-16 10:56:36 +10:00
Lee Hicks 3dd4f30460 AP_GPS: Adding 19200 as serial speed for GPS
APM supports baud speeds of 19200, but GPS baud rates
don't support it. This commit adds it to follow APM supported
baud rates.
2016-08-16 10:56:36 +10:00
Allan Matthew 4249f7dbe6 AP_GPS: Add GPS_MAV type and accept GPS_INPUT message 2016-07-12 15:34:27 +09:00
dgrat 41661f815f AP_Math: Replace the pythagorous* functions with a variadic template
The new function can deal with a variable number of function parameters.
Additionally, I renamed the functions to norm(), because this is the
standard name used in several other projects.
2016-05-10 11:41:26 -03:00
Andrew Tridgell 5ddb872b79 AP_GPS: allow Replay to set last sample time 2016-05-07 18:27:23 +10:00
Andrew Tridgell d24bbcd1ff AP_GPS: convert vdop to cm 2016-05-07 18:27:22 +10:00
Andrew Tridgell b424c49bc7 AP_GPS: change ground course to be in degrees
more accuracy for replay
2016-05-07 18:27:21 +10:00
Andrew Tridgell 4e5f1374da AP_GPS: added setHil_Accuracy() 2016-05-07 18:27:19 +10:00
Lucas De Marchi ff10d1136c AP_GPS: reorganize includes
Due to the way the headers are organized a single change in a
AP_GPS backend would trigger a rebuild for most of the files in the
project. Time could be saved by using ccache (since most of the things
didn't change) but we can do better, i.e.  re-organize
the headers so we don't have to re-build everything.

This makes internal headers internal and then other libraries only
depend on the AP_GPS.h header.
2016-04-14 21:01:51 -03:00
Michael du Breuil 2538c17ee0 AP_GPS: add fetching of gps configuration failure reasons 2016-04-13 11:24:01 -03:00
Alexey Bulatov 3933ac2a63 AP_GPS: Added ERB to AP_GPS 2016-03-02 06:04:52 -08:00
Andrew Tridgell 14bd4ba2c7 AP_GPS: removed console print for GPS type
it is now sent as a STATUSTEXT
2016-02-24 14:22:48 +11:00
Michael du Breuil 1426ff2732 AP_GPS: Broadcast what type of GPS is found and at what baud rate 2016-02-24 14:22:48 +11:00
Tom Pittenger 12fab6c59a AP_GPS: save cfg only when needed
added GPS_SAVE_CFG param option 2
2016-02-12 15:33:33 -08:00
Michael du Breuil 726bf110cc AP_GPS: update save_cfg description
Saving config is not expected to work on a LEA-6H based on user reports, so the parameter should warn of this
2016-02-12 00:37:05 -08:00
Michael du Breuil 4251ee0e4b AP_GPS: u-blox verify ublox settings
The ublox driver will now continuosly poll for the settings from the GPS and correct any that are found to be in correct.
This status is then reported to the arming library as an additional arming check, allowing the user to be sure that the
gps is correctly configured before using it. If a user has a GPS2 configured that is not present they will fail the arming
checks until after they have disabled the second GPS.

2 new parameters were introduced as well:
  -GPS_AUTO_CONFIG: Will not request any configuration packets to attempt to change them. (If the packet is recieved then
    a update will be sent to it, but in testing this scenario never occured. This is set to 1 or 0 to change the setting.
    (Defaults to 1 enabling auto config)
  -GPS_GNSS_MODE2: Behaves the same way as GPS_GNSS_MODE but only applies to the second GPS.

GPS drivers are now allowed 2 seconds of non responsiveness before being unloaded
2016-02-12 00:37:04 -08:00
Michael du Breuil 8c9eafeb3c AP_GPS: Fix param docs that had incorrect spaces
The spaces between values aren't stirpped by the autodoc tool that generates the XML files
2016-01-08 20:17:54 +11:00
mirkix dee20a31f1 AP_Notify: Add gps_num_sats 2016-01-07 14:32:56 -02:00
Lucas De Marchi 5bb4e3eda9 AP_GPS: stop using Progmem.h
Besides the trivial convertions, while reading
initblob_state[instance].blob we need to be sure to read only one byte
like we were before.
2015-12-27 15:58:12 -02:00
Andrew Tridgell bc8ee8af36 AP_GPS: added QURT GPS 2015-12-27 16:21:26 +11:00
Michael du Breuil 2f97f9f416 AP_GPS: Fix incorrect values docstring on RAW_DATA 2015-12-03 10:17:22 +09:00
Caio Marcelo de Oliveira Filho c33b86a783 AP_GPS: use millis/micros/panic functions 2015-11-20 12:30:48 +09:00
Jonathan Challinger bc708f9808 AP_GPS: add SAVE_CFG parameter make ublox config saving optional 2015-11-10 15:16:55 +11:00
Lucas De Marchi 1a9b57da1f AP_GPS: remove check for GPS_SKIP_SIRF_NMEA 2015-11-04 12:14:15 +11:00
Lucas De Marchi e31595c60c AP_GPS: remove check for GPS_RTK_AVAILABLE 2015-11-04 12:14:15 +11:00
Lucas De Marchi c75c1d84d9 AP_GPS: remove check for GPS_MAX_INSTANCES
All supported boards may have more than 1 GPS instance.
2015-11-04 12:14:15 +11:00
Lucas De Marchi 5244559010 Minimize AP_Progmem.h includes
Most of AP_Progmem is already gone so we can stop including it in most
of the places. The only places that need it are the ones using
pgm_read_*() APIs.

In some cases the header needed to be added in the .cpp since it was
removed from the .h to reduce scope. In those cases the headers were
also reordered.
2015-10-30 14:35:32 +09:00
Lucas De Marchi 1b07dabeb7 Replace prog_char and prog_char_t with char
prog_char and prog_char_t are now the same as char on supported
platforms. So, just change all places that use them and prefer char
instead.

AVR-specific places were not changed.
2015-10-30 14:35:30 +09:00