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.
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.
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.
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
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.