Skip to content

Commit 2a220e7

Browse files
committed
directy output port and starboard thrust (no division by 2) to aitsmc node
1 parent 869deab commit 2a220e7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/control/AITSMC_NEW.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ ControllerOutput AITSMC_NEW::update(const vanttec::ControllerState &s, const AIT
160160
// double Tz = (setpoint.dot_r + (alpha_psi * eidot_psi) - f_psi - ua_psi) / g_psi;
161161

162162
// Clamp forces
163-
Tx = std::clamp(Tx, -60.0, 73.0);
164-
Tz = std::clamp(Tz, -14.0, 14.0);
163+
// Tx = std::clamp(Tx, -60.0, 73.0);
164+
// Tz = std::clamp(Tz, -14.0, 14.0);
165165

166166
if(starting == 1){
167167
Tx = 0;
@@ -185,8 +185,8 @@ ControllerOutput AITSMC_NEW::update(const vanttec::ControllerState &s, const AIT
185185
double port_t = (Tx / 2.0) + (Tz / B);
186186
double starboard_t = (Tx / (2.0 * c)) - (Tz / (B * c));
187187

188-
port_t = std::clamp(port_t, -60.0, 73.0) / 2.0;
189-
starboard_t = std::clamp(starboard_t, -60.0, 73.0) / 2.0;
188+
port_t = std::clamp(port_t, -60.0, 73.0);
189+
starboard_t = std::clamp(starboard_t, -60.0, 73.0);
190190

191191
ControllerOutput out{};
192192
out.left_thruster= port_t;

0 commit comments

Comments
 (0)