Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plane: add As5600 angle-of-attack sensor #16795

Closed
wants to merge 10 commits into from
1,297 changes: 1,297 additions & 0 deletions ArduCopter/mav_0_1.parm

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion ArduPlane/ArduPlane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ const AP_Scheduler::Task Plane::scheduler_tasks[] = {
SCHED_TASK(navigate, 10, 150),
SCHED_TASK(update_compass, 10, 200),
SCHED_TASK(read_airspeed, 10, 100),
SCHED_TASK(update_alt, 10, 200),
SCHED_TASK(read_aoa, 10, 200),
SCHED_TASK(update_alt, 10, 200),//This line added by Cole
colejmero marked this conversation as resolved.
Show resolved Hide resolved
SCHED_TASK(adjust_altitude_target, 10, 200),
#if ADVANCED_FAILSAFE == ENABLED
SCHED_TASK(afs_fs_check, 10, 100),
Expand Down Expand Up @@ -193,6 +194,14 @@ void Plane::update_compass(void)
}
}

/*
* Read and log Angle of Attack This function is code added by Cole
*/

void Plane::read_aoa(void){
colejmero marked this conversation as resolved.
Show resolved Hide resolved
aoa_sensor.getRawAngle();
}

/*
do 10Hz logging
*/
Expand Down
4 changes: 4 additions & 0 deletions ArduPlane/Plane.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
#include <AP_OSD/AP_OSD.h>

#include <AP_Rally/AP_Rally.h>
#include <AP_AS5600_AOA/AS5600_AOA.h> //Magnetic Encoder library, line added by Cole

#include <AP_OpticalFlow/AP_OpticalFlow.h> // Optical Flow library
#include <AP_Parachute/AP_Parachute.h>
Expand Down Expand Up @@ -196,6 +197,8 @@ class Plane : public AP_Vehicle {

AP_RPM rpm_sensor;

AS5600_AOA aoa_sensor; //This line added by Cole

AP_TECS TECS_controller{ahrs, aparm, landing};
AP_L1_Control L1_controller{ahrs, &TECS_controller};

Expand Down Expand Up @@ -996,6 +999,7 @@ class Plane : public AP_Vehicle {
void read_airspeed(void);
void rpm_update(void);
void accel_cal_update(void);
void read_aoa(void); //This line added by Cole
colejmero marked this conversation as resolved.
Show resolved Hide resolved

// system.cpp
void init_ardupilot() override;
Expand Down
Loading