Skip to content

Commit

Permalink
AP_ExternalAHRS: Added Advanced Navigation Device Support
Browse files Browse the repository at this point in the history
EAHRS_TYPE: 3 (AdNav) has been added to the AP_External_AHRS.h/.cpp files.
New Class AP_ExternalAHRS_AdvancedNavigation added in new .cpp/.h files.
Supports any Advanced Navigation Packet Protocol (ANPP) device with different devices having slight behaviour changes.
  • Loading branch information
tridge committed Dec 2, 2023
1 parent e75a955 commit 373cd93
Show file tree
Hide file tree
Showing 5 changed files with 1,145 additions and 1 deletion.
6 changes: 6 additions & 0 deletions libraries/AP_ExternalAHRS/AP_ExternalAHRS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "AP_ExternalAHRS_backend.h"
#include "AP_ExternalAHRS_VectorNav.h"
#include "AP_ExternalAHRS_MicroStrain5.h"
#include "AP_ExternalAHRS_AdvancedNavigation.h"

#include <GCS_MAVLink/GCS.h>

Expand Down Expand Up @@ -102,6 +103,11 @@ void AP_ExternalAHRS::init(void)
case DevType::MicroStrain5:
backend = new AP_ExternalAHRS_MicroStrain5(this, state);
return;
#endif
#if AP_EXTERNAL_AHRS_ADNAV_ENABLED
case DevType::AdNav:
backend = new AP_ExternalAHRS_AdvancedNavigation(this, state);
break;
#endif
}

Expand Down
4 changes: 3 additions & 1 deletion libraries/AP_ExternalAHRS/AP_ExternalAHRS.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ class AP_ExternalAHRS {
#if AP_EXTERNAL_AHRS_MICROSTRAIN5_ENABLED
MicroStrain5 = 2,
#endif
// 3 reserved for AdNav
#if AP_EXTERNAL_AHRS_ADNAV_ENABLED
AdNav = 3,
#endif
// 4 reserved for CINS
// 5 reserved for InertialLabs
// 6 reserved for Trimble
Expand Down
Loading

0 comments on commit 373cd93

Please sign in to comment.