mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 02:16:53 +08:00
tuning_tools: Change 1G to a more accurate value
This commit is contained in:
+1
-1
@@ -175,7 +175,7 @@ def run(logfile):
|
|||||||
res = optimize.minimize(J, x0, method='nelder-mead', options={'disp': True})
|
res = optimize.minimize(J, x0, method='nelder-mead', options={'disp': True})
|
||||||
|
|
||||||
# Convert results to parameters
|
# Convert results to parameters
|
||||||
g = 9.81
|
g = 9.80665
|
||||||
pcoef_xn = res.x[0] * g
|
pcoef_xn = res.x[0] * g
|
||||||
pcoef_xp = res.x[1] * g
|
pcoef_xp = res.x[1] * g
|
||||||
pcoef_yn = res.x[2] * g
|
pcoef_yn = res.x[2] * g
|
||||||
|
|||||||
@@ -809,8 +809,8 @@ void FlightTaskAuto::_updateTrajConstraints()
|
|||||||
if (_is_emergency_braking_active) {
|
if (_is_emergency_braking_active) {
|
||||||
// When initializing with large velocity, allow 1g of
|
// When initializing with large velocity, allow 1g of
|
||||||
// acceleration in 1s on all axes for fast braking
|
// acceleration in 1s on all axes for fast braking
|
||||||
_position_smoothing.setMaxAcceleration({9.80665f, 9.80665f, 9.80665f});
|
_position_smoothing.setMaxAcceleration({CONSTANTS_ONE_G, CONSTANTS_ONE_G, CONSTANTS_ONE_G});
|
||||||
_position_smoothing.setMaxJerk(9.80665f);
|
_position_smoothing.setMaxJerk(CONSTANTS_ONE_G);
|
||||||
|
|
||||||
// If the current velocity is beyond the usual constraints, tell
|
// If the current velocity is beyond the usual constraints, tell
|
||||||
// the controller to exceptionally increase its saturations to avoid
|
// the controller to exceptionally increase its saturations to avoid
|
||||||
|
|||||||
Reference in New Issue
Block a user