Commit Graph

36 Commits

Author SHA1 Message Date
Andrew Tridgell 9fc451a615 AP_Beacon: fixed reference to -debug build directory 2018-05-09 14:17:32 +10:00
Dr.-Ing. Amilcar do Carmo Lucas 2f59572d42 AP_Beacon: Use multiplications instead of divisions in Marvelmind 2018-03-29 11:46:20 -07:00
Dr.-Ing. Amilcar do Carmo Lucas 1a8a390d4c AP_Beacon: Fix FALLTHROUGH in Marvelmind device driver. 2018-03-19 12:48:29 -07:00
Dr.-Ing. Amilcar Do Carmo Lucas 54b3936a46 AP_Beacon: Use marvelmind beacon raw distances on the EKF
Add support for Marvelmind RAW distance measurements this
requires Marvelmind FW >= 5.77 and "Raw distances data" enabled
in the marvelmind GUI dashboard.
This is better than the previous workaround we had.
2018-03-16 08:23:52 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas 29078824fc AP_Beacon: Replace max_buffered_positions variable with a #define 2018-03-16 08:23:52 +09:00
Andrew Tridgell 2941afa62b AP_Beacon: fixed example build on ChibiOS 2018-01-15 11:46:02 +11:00
Andrew Tridgell ca91edbbeb AP_Beacon: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Paulo Neves 4108f22304 AP_Beacon: Corrected possible use of nullptr memory.
The check for UART port pointer is not sufficient
to know if the update() was possible or not. When
MarvelmindHedge construction failed, the hedge pointer
might be a nullptr and there are no checks to avoid
nullptr dereference.

The MarvelmindHedge structure had complex initialization
but was done in a C style, with intermixed initialization functions.
malloc() was changed to cleaner new operator. Given that the
file already contained new operator calls it didn't make
sense to have a mix. The files are cpp so C++ operators
are used.
2017-11-01 10:49:10 +09:00
Lucas De Marchi 72fd2d6f05 global: use static method to construct AP_SerialManager 2017-09-26 03:01:21 +01:00
Randy Mackay a303c40f1f AP_Beacon: initialise counter in get_next_boundary_point
This is not a bug but at least one compiler has complained about this
2017-06-20 16:34:41 +09:00
Randy Mackay a199604348 AP_Beacon: fix get_boundary_points num_points
Thanks @OXINARF for finding this!
2017-06-15 09:36:27 +09:00
Pierre Kancir e7a5dd6a69 AP_Marvelmind: fix warning in example 2017-06-14 12:40:47 +01:00
Randy Mackay 3bcc410048 AP_Beacon: fix pozyx west-east processing 2017-06-14 16:07:32 +09:00
Randy Mackay cded78022c AP_Beacon: update_boundary_points calculates outer perimeter around beacons 2017-06-14 16:07:32 +09:00
Shingo Matsuura c9475c2747 AP_Beacon: add get_boundary_points 2017-06-14 16:07:32 +09:00
Paulo Neves 3158cafefd AP_Beacon: Added Marvelmind beacon example.
This commit includes an example program to
run the code of AP_Marvelmind class.
It also includes a dump from the marvelmind
serial as well as a script that injects
this dump into the example for demonstration.
2017-06-14 09:33:23 +09:00
Randy Mackay 45147af455 AP_Beacon: fit SITL beacon location 2017-06-09 15:24:36 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas 24aa52a24d AP_Beacon: Use SI units conventions in parameter units
Follow the rules from:
http://physics.nist.gov/cuu/Units/units.html
http://physics.nist.gov/cuu/Units/outside.html
and
http://physics.nist.gov/cuu/Units/checklist.html
one further constrain is that only printable (7bit) ASCII characters are allowed
2017-05-17 18:07:25 +10:00
Randy Mackay 2fcb4932b7 AP_Beacon: minor formatting fixes for marvelmind 2017-05-16 15:27:48 +09:00
Karthik Desai 5060ebe626 AP_Beacon: order the stationary beacons in ascending order of address 2017-05-16 15:27:37 +09:00
Karthik Desai 8a5fcc82bd AP_Beacon: transform Marvelmind ENU to ArduPilot NED coordinates
Cache beacon positions to speed-up distance calculations
Only pass data to EKF after both hedgehog and beacon positions are known
Add license and credit Marvelmind
Re-order code around to minimize diff with upstream marvelmind code
Integrated review requests
2017-05-16 15:27:09 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas 119696bea3 AP_Beacon: added units in the comments documentation, to make the API easier to use 2017-05-16 14:46:07 +09:00
karthik.desai 44d84fca15 AP_Beacon: Added Marvelmind Beacon class
Code cleanup, adhering to Ardupilot code style
Marvelmind code fixes
formatting fixes including replacing camel case with underscore
replaced puts with ::printf
removed unused debug and counter

Removed useless library includes.
Corrected spellings.
Update the last_update_ms so healthy() doesn't break.
2017-04-26 11:59:20 +09:00
priseborough ed0a90ae5f AP_Beacon: Apply correct conversion from Pozyx beacon earth frame
The Pozyx beacon system uses a North, West, Up axis system and the APM software uses a North, East, Down convention.
2017-01-27 16:57:42 +09:00
murata dd0d09175b AP_Beacon: Changed if statements to switch statement. 2017-01-19 11:26:32 +09:00
Shingo Matsuura 21ca1d3835 AP_Beacon: fixed comment. NE is correct. 2016-12-28 10:54:32 +09:00
murata 6045612011 AP_Beacon: combine duplicate checks into device_ready method 2016-12-24 12:11:53 +09:00
priseborough 78f89e0663 AP_Beacon: Update parameters for EKF3 testing 2016-12-19 08:07:10 +11:00
priseborough cd669738a5 AP_Beacon: fix SITL param error 2016-12-18 10:28:04 +11:00
Randy Mackay 9fc0bc19e7 AP_Beacon: fix potential out-of-bounds write to beacon_state
uncovered by covarity and wickedshell
2016-12-08 15:39:37 +09:00
Randy Mackay 08619a96be AP_Beacon: remove debug and editor settings
thanks to muramura for spotting this
2016-12-01 14:53:16 +09:00
murata 292257eaf2 AP_Beacon: checksum check uses XOR 2016-12-01 13:54:34 +09:00
priseborough 4482743af5 AP_Beacon: Improve simulator testing of beacons 2016-11-30 17:56:41 +09:00
Randy Mackay 1225e18898 AP_Beacon: add sitl testing parameter file 2016-11-30 17:56:40 +09:00
Andrew Tridgell 5b83fa3a77 AP_Beacon: added SITL backend 2016-11-30 17:56:39 +09:00
Randy Mackay 821fc516fb AP_Beacon: library to accept distances from beacons 2016-11-30 17:56:37 +09:00