Skip to content

Commit

Permalink
Merge pull request #2 from vanttec/saucesaft-patch-1
Browse files Browse the repository at this point in the history
cambios max pruebas 2024
  • Loading branch information
saucesaft authored Jan 23, 2024
2 parents 9c53199 + 4658142 commit 119175a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/control/ASMC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ ASMCOutput ASMC::update(const ASMCState &s, const ASMCSetpoint &setpoint) {
double psi = s.theta;

double beta = std::asin(v / (0.001 + std::hypot(u, v)));
beta = 0;

double psi_d = beta + setpoint.heading_setpoint;

Expand Down Expand Up @@ -92,11 +93,11 @@ ASMCOutput ASMC::update(const ASMCState &s, const ASMCSetpoint &setpoint) {

if(setpoint.pivot_enabled == 1){
if(Tport > Tstbd){
Tstbd = - Tport;
Tport/=2;
Tstbd = - 5*Tport;
Tport/=10; // 2
} else {
Tport = - Tstbd;
Tstbd/=2;
Tport = - 5*Tstbd;
Tstbd/=10; // 2
}
}

Expand Down Expand Up @@ -148,4 +149,4 @@ ASMCParams ASMC::defaultParams() {
p.lambda_u = 0.001;
p.lambda_psi = 1.0;
return p;
}
}

0 comments on commit 119175a

Please sign in to comment.