|
APM:Libraries
|
#include <SIM_Plane.h>
Public Member Functions | |
| Plane (const char *home_str, const char *frame_str) | |
| virtual void | update (const struct sitl_input &input) |
Public Member Functions inherited from SITL::Aircraft | |
| Aircraft (const char *home_str, const char *frame_str) | |
| void | set_speedup (float speedup) |
| void | set_instance (uint8_t _instance) |
| void | set_autotest_dir (const char *_autotest_dir) |
| virtual void | set_interface_ports (const char *address, const int port_in, const int port_out) |
| void | fill_fdm (struct sitl_fdm &fdm) |
| void | smooth_sensors (void) |
| float | get_rate_hz (void) const |
| const Vector3f & | get_gyro (void) const |
| const Vector3f & | get_velocity_ef (void) const |
| const Vector3f & | get_velocity_air_ef (void) const |
| const Matrix3f & | get_dcm (void) const |
| const Vector3f & | get_mag_field_bf (void) const |
| virtual float | gross_mass () const |
| const Location & | get_location () const |
| const Vector3f & | get_position () const |
| void | get_attitude (Quaternion &attitude) const |
Static Public Member Functions | |
| static Aircraft * | create (const char *home_str, const char *frame_str) |
Static Public Member Functions inherited from SITL::Aircraft | |
| static double | rand_normal (double mean, double stddev) |
| static bool | parse_home (const char *home_str, Location &loc, float &yaw_degrees) |
Protected Member Functions | |
| float | liftCoeff (float alpha) const |
| float | dragCoeff (float alpha) const |
| Vector3f | getForce (float inputAileron, float inputElevator, float inputRudder) const |
| Vector3f | getTorque (float inputAileron, float inputElevator, float inputRudder, float inputThrust, const Vector3f &force) const |
| void | calculate_forces (const struct sitl_input &input, Vector3f &rot_accel, Vector3f &body_accel) |
Protected Member Functions inherited from SITL::Aircraft | |
| float | ground_height_difference () const |
| virtual bool | on_ground () const |
| float | hagl () const |
| void | update_position (void) |
| void | update_mag_field_bf (void) |
| void | time_advance () |
| void | setup_frame_time (float rate, float speedup) |
| void | adjust_frame_time (float rate) |
| void | sync_frame_time (void) |
| void | add_noise (float throttle) |
| uint64_t | get_wall_time_us (void) const |
| void | update_dynamics (const Vector3f &rot_accel) |
| void | update_wind (const struct sitl_input &input) |
| float | filtered_idx (float v, uint8_t idx) |
| float | filtered_servo_angle (const struct sitl_input &input, uint8_t idx) |
| float | filtered_servo_range (const struct sitl_input &input, uint8_t idx) |
| void | extrapolate_sensors (float delta_time) |
Protected Attributes | |
| const float | hover_throttle = 0.7f |
| const float | air_density = 1.225 |
| float | angle_of_attack |
| float | beta |
| struct { | |
| float s = 0.45 | |
| float b = 1.88 | |
| float c = 0.24 | |
| float c_lift_0 = 0.56 | |
| float c_lift_deltae = 0 | |
| float c_lift_a = 6.9 | |
| float c_lift_q = 0 | |
| float mcoeff = 50 | |
| float oswald = 0.9 | |
| float alpha_stall = 0.4712 | |
| float c_drag_q = 0 | |
| float c_drag_deltae = 0.0 | |
| float c_drag_p = 0.1 | |
| float c_y_0 = 0 | |
| float c_y_b = -0.98 | |
| float c_y_p = 0 | |
| float c_y_r = 0 | |
| float c_y_deltaa = 0 | |
| float c_y_deltar = -0.2 | |
| float c_l_0 = 0 | |
| float c_l_p = -1.0 | |
| float c_l_b = -0.12 | |
| float c_l_r = 0.14 | |
| float c_l_deltaa = 0.25 | |
| float c_l_deltar = -0.037 | |
| float c_m_0 = 0.045 | |
| float c_m_a = -0.7 | |
| float c_m_q = -20 | |
| float c_m_deltae = 1.0 | |
| float c_n_0 = 0 | |
| float c_n_b = 0.25 | |
| float c_n_p = 0.022 | |
| float c_n_r = -1 | |
| float c_n_deltaa = 0.00 | |
| float c_n_deltar = 0.1 | |
| float deltaa_max = 0.3491 | |
| float deltae_max = 0.3491 | |
| float deltar_max = 0.3491 | |
| Vector3f CGOffset {-0.15, 0, -0.05} | |
| } | coefficient |
| float | thrust_scale |
| bool | reverse_thrust |
| bool | elevons |
| bool | vtail |
| bool | dspoilers |
| bool | reverse_elevator_rudder |
| bool | ice_engine |
| bool | tailsitter |
| bool | have_launcher |
| float | launch_accel |
| float | launch_time |
| uint64_t | launch_start_ms |
| ICEngine | icengine {2, 14, 12, 13, 100} |
Protected Attributes inherited from SITL::Aircraft | |
| SITL * | sitl |
| Location | home |
| Location | location |
| float | ground_level |
| float | home_yaw |
| float | frame_height |
| Matrix3f | dcm |
| Vector3f | gyro |
| Vector3f | gyro_prev |
| Vector3f | ang_accel |
| Vector3f | velocity_ef |
| Vector3f | wind_ef |
| Vector3f | velocity_air_ef |
| Vector3f | velocity_air_bf |
| Vector3f | position |
| float | mass |
| Vector3f | accel_body |
| float | airspeed |
| float | airspeed_pitot |
| float | battery_voltage = -1.0f |
| float | battery_current = 0.0f |
| float | rpm1 = 0 |
| float | rpm2 = 0 |
| uint8_t | rcin_chan_count = 0 |
| float | rcin [8] |
| float | range = -1.0f |
| float | turbulence_azimuth = 0.0f |
| float | turbulence_horizontal_speed = 0.0f |
| float | turbulence_vertical_speed = 0.0f |
| Vector3f | mag_bf |
| uint64_t | time_now_us |
| const float | gyro_noise |
| const float | accel_noise |
| float | rate_hz |
| float | achieved_rate_hz |
| float | target_speedup |
| uint64_t | frame_time_us |
| float | scaled_frame_time_us |
| uint64_t | last_wall_time_us |
| uint8_t | instance |
| const char * | autotest_dir |
| const char * | frame |
| bool | use_time_sync = true |
| float | last_speedup = -1.0f |
| AP_Int8 * | ahrs_orientation |
| enum SITL::Aircraft:: { ... } | ground_behavior |
| bool | use_smoothing |
| AP_Terrain * | terrain |
| const float | FEET_TO_METERS = 0.3048f |
| const float | KNOTS_TO_METERS_PER_SECOND = 0.51444f |
Additional Inherited Members | |
Protected Types inherited from SITL::Aircraft | |
| enum | { GROUND_BEHAVIOR_NONE = 0, GROUND_BEHAVIOR_NO_MOVEMENT, GROUND_BEHAVIOR_FWD_ONLY, GROUND_BEHAVIOR_TAILSITTER } |
Definition at line 30 of file SIM_Plane.h.
| Plane::Plane | ( | const char * | home_str, |
| const char * | frame_str | ||
| ) |
Definition at line 26 of file SIM_Plane.cpp.
Referenced by create().
|
protected |
Definition at line 250 of file SIM_Plane.cpp.
Referenced by update(), and SITL::QuadPlane::update().
|
inlinestatic |
|
protected |
Definition at line 109 of file SIM_Plane.cpp.
Referenced by getForce().
|
protected |
Definition at line 196 of file SIM_Plane.cpp.
Referenced by calculate_forces().
|
protected |
Definition at line 125 of file SIM_Plane.cpp.
Referenced by calculate_forces().
|
protected |
Definition at line 87 of file SIM_Plane.cpp.
Referenced by getForce().
|
virtual |
Implements SITL::Aircraft.
Reimplemented in SITL::QuadPlane.
Definition at line 363 of file SIM_Plane.cpp.
|
protected |
Definition at line 44 of file SIM_Plane.h.
Referenced by getForce(), and getTorque().
| float SITL::Plane::alpha_stall = 0.4712 |
Definition at line 60 of file SIM_Plane.h.
|
protected |
Definition at line 45 of file SIM_Plane.h.
Referenced by calculate_forces(), getForce(), and getTorque().
| float SITL::Plane::b = 1.88 |
Definition at line 52 of file SIM_Plane.h.
Referenced by dragCoeff(), getForce(), and getTorque().
|
protected |
Definition at line 46 of file SIM_Plane.h.
Referenced by calculate_forces(), getForce(), and getTorque().
| float SITL::Plane::c = 0.24 |
Definition at line 53 of file SIM_Plane.h.
Referenced by getForce(), and getTorque().
| float SITL::Plane::c_drag_deltae = 0.0 |
Definition at line 62 of file SIM_Plane.h.
Referenced by getForce().
| float SITL::Plane::c_drag_p = 0.1 |
Definition at line 63 of file SIM_Plane.h.
Referenced by dragCoeff().
| float SITL::Plane::c_drag_q = 0 |
Definition at line 61 of file SIM_Plane.h.
Referenced by getForce().
| float SITL::Plane::c_l_0 = 0 |
Definition at line 70 of file SIM_Plane.h.
Referenced by getTorque().
| float SITL::Plane::c_l_b = -0.12 |
Definition at line 72 of file SIM_Plane.h.
Referenced by getTorque().
| float SITL::Plane::c_l_deltaa = 0.25 |
Definition at line 74 of file SIM_Plane.h.
Referenced by getTorque().
| float SITL::Plane::c_l_deltar = -0.037 |
Definition at line 75 of file SIM_Plane.h.
Referenced by getTorque().
| float SITL::Plane::c_l_p = -1.0 |
Definition at line 71 of file SIM_Plane.h.
Referenced by getTorque().
| float SITL::Plane::c_l_r = 0.14 |
Definition at line 73 of file SIM_Plane.h.
Referenced by getTorque().
| float SITL::Plane::c_lift_0 = 0.56 |
Definition at line 54 of file SIM_Plane.h.
Referenced by dragCoeff(), and liftCoeff().
| float SITL::Plane::c_lift_a = 6.9 |
Definition at line 56 of file SIM_Plane.h.
Referenced by getForce().
| float SITL::Plane::c_lift_deltae = 0 |
Definition at line 55 of file SIM_Plane.h.
Referenced by getForce().
| float SITL::Plane::c_lift_q = 0 |
Definition at line 57 of file SIM_Plane.h.
Referenced by getForce().
| float SITL::Plane::c_m_0 = 0.045 |
Definition at line 76 of file SIM_Plane.h.
Referenced by getTorque().
| float SITL::Plane::c_m_a = -0.7 |
Definition at line 77 of file SIM_Plane.h.
Referenced by getTorque().
| float SITL::Plane::c_m_deltae = 1.0 |
Definition at line 79 of file SIM_Plane.h.
Referenced by getTorque().
| float SITL::Plane::c_m_q = -20 |
Definition at line 78 of file SIM_Plane.h.
Referenced by getTorque().
| float SITL::Plane::c_n_0 = 0 |
Definition at line 80 of file SIM_Plane.h.
Referenced by getTorque().
| float SITL::Plane::c_n_b = 0.25 |
Definition at line 81 of file SIM_Plane.h.
Referenced by getTorque().
| float SITL::Plane::c_n_deltaa = 0.00 |
Definition at line 84 of file SIM_Plane.h.
Referenced by getTorque().
| float SITL::Plane::c_n_deltar = 0.1 |
Definition at line 85 of file SIM_Plane.h.
Referenced by getTorque().
| float SITL::Plane::c_n_p = 0.022 |
Definition at line 82 of file SIM_Plane.h.
Referenced by getTorque().
| float SITL::Plane::c_n_r = -1 |
Definition at line 83 of file SIM_Plane.h.
Referenced by getTorque().
| float SITL::Plane::c_y_0 = 0 |
Definition at line 64 of file SIM_Plane.h.
Referenced by getForce().
| float SITL::Plane::c_y_b = -0.98 |
Definition at line 65 of file SIM_Plane.h.
Referenced by getForce().
| float SITL::Plane::c_y_deltaa = 0 |
Definition at line 68 of file SIM_Plane.h.
Referenced by getForce().
| float SITL::Plane::c_y_deltar = -0.2 |
Definition at line 69 of file SIM_Plane.h.
Referenced by getForce().
| float SITL::Plane::c_y_p = 0 |
Definition at line 66 of file SIM_Plane.h.
Referenced by getForce().
| float SITL::Plane::c_y_r = 0 |
Definition at line 67 of file SIM_Plane.h.
Referenced by getForce().
| Vector3f SITL::Plane::CGOffset {-0.15, 0, -0.05} |
Definition at line 91 of file SIM_Plane.h.
Referenced by getTorque().
| struct { ... } SITL::Plane::coefficient |
Referenced by dragCoeff(), getForce(), getTorque(), and liftCoeff().
| float SITL::Plane::deltaa_max = 0.3491 |
Definition at line 86 of file SIM_Plane.h.
| float SITL::Plane::deltae_max = 0.3491 |
Definition at line 87 of file SIM_Plane.h.
| float SITL::Plane::deltar_max = 0.3491 |
Definition at line 88 of file SIM_Plane.h.
|
protected |
Definition at line 98 of file SIM_Plane.h.
Referenced by calculate_forces(), and Plane().
|
protected |
Definition at line 96 of file SIM_Plane.h.
Referenced by calculate_forces(), Plane(), and SITL::QuadPlane::QuadPlane().
|
protected |
Definition at line 102 of file SIM_Plane.h.
Referenced by calculate_forces(), and Plane().
|
protected |
Definition at line 43 of file SIM_Plane.h.
Referenced by Plane().
|
protected |
Definition at line 100 of file SIM_Plane.h.
Referenced by calculate_forces(), and Plane().
|
protected |
Definition at line 107 of file SIM_Plane.h.
Referenced by calculate_forces().
|
protected |
Definition at line 103 of file SIM_Plane.h.
Referenced by calculate_forces(), and Plane().
|
protected |
Definition at line 105 of file SIM_Plane.h.
Referenced by calculate_forces().
|
protected |
Definition at line 104 of file SIM_Plane.h.
Referenced by calculate_forces(), and Plane().
| float SITL::Plane::mcoeff = 50 |
Definition at line 58 of file SIM_Plane.h.
| float SITL::Plane::oswald = 0.9 |
Definition at line 59 of file SIM_Plane.h.
Referenced by dragCoeff().
|
protected |
Definition at line 99 of file SIM_Plane.h.
Referenced by calculate_forces(), and Plane().
|
protected |
Definition at line 95 of file SIM_Plane.h.
Referenced by calculate_forces(), and Plane().
| float SITL::Plane::s = 0.45 |
Definition at line 51 of file SIM_Plane.h.
Referenced by dragCoeff(), getForce(), and getTorque().
|
protected |
Definition at line 101 of file SIM_Plane.h.
Referenced by calculate_forces(), getTorque(), and Plane().
|
protected |
Definition at line 94 of file SIM_Plane.h.
Referenced by calculate_forces(), Plane(), and SITL::QuadPlane::QuadPlane().
|
protected |
Definition at line 97 of file SIM_Plane.h.
Referenced by calculate_forces(), and Plane().
1.8.13