mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-17 02:52:12 +01:00
Merge branch 'corvuscorax/OP-1309_Stabilization-Refactoring' into next
This commit is contained in:
commit
b7f479cd68
@ -114,9 +114,19 @@ static void stabilizationOuterloopTask()
|
||||
float q_desired[4];
|
||||
float q_error[4];
|
||||
|
||||
rpy_desired[0] = stabilizationDesiredAxis[0];
|
||||
rpy_desired[1] = stabilizationDesiredAxis[1];
|
||||
rpy_desired[2] = stabilizationDesiredAxis[2];
|
||||
for (t = 0; t < 3; t++) {
|
||||
switch (cast_struct_to_array(enabled, enabled.Roll)[t]) {
|
||||
case STABILIZATIONSTATUS_OUTERLOOP_ATTITUDE:
|
||||
case STABILIZATIONSTATUS_OUTERLOOP_RATTITUDE:
|
||||
case STABILIZATIONSTATUS_OUTERLOOP_WEAKLEVELING:
|
||||
rpy_desired[t] = stabilizationDesiredAxis[t];
|
||||
break;
|
||||
case STABILIZATIONSTATUS_OUTERLOOP_DIRECT:
|
||||
default:
|
||||
rpy_desired[t] = ((float *)&attitudeState.Roll)[t];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
RPY2Quaternion(rpy_desired, q_desired);
|
||||
quat_inverse(q_desired);
|
||||
|
@ -144,7 +144,7 @@
|
||||
#define PIOS_GPS_SETS_HOMELOCATION
|
||||
|
||||
/* Stabilization options */
|
||||
// #define PIOS_QUATERNION_STABILIZATION
|
||||
#define PIOS_QUATERNION_STABILIZATION
|
||||
|
||||
/* Performance counters */
|
||||
#define IDLE_COUNTS_PER_SEC_AT_NO_LOAD 8379692
|
||||
|
Loading…
x
Reference in New Issue
Block a user