APM:Libraries
|
#include <SITL_State.h>
Classes | |
struct | gps_data |
struct | readings_mag |
struct | readings_wind |
Public Types | |
enum | vehicle_type { ArduCopter, APMrover2, ArduPlane, ArduSub } |
Public Member Functions | |
void | init (int argc, char *const argv[]) |
int | gps_pipe (void) |
int | gps2_pipe (void) |
ssize_t | gps_read (int fd, void *buf, size_t count) |
void | loop_hook (void) |
uint16_t | base_port (void) const |
int | sim_fd (const char *name, const char *arg) |
bool | use_rtscts (void) const |
const char * | get_client_address (void) const |
Public Attributes | |
uint16_t | pwm_output [SITL_NUM_CHANNELS] |
uint16_t | pwm_input [SITL_RC_INPUT_CHANNELS] |
bool | output_ready = false |
bool | new_rc_input |
uint16_t | sonar_pin_value |
uint16_t | airspeed_pin_value |
uint16_t | airspeed_2_pin_value |
uint16_t | voltage_pin_value |
uint16_t | current_pin_value |
uint16_t | voltage2_pin_value |
uint16_t | current2_pin_value |
const char * | _uart_path [6] |
Private Member Functions | |
void | _parse_command_line (int argc, char *const argv[]) |
void | _set_param_default (const char *parm) |
void | _usage (void) |
void | _sitl_setup (const char *home_str) |
void | _setup_fdm (void) |
void | _setup_timer (void) |
void | _setup_adc (void) |
void | set_height_agl (void) |
void | _update_rangefinder (float range_value) |
void | _set_signal_handlers (void) const |
void | _gps_write (const uint8_t *p, uint16_t size, uint8_t instance) |
void | _gps_send_ubx (uint8_t msgid, uint8_t *buf, uint16_t size, uint8_t instance) |
void | _update_gps_ubx (const struct gps_data *d, uint8_t instance) |
void | _update_gps_mtk (const struct gps_data *d, uint8_t instance) |
void | _update_gps_mtk16 (const struct gps_data *d, uint8_t instance) |
void | _update_gps_mtk19 (const struct gps_data *d, uint8_t instance) |
uint16_t | _gps_nmea_checksum (const char *s) |
void | _gps_nmea_printf (uint8_t instance, const char *fmt,...) |
void | _update_gps_nmea (const struct gps_data *d, uint8_t instance) |
void | _sbp_send_message (uint16_t msg_type, uint16_t sender_id, uint8_t len, uint8_t *payload, uint8_t instance) |
void | _update_gps_sbp (const struct gps_data *d, uint8_t instance) |
void | _update_gps_sbp2 (const struct gps_data *d, uint8_t instance) |
void | _update_gps_file (uint8_t instance) |
void | _update_gps_nova (const struct gps_data *d, uint8_t instance) |
void | _nova_send_message (uint8_t *header, uint8_t headerlength, uint8_t *payload, uint8_t payloadlen, uint8_t instance) |
uint32_t | CRC32Value (uint32_t icrc) |
uint32_t | CalculateBlockCRC32 (uint32_t length, uint8_t *buffer, uint32_t crc) |
void | _update_gps (double latitude, double longitude, float altitude, double speedN, double speedE, double speedD, bool have_lock) |
void | _update_airspeed (float airspeed) |
void | _update_gps_instance (SITL::SITL::GPSType gps_type, const struct gps_data *d, uint8_t instance) |
void | _check_rc_input (void) |
void | _fdm_input_local (void) |
void | _output_to_flightgear (void) |
void | _simulator_servos (SITL::Aircraft::sitl_input &input) |
void | _simulator_output (bool synthetic_clock_mode) |
uint16_t | _airspeed_sensor (float airspeed) |
uint16_t | _ground_sonar () |
void | _fdm_input_step (void) |
void | wait_clock (uint64_t wait_time_usec) |
Static Private Attributes | |
static const uint8_t | mag_buffer_length = 250 |
static const uint8_t | wind_buffer_length = 50 |
Friends | |
class | HALSITL::Scheduler |
class | HALSITL::Util |
class | HALSITL::GPIO |
Definition at line 30 of file SITL_State.h.
Enumerator | |
---|---|
ArduCopter | |
APMrover2 | |
ArduPlane | |
ArduSub |
Definition at line 37 of file SITL_State.h.
|
private |
|
private |
Definition at line 211 of file SITL_State.cpp.
Referenced by _fdm_input_local().
|
private |
Definition at line 277 of file SITL_State.cpp.
Referenced by _fdm_input_step().
|
private |
Definition at line 133 of file SITL_State.cpp.
Referenced by wait_clock().
|
private |
Definition at line 609 of file sitl_gps.cpp.
|
private |
|
private |
Definition at line 149 of file sitl_gps.cpp.
|
private |
|
private |
|
private |
Definition at line 1088 of file sitl_gps.cpp.
|
private |
Definition at line 242 of file SITL_State.cpp.
Referenced by _fdm_input_local().
|
private |
Definition at line 129 of file SITL_cmdline.cpp.
Referenced by init().
|
private |
|
private |
|
private |
|
private |
|
private |
Definition at line 117 of file SITL_State.cpp.
Referenced by _sitl_setup().
|
private |
|
private |
|
private |
Definition at line 337 of file SITL_State.cpp.
Referenced by _fdm_input_local().
|
private |
|
private |
Definition at line 26 of file sitl_airspeed.cpp.
Referenced by _fdm_input_step(), and _sitl_setup().
|
private |
Definition at line 1161 of file sitl_gps.cpp.
Referenced by _fdm_input_step(), and _sitl_setup().
|
private |
|
private |
Definition at line 1294 of file sitl_gps.cpp.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Definition at line 25 of file sitl_rangefinder.cpp.
Referenced by _fdm_input_step(), and _sitl_setup().
|
private |
|
inline |
Definition at line 52 of file SITL_State.h.
Referenced by HALSITL::UARTDriver::_tcp_start_connection().
|
private |
Definition at line 1114 of file sitl_gps.cpp.
|
private |
Definition at line 1100 of file sitl_gps.cpp.
|
inline |
Definition at line 74 of file SITL_State.h.
int SITL_State::gps2_pipe | ( | void | ) |
int SITL_State::gps_pipe | ( | void | ) |
ssize_t SITL_State::gps_read | ( | int | fd, |
void * | buf, | ||
size_t | count | ||
) |
void SITL_State::init | ( | int | argc, |
char *const | argv[] | ||
) |
Definition at line 492 of file SITL_State.cpp.
Referenced by HAL_SITL::run().
void HALSITL::SITL_State::loop_hook | ( | void | ) |
|
private |
Definition at line 505 of file SITL_State.cpp.
Referenced by _fdm_input_local().
int SITL_State::sim_fd | ( | const char * | name, |
const char * | arg | ||
) |
Definition at line 195 of file SITL_State.cpp.
Referenced by base_port().
|
inline |
Definition at line 60 of file SITL_State.h.
Referenced by HALSITL::UARTDriver::_uart_start_connection().
|
private |
Definition at line 187 of file SITL_State.cpp.
Referenced by HALSITL::Scheduler::Scheduler().
|
friend |
Definition at line 33 of file SITL_State.h.
|
friend |
Definition at line 31 of file SITL_State.h.
|
friend |
Definition at line 32 of file SITL_State.h.
|
private |
Definition at line 156 of file SITL_State.h.
Referenced by _simulator_servos(), _sitl_setup(), and _update_airspeed().
|
private |
Definition at line 151 of file SITL_State.h.
Referenced by base_port().
|
private |
Definition at line 224 of file SITL_State.h.
Referenced by get_client_address().
|
private |
Definition at line 159 of file SITL_State.h.
Referenced by _sitl_setup().
|
private |
Definition at line 170 of file SITL_State.h.
Referenced by _simulator_servos().
|
private |
Definition at line 177 of file SITL_State.h.
Referenced by _sitl_setup().
|
private |
Definition at line 168 of file SITL_State.h.
Referenced by _sitl_setup().
|
private |
Definition at line 149 of file SITL_State.h.
|
private |
Definition at line 113 of file SITL_State.h.
|
private |
Definition at line 110 of file SITL_State.h.
|
private |
Definition at line 112 of file SITL_State.h.
|
private |
Definition at line 228 of file SITL_State.h.
Referenced by _fdm_input_step(), and _sitl_setup().
|
private |
Definition at line 157 of file SITL_State.h.
Referenced by _sitl_setup().
|
private |
Definition at line 150 of file SITL_State.h.
|
private |
Definition at line 169 of file SITL_State.h.
Referenced by _sitl_setup().
|
private |
Definition at line 153 of file SITL_State.h.
Referenced by _fdm_input_step(), and _sitl_setup().
|
private |
Definition at line 167 of file SITL_State.h.
Referenced by _setup_fdm().
|
private |
Definition at line 152 of file SITL_State.h.
Referenced by _sitl_setup().
|
private |
Definition at line 166 of file SITL_State.h.
Referenced by _sitl_setup().
|
private |
Definition at line 158 of file SITL_State.h.
Referenced by _fdm_input_step(), and init().
|
private |
Definition at line 165 of file SITL_State.h.
Referenced by _fdm_input_local(), _fdm_input_step(), _output_to_flightgear(), _simulator_servos(), _sitl_setup(), _update_airspeed(), _update_rangefinder(), HALSITL::Scheduler::Scheduler(), and set_height_agl().
|
private |
Definition at line 164 of file SITL_State.h.
Referenced by _check_rc_input(), and _setup_fdm().
|
private |
Definition at line 172 of file SITL_State.h.
Referenced by _fdm_input_local(), and _sitl_setup().
const char* HALSITL::SITL_State::_uart_path[6] |
Definition at line 77 of file SITL_State.h.
|
private |
Definition at line 154 of file SITL_State.h.
Referenced by _fdm_input_local(), and _fdm_input_step().
|
private |
Definition at line 175 of file SITL_State.h.
Referenced by _fdm_input_local(), and _sitl_setup().
|
private |
Definition at line 174 of file SITL_State.h.
Referenced by use_rtscts().
|
private |
Definition at line 148 of file SITL_State.h.
Referenced by _output_to_flightgear(), and _simulator_servos().
|
private |
Definition at line 215 of file SITL_State.h.
Referenced by _fdm_input_local(), and _fdm_input_step().
uint16_t HALSITL::SITL_State::airspeed_2_pin_value |
Definition at line 67 of file SITL_State.h.
Referenced by _update_airspeed(), and HALSITL::ADCSource::read_latest().
uint16_t HALSITL::SITL_State::airspeed_pin_value |
Definition at line 66 of file SITL_State.h.
Referenced by _update_airspeed(), and HALSITL::ADCSource::read_latest().
|
private |
Definition at line 190 of file SITL_State.h.
|
private |
Definition at line 201 of file SITL_State.h.
Referenced by _update_airspeed().
|
private |
Definition at line 202 of file SITL_State.h.
Referenced by _update_airspeed().
uint16_t HALSITL::SITL_State::current2_pin_value |
Definition at line 71 of file SITL_State.h.
Referenced by _simulator_servos(), and HALSITL::ADCSource::read_latest().
uint16_t HALSITL::SITL_State::current_pin_value |
Definition at line 69 of file SITL_State.h.
Referenced by _simulator_servos(), and HALSITL::ADCSource::read_latest().
|
private |
Definition at line 226 of file SITL_State.h.
Referenced by HALSITL::Util::get_custom_defaults_file().
|
private |
Definition at line 192 of file SITL_State.h.
|
private |
Definition at line 204 of file SITL_State.h.
Referenced by _update_airspeed().
|
private |
Definition at line 211 of file SITL_State.h.
Referenced by _sitl_setup().
|
private |
Definition at line 221 of file SITL_State.h.
Referenced by _output_to_flightgear(), and _sitl_setup().
|
private |
Definition at line 212 of file SITL_State.h.
Referenced by _fdm_input_local(), and _sitl_setup().
|
private |
Definition at line 189 of file SITL_State.h.
|
private |
Definition at line 200 of file SITL_State.h.
Referenced by _update_airspeed().
|
staticprivate |
Definition at line 180 of file SITL_State.h.
bool HALSITL::SITL_State::new_rc_input |
Definition at line 50 of file SITL_State.h.
Referenced by _fdm_input_step(), and HALSITL::RCInput::new_input().
bool HALSITL::SITL_State::output_ready = false |
Definition at line 49 of file SITL_State.h.
Referenced by _simulator_servos().
uint16_t HALSITL::SITL_State::pwm_input[SITL_RC_INPUT_CHANNELS] |
Definition at line 48 of file SITL_State.h.
Referenced by _check_rc_input(), _fdm_input_local(), init(), and HALSITL::RCInput::read().
uint16_t HALSITL::SITL_State::pwm_output[SITL_NUM_CHANNELS] |
Definition at line 47 of file SITL_State.h.
Referenced by _output_to_flightgear(), and _simulator_servos().
|
private |
Definition at line 208 of file SITL_State.h.
Referenced by _fdm_input_local().
uint16_t HALSITL::SITL_State::sonar_pin_value |
Definition at line 65 of file SITL_State.h.
Referenced by _update_rangefinder(), and HALSITL::ADCSource::read_latest().
|
private |
Definition at line 188 of file SITL_State.h.
|
private |
Definition at line 199 of file SITL_State.h.
Referenced by _update_airspeed().
|
private |
Definition at line 191 of file SITL_State.h.
|
private |
Definition at line 203 of file SITL_State.h.
Referenced by _update_airspeed().
|
private |
Definition at line 218 of file SITL_State.h.
Referenced by _fdm_input_local(), and sim_fd().
uint16_t HALSITL::SITL_State::voltage2_pin_value |
Definition at line 70 of file SITL_State.h.
Referenced by _simulator_servos(), and HALSITL::ADCSource::read_latest().
uint16_t HALSITL::SITL_State::voltage_pin_value |
Definition at line 68 of file SITL_State.h.
Referenced by _simulator_servos(), and HALSITL::ADCSource::read_latest().
|
staticprivate |
Definition at line 181 of file SITL_State.h.
Referenced by _update_airspeed().
|
private |
Definition at line 205 of file SITL_State.h.
Referenced by _simulator_servos().