ADORe
ADORe is a modular open source software library and toolkit for decision making, planning, control and simulation of automated vehicles
kinematic_model.h
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2017-2021 German Aerospace Center (DLR).
3  * Eclipse ADORe, Automated Driving Open Research https://eclipse.org/adore
4  *
5  * This program and the accompanying materials are made available under the
6  * terms of the Eclipse Public License 2.0 which is available at
7  * http://www.eclipse.org/legal/epl-2.0.
8  *
9  * SPDX-License-Identifier: EPL-2.0
10  *
11  * Contributors:
12  * Daniel Heß - initial API and implementation
13  ********************************************************************************/
14 
15 #pragma once
16 #include <adore/mad/aodemodel.h>
19 #include <math.h>
20 
21 namespace adore
22 {
23  namespace fun
24  {
29  {
30 
31  public:
37  virtual void f(double t, const adoreMatrix<double, 0, 1>& x_in, adoreMatrix<double, 0, 1>& dx_out)
38  {
39  const double s = std::sin(x_in(2));
40  const double c = std::cos(x_in(2));
41  const double ax = (x_in.nc()>=7)?x_in(6):0.0;
42  dx_out(0) = c*x_in(3)-s*x_in(4);
43  dx_out(1) = s*x_in(3)+c*x_in(4);
44  dx_out(2) = x_in(5);
45  dx_out(3) = ax;
46  dx_out(4) = 0.0;
47  dx_out(5) = 0.0;
48  if(x_in.nc()>=7)dx_out(6) = 0.0;
49  }
50  };
51  }
52 }
kinematic vehicle model
Definition: kinematic_model.h:29
virtual void f(double t, const adoreMatrix< double, 0, 1 > &x_in, adoreMatrix< double, 0, 1 > &dx_out)
compute derivative: planar kinematic model
Definition: kinematic_model.h:37
Definition: aodemodel.h:30
interval< T > cos(interval< T > x)
Definition: intervalarithmetic.h:225
interval< T > sin(interval< T > x)
Definition: intervalarithmetic.h:204
Definition: areaofeffectconverter.h:20