Skip to content

Commit

Permalink
AP_ExternalAHRS: added InertialLabs backend
Browse files Browse the repository at this point in the history
  • Loading branch information
tridge committed Dec 5, 2023
1 parent 61e8d3a commit 0aacb9a
Show file tree
Hide file tree
Showing 5 changed files with 957 additions and 1 deletion.
11 changes: 11 additions & 0 deletions libraries/AP_ExternalAHRS/AP_ExternalAHRS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "AP_ExternalAHRS_VectorNav.h"
#include "AP_ExternalAHRS_MicroStrain5.h"
#include "AP_ExternalAHRS_MicroStrain7.h"
#include "AP_ExternalAHRS_InertialLabs.h"

#include <GCS_MAVLink/GCS.h>
#include <AP_AHRS/AP_AHRS.h>
Expand Down Expand Up @@ -95,21 +96,31 @@ void AP_ExternalAHRS::init(void)
case DevType::None:
// nothing to do
return;

#if AP_EXTERNAL_AHRS_VECTORNAV_ENABLED
case DevType::VecNav:
backend = new AP_ExternalAHRS_VectorNav(this, state);
return;
#endif

#if AP_EXTERNAL_AHRS_MICROSTRAIN5_ENABLED
case DevType::MicroStrain5:
backend = new AP_ExternalAHRS_MicroStrain5(this, state);
return;
#endif

#if AP_EXTERNAL_AHRS_MICROSTRAIN7_ENABLED
case DevType::MicroStrain7:
backend = new AP_ExternalAHRS_MicroStrain7(this, state);
return;
#endif

#if AP_EXTERNAL_AHRS_INERTIAL_LABS_ENABLED
case DevType::InertialLabs:
backend = new AP_ExternalAHRS_InertialLabs(this, state);
return;
#endif

}

GCS_SEND_TEXT(MAV_SEVERITY_INFO, "Unsupported ExternalAHRS type %u", unsigned(devtype));
Expand Down
9 changes: 8 additions & 1 deletion libraries/AP_ExternalAHRS/AP_ExternalAHRS.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@ class AP_ExternalAHRS {
#endif
#if AP_EXTERNAL_AHRS_MICROSTRAIN5_ENABLED
MicroStrain5 = 2,
#endif
#if AP_EXTERNAL_AHRS_INERTIAL_LABS_ENABLED
InertialLabs = 5,
#endif
// 3 reserved for AdNav
// 4 reserved for CINS
// 5 reserved for InertialLabs
// 6 reserved for Trimble
#if AP_EXTERNAL_AHRS_MICROSTRAIN7_ENABLED
MicroStrain7 = 7,
Expand Down Expand Up @@ -156,6 +158,11 @@ class AP_ExternalAHRS {
float temperature;
} ins_data_message_t;

typedef struct {
float differential_pressure; // Pa
float temperature; // degC
} airspeed_data_message_t;

protected:

enum class OPTIONS {
Expand Down
Loading

0 comments on commit 0aacb9a

Please sign in to comment.