|
APM:Libraries
|
#include <SIM_XPlane.h>
Public Member Functions | |
| XPlane (const char *home_str, const char *frame_str) | |
| 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) |
Private Types | |
| enum | { FramRate = 0, Times = 1, SimStats = 2, Speed = 3, Gload = 4, AtmosphereWeather = 5, AtmosphereAircraft = 6, SystemPressures = 7, Joystick1 = 8, Joystick2 = 9, ArtStab = 10, FlightCon = 11, WingSweep = 12, Trim = 13, Brakes = 14, AngularMoments = 15, AngularVelocities = 16, PitchRollHeading = 17, AoA = 18, MagCompass = 19, LatLonAlt = 20, LocVelDistTraveled = 21, ThrottleCommand = 25, Mixture = 29, CarbHeat = 30, EngineRPM = 37, PropRPM = 38, PropPitch = 39, Generator = 58 } |
Private Member Functions | |
| bool | receive_data (void) |
| void | send_dref (const char *name, float value) |
| void | send_data (const struct sitl_input &input) |
| void | select_data (uint64_t usel_mask, uint64_t sel_mask) |
Private Attributes | |
| const char * | xplane_ip = "127.0.0.1" |
| uint16_t | xplane_port = 49000 |
| uint16_t | bind_port = 49001 |
| SocketAPM | socket_in {true} |
| SocketAPM | socket_out {true} |
| uint64_t | time_base_us |
| uint32_t | last_data_time_ms |
| Vector3f | position_zero |
| Vector3f | accel_earth |
| float | throttle_sent = -1 |
| bool | connected = false |
| uint32_t | xplane_frame_time |
| struct { | |
| uint32_t last_report_ms | |
| uint32_t data_count | |
| uint32_t frame_count | |
| } | report |
| float | last_flap |
| bool | heli_frame |
| uint64_t | unselected_mask |
| const float | throttle_magic = 0.000123f |
| const float | throttle_magic_scale = 1.0e6 |
Definition at line 30 of file SIM_XPlane.h.
|
private |
Definition at line 80 of file SIM_XPlane.h.
| SITL::XPlane::XPlane | ( | const char * | home_str, |
| const char * | frame_str | ||
| ) |
Definition at line 35 of file SIM_XPlane.cpp.
Referenced by create().
|
inlinestatic |
|
private |
Definition at line 101 of file SIM_XPlane.cpp.
Referenced by create(), and update().
|
private |
Definition at line 59 of file SIM_XPlane.cpp.
Referenced by create(), and receive_data().
|
private |
Definition at line 357 of file SIM_XPlane.cpp.
Referenced by create(), and update().
|
private |
Definition at line 446 of file SIM_XPlane.cpp.
Referenced by create(), and send_data().
|
virtual |
Implements SITL::Aircraft.
Definition at line 461 of file SIM_XPlane.cpp.
|
private |
Definition at line 58 of file SIM_XPlane.h.
Referenced by receive_data().
|
private |
Definition at line 50 of file SIM_XPlane.h.
Referenced by XPlane().
|
private |
Definition at line 60 of file SIM_XPlane.h.
Referenced by receive_data().
| uint32_t SITL::XPlane::data_count |
Definition at line 64 of file SIM_XPlane.h.
| uint32_t SITL::XPlane::frame_count |
Definition at line 65 of file SIM_XPlane.h.
|
private |
Definition at line 70 of file SIM_XPlane.h.
Referenced by receive_data(), send_data(), and XPlane().
|
private |
Definition at line 56 of file SIM_XPlane.h.
Referenced by receive_data().
|
private |
Definition at line 67 of file SIM_XPlane.h.
Referenced by send_data().
| uint32_t SITL::XPlane::last_report_ms |
Definition at line 63 of file SIM_XPlane.h.
|
private |
Definition at line 57 of file SIM_XPlane.h.
Referenced by receive_data().
| struct { ... } SITL::XPlane::report |
Referenced by receive_data(), and update().
|
private |
Definition at line 52 of file SIM_XPlane.h.
Referenced by receive_data(), and XPlane().
|
private |
Definition at line 53 of file SIM_XPlane.h.
Referenced by receive_data(), select_data(), send_data(), and send_dref().
|
private |
Definition at line 75 of file SIM_XPlane.h.
Referenced by receive_data(), and send_data().
|
private |
Definition at line 76 of file SIM_XPlane.h.
Referenced by receive_data().
|
private |
Definition at line 59 of file SIM_XPlane.h.
Referenced by receive_data(), and send_data().
|
private |
Definition at line 55 of file SIM_XPlane.h.
Referenced by receive_data().
|
private |
Definition at line 72 of file SIM_XPlane.h.
Referenced by receive_data(), and select_data().
|
private |
Definition at line 61 of file SIM_XPlane.h.
Referenced by receive_data().
|
private |
Definition at line 48 of file SIM_XPlane.h.
Referenced by receive_data(), and XPlane().
|
private |
Definition at line 49 of file SIM_XPlane.h.
Referenced by receive_data(), and XPlane().
1.8.13