APM:Libraries
SIM_Rover.h
Go to the documentation of this file.
1 /*
2  This program is free software: you can redistribute it and/or modify
3  it under the terms of the GNU General Public License as published by
4  the Free Software Foundation, either version 3 of the License, or
5  (at your option) any later version.
6 
7  This program is distributed in the hope that it will be useful,
8  but WITHOUT ANY WARRANTY; without even the implied warranty of
9  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  GNU General Public License for more details.
11 
12  You should have received a copy of the GNU General Public License
13  along with this program. If not, see <http://www.gnu.org/licenses/>.
14  */
15 /*
16  rover simulator class
17 */
18 
19 #pragma once
20 
21 #include "SIM_Aircraft.h"
22 
23 namespace SITL {
24 
25 /*
26  a rover simulator
27  */
28 class SimRover : public Aircraft {
29 public:
30  SimRover(const char *home_str, const char *frame_str);
31 
32  /* update model by one time step */
33  void update(const struct sitl_input &input);
34 
35  /* static object creator */
36  static Aircraft *create(const char *home_str, const char *frame_str) {
37  return new SimRover(home_str, frame_str);
38  }
39 
40 private:
41  float max_speed;
42  float max_accel;
47 
48  float turn_circle(float steering);
49  float calc_yaw_rate(float steering, float speed);
50  float calc_lat_accel(float steering_angle, float speed);
51 };
52 
53 } // namespace SITL
float calc_yaw_rate(float steering, float speed)
Definition: SIM_Rover.cpp:62
float max_wheel_turn
Definition: SIM_Rover.h:43
SimRover(const char *home_str, const char *frame_str)
Definition: SIM_Rover.cpp:26
float max_accel
Definition: SIM_Rover.h:42
float turning_circle
Definition: SIM_Rover.h:44
bool skid_steering
Definition: SIM_Rover.h:46
float calc_lat_accel(float steering_angle, float speed)
Definition: SIM_Rover.cpp:80
float turn_circle(float steering)
Definition: SIM_Rover.cpp:51
static Aircraft * create(const char *home_str, const char *frame_str)
Definition: SIM_Rover.h:36
float max_speed
Definition: SIM_Rover.h:41
float skid_turn_rate
Definition: SIM_Rover.h:45
void update(const struct sitl_input &input)
Definition: SIM_Rover.cpp:90