Skip to content

Commit c6a414c

Browse files
[examples] Add linear model.
1 parent 9d6305f commit c6a414c

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

examples/linear/modelLinear.cpp

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* x3 -> kart veolicity
1414
*/
1515

16-
ModelLinear::ModelLinear(double& mydt, bool noiseOnParameters)
16+
ModelLinear::ModelLinear(double& mydt, bool )
1717
{
1818
stateNb = 2;
1919
commandNb = 1;
@@ -46,17 +46,19 @@ ModelLinear::ModelLinear(double& mydt, bool noiseOnParameters)
4646
upperCommandBounds << 1.0;
4747
}
4848

49-
ModelLinear::stateVec_t ModelLinear::computeDeriv(double&, const stateVec_t& X,
50-
const commandVec_t &U)
49+
ModelLinear::stateVec_t ModelLinear::
50+
computeDeriv(double&, const stateVec_t& X,
51+
const commandVec_t &U)
5152
{
5253
dX[0] = X[1];
5354
dX[1] = U[0];
5455
return dX;
5556
}
5657

57-
ModelLinear::stateVec_t ModelLinear::computeNextState(double& dt,
58-
const stateVec_t& X,
59-
const commandVec_t& U)
58+
ModelLinear::stateVec_t ModelLinear::
59+
computeNextState(double& ,
60+
const stateVec_t& X,
61+
const commandVec_t& U)
6062
{
6163
/*k1 = computeDeriv(dt, X, U);
6264
k2 = computeDeriv(dt, X + (dt / 2) * k1, U);
@@ -67,8 +69,10 @@ ModelLinear::stateVec_t ModelLinear::computeNextState(double& dt,
6769
return x_next;
6870
}
6971

70-
void ModelLinear::computeModelDeriv(double& dt, const stateVec_t& X,
71-
const commandVec_t& U)
72+
void ModelLinear::
73+
computeModelDeriv(double& ,
74+
const stateVec_t& ,
75+
const commandVec_t& )
7276
{
7377
/*double dh = 1e-7;
7478
stateVec_t Xp, Xm;

0 commit comments

Comments
 (0)