APM:Libraries
SIM_Calibration.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015-2016 Intel Corporation. All rights reserved.
3  *
4  * This file is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License as published by the
6  * Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This file is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12  * See the GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 #pragma once
18 
19 #include "SIM_Aircraft.h"
20 
21 #include <AP_Math/AP_Math.h>
22 
23 namespace SITL {
24 
65 class Calibration : public Aircraft {
66 public:
67  Calibration(const char *home_str, const char *frame_str);
68 
69  void update(const struct sitl_input& input);
70 
71  static Aircraft *create(const char *home_str, const char *frame_str) {
72  return new Calibration(home_str, frame_str);
73  }
74 
75 private:
76  void _stop_control(const struct sitl_input& input, Vector3f& rot_accel);
77 
78  void _attitude_set(float desired_roll, float desired_pitch, float desired_yaw,
79  Vector3f& rot_accel);
80 
81  void _attitude_control(const struct sitl_input& input,
82  Vector3f& rot_accel);
83 
84  void _angular_velocity_control(const struct sitl_input& input,
85  Vector3f& rot_accel);
86 
87  void _calibration_poses(Vector3f& rot_accel);
88 };
89 }
void update(const struct sitl_input &input)
void _attitude_set(float desired_roll, float desired_pitch, float desired_yaw, Vector3f &rot_accel)
void _angular_velocity_control(const struct sitl_input &input, Vector3f &rot_accel)
void _attitude_control(const struct sitl_input &input, Vector3f &rot_accel)
void _stop_control(const struct sitl_input &input, Vector3f &rot_accel)
static Aircraft * create(const char *home_str, const char *frame_str)
void _calibration_poses(Vector3f &rot_accel)
Calibration(const char *home_str, const char *frame_str)