ADORe
ADORe is a modular open source software library and toolkit for decision making, planning, control and simulation of automated vehicles
terminalrequest.h
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2017-2020 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/adoremath.h>
17 
18 namespace adore
19 {
20  namespace fun
21  {
27  {
28  private:
29  double X,Y,psi,t;
30  bool valid;
31  public:
32  void set(double X,double Y,double psi,double t,bool valid)
33  {
34  this->X=X;
35  this->Y=Y;
36  this->psi=psi;
37  this->t=t;
38  this->valid=valid;
39  }
40  double getX()const{return X;}
41  double getY()const{return Y;}
42  double getPSI()const{return psi;}
43  double getT()const{return t;}
44  bool isValid()const{return valid;}
45  bool isActive(double t)const{return valid && t>this->t;}
46  adoreMatrix<double,3,1> getStateVector()const
47  {
48  adoreMatrix<double,3,1> m;
49  m(0)=X;
50  m(1)=Y;
51  m(2)=psi;
52  return m;
53  }
54  void relocate(double new_X0,double new_Y0, double new_PSI0)
55  {
56  X = new_X0;
57  Y = new_Y0;
58  psi = new_PSI0;
59  }
60  void setStartTime(double new_t0)
61  {
62  t = new_t0;
63  }
64  TerminalRequest():X(0.0),Y(0.0),psi(0.0),t(0.0),valid(false){}
65  TerminalRequest(double X,double Y,double psi,double t,bool valid):X(X),Y(Y),psi(psi),t(t),valid(valid){}
66  };
67  }
68 }
Definition: terminalrequest.h:27
double getPSI() const
Definition: terminalrequest.h:42
double t
Definition: terminalrequest.h:29
double getY() const
Definition: terminalrequest.h:41
adoreMatrix< double, 3, 1 > getStateVector() const
Definition: terminalrequest.h:46
double getT() const
Definition: terminalrequest.h:43
void set(double X, double Y, double psi, double t, bool valid)
Definition: terminalrequest.h:32
TerminalRequest()
Definition: terminalrequest.h:64
double getX() const
Definition: terminalrequest.h:40
TerminalRequest(double X, double Y, double psi, double t, bool valid)
Definition: terminalrequest.h:65
bool isActive(double t) const
Definition: terminalrequest.h:45
void setStartTime(double new_t0)
Definition: terminalrequest.h:60
double X
Definition: terminalrequest.h:29
double Y
Definition: terminalrequest.h:29
void relocate(double new_X0, double new_Y0, double new_PSI0)
Definition: terminalrequest.h:54
bool valid
Definition: terminalrequest.h:30
bool isValid() const
Definition: terminalrequest.h:44
double psi
Definition: terminalrequest.h:29
Definition: areaofeffectconverter.h:20