Skip to content

Commit 96b54a3

Browse files
author
friether
committed
decreased safety sensitivity during takeoff
updated GettingStarted
1 parent f0e7e9f commit 96b54a3

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed
-68.1 KB
Binary file not shown.

MIT_MatlabToolbox/trunk/embcode/rsedu_control.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ static P_Drone_Compensator_T Drone_Compensator_P = {
162162
-5.6659197210460546, 5.6659197210460546, 5.6659197210460546,
163163
-5.6659197210460546, 5.6659197210460546, 5.6659197210460546,
164164
-5.6659197210460546 },
165-
0.2,
165+
0.12,
166166
0.92,
167167
0.32664221335170257
168168
}, /* Variable: controlHelperParams
@@ -1342,8 +1342,10 @@ void RSEDU_control(HAL_acquisition_t* hal_sensors_data, HAL_command_t* hal_senso
13421342

13431343
//safety abort for high accelerations or position
13441344
bool crash_detected;
1345-
if(!FEAT_NOSAFETY)
1345+
//NOSAFETY disabled and after takeoff-cycles
1346+
if( (!FEAT_NOSAFETY) && (counter>(calibCycles + takeoffCycles)))
13461347
crash_detected = (fabs(in->HAL_acc_SI.x) > MAX_ACCELL) || (fabs(in->HAL_acc_SI.y) > MAX_ACCELL) || (in->HAL_acc_SI.z > 0);
1348+
//If either NOSAFETY enabled or during takeoff, allow greater accelerations without shutting down
13471349
else
13481350
crash_detected = (fabs(in->HAL_acc_SI.x) > MAX_ACCELL * 3) || (fabs(in->HAL_acc_SI.y) > MAX_ACCELL * 3);
13491351

MIT_MatlabToolbox/trunk/matlab/Simulation/parameters_estimationcontrol.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
controlHelperParams.Q2Ts = inv(controlHelperParams.Ts2Q);
9494

9595
%% Controllers (generic helpers)
96-
controlHelperParams.takeoff_gain = 0.18; %drone takes off with constant thrust x% above hover thrust
96+
controlHelperParams.takeoff_gain = 0.12; %drone takes off with constant thrust x% above hover thrust
9797
controlHelperParams.totalThrust_maxRelative = 0.92; %relative maximum total thrust that can be used for gaining altitude; rest is buffer for orientation control
9898
controlHelperParams.motorsThrustperMotor_max = quadEDT.motors_max*quadEDT.motorcommandToW2_gain*quad.Ct*quad.rho*quad.A*quad.r^2;
9999

0 commit comments

Comments
 (0)