Commit Graph

18 Commits

Author SHA1 Message Date
murata 89484a8f64 AP_Beacon: Common modbus crc method 2019-07-12 15:33:21 +10:00
Karthik Desai 0a04a2a8c2 AP_Beacon_Marvelmind: Relax the precision of the position of Hedge
But we are conservative here and use 20cm instead (until MM provides us with a proper accuracy value)
2018-05-23 14:51:23 +01:00
Karthik Desai 4f26bc7cad AP_Beacon_Marvelmind: Record the timestamp once, on success. 2018-05-23 14:51:23 +01:00
Karthik Desai 372fba2152 AP_Beacon_Marvelmind: Added some debug messages 2018-05-23 14:51:23 +01:00
Karthik Desai 64fdefe7cf AP_Beacon_Marvelmind: Refactor variables 2018-05-23 14:51:23 +01:00
Karthik Desai 358b3d222b AP_Beacon_Marvelmind: Simplify the Marvelmind structure.
This removes pointless pointer inits and removes the buffer.
The new incoming data is now injected as and when they are received by the driver.
2018-05-23 14:51:23 +01:00
Karthik Desai b0e4a57a93 AP_Beacon_Marvelmind: Remove unnecessary structures.
This incorporates the distance into the stationary beacon structure.
2018-05-23 14:51:23 +01:00
Karthik Desai ad05a5c694 AP_Beacon_Marvelmind: Add function to find beacon's instance for the given address.
This function returns the instance number of a particular beacon's address.
It is needed because the MM sends the distances between the hedge and beacon in a random order so they have to be sorted by address before setting it.
The address of a beacon can be between 0 and 99.
2018-05-23 14:51:23 +01:00
Karthik Desai fa575e2a9a AP_Beacon_Marvelmind: Update the link to Marvelmind's repo 2018-05-23 14:51:23 +01: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
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
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
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