Paparazzi UAS
v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
|
AP ( AutoPilot ) process API. More...
Go to the source code of this file.
Functions | |
void | init_ap (void) |
void | handle_periodic_tasks_ap (void) |
void | event_task_ap (void) |
void | sensors_task (void) |
Run at PERIODIC_FREQUENCY (60Hz if not defined) More... | |
void | navigation_task (void) |
Compute desired_course. More... | |
void | monitor_task (void) |
monitor stuff run at 1Hz More... | |
void | reporting_task (void) |
Send a series of initialisation messages followed by a stream of periodic ones. More... | |
void | attitude_loop (void) |
AP ( AutoPilot ) process API.
Definition in file main_ap.h.
void attitude_loop | ( | void | ) |
Definition at line 564 of file main_ap.c.
References ap_state, autopilot_flight_time, h_ctl_aileron_setpoint, h_ctl_attitude_loop(), h_ctl_elevator_setpoint, h_ctl_pitch_setpoint, inter_mcu_received_ap, kill_throttle, launch, link_mcu_send(), MAX_PPRZ, nav_pitch, nav_throttle_setpoint, pprz_mode, PPRZ_MODE_AUTO2, TRIM_PPRZ, TRIM_UPPRZ, TRUE, v_ctl_climb_loop(), v_ctl_mode, V_CTL_MODE_AUTO_CLIMB, V_CTL_MODE_AUTO_THROTTLE, v_ctl_pitch_setpoint, v_ctl_throttle_setpoint, v_ctl_throttle_slew(), v_ctl_throttle_slewed, and vsupply.
Referenced by event_task_ap(), handle_periodic_tasks_ap(), and sim_periodic_task().
void event_task_ap | ( | void | ) |
Definition at line 691 of file main_ap.c.
References attitude_loop(), BaroEvent, DatalinkEvent, FALSE, GpsEvent, ImuEvent, InsEvent, inter_mcu_received_fbw, link_mcu_event_task(), mcu_event(), and telecommand_task().
Referenced by sim_periodic_task().
void handle_periodic_tasks_ap | ( | void | ) |
Definition at line 278 of file main_ap.c.
References attitude_loop(), baro_periodic(), LED_PERIODIC, monitor_task(), navigation_task(), reporting_task(), sensors_task(), and sys_time_check_and_ack_timer().
void init_ap | ( | void | ) |
init done in main_fbw in single MCU
Definition at line 175 of file main_ap.c.
References ABI_BROADCAST, ahrs_aligner_init(), ahrs_init(), ap_state, audio_telemetry_init(), autopilot_init(), baro_init(), BARO_PERIODIC_FREQUENCY, Imu::body_to_imu, COMMAND_PITCH_TRIM, COMMAND_ROLL_TRIM, COMMAND_YAW_TRIM, CONTROL_FREQUENCY, downlink_init(), gps_init(), h_ctl_init(), imu, imu_init(), ins_init(), IO0DIR, IO0SET, link_mcu_init(), mcu_int_enable, nav_init(), NAVIGATION_FREQUENCY, orientationGetQuat_f(), PERIODIC_FREQUENCY, settings_init(), stateInit(), sys_time_register_timer(), TELEMETRY_FREQUENCY, traffic_info_init(), and v_ctl_init().
Referenced by sim_init().
void monitor_task | ( | void | ) |
monitor stuff run at 1Hz
Definition at line 659 of file main_ap.c.
References autopilot_flight_time, CATASTROPHIC_BAT_KILL_DELAY, datalink_time, DefaultChannel, DefaultDevice, dist2_to_home, KILL_MODE_DISTANCE, kill_throttle, launch, MIN_SPEED_FOR_TAKEOFF, sys_time::nb_sec, Square, stateGetHorizontalSpeedNorm_f(), TRUE, and vsupply.
Referenced by handle_periodic_tasks_ap(), and sim_monitor_task().
void navigation_task | ( | void | ) |
Compute desired_course.
Definition at line 500 of file main_ap.c.
References autopilot_send_mode(), CallTCAS, common_nav_periodic_task_4Hz(), DefaultChannel, DefaultDevice, FALSE, gps_lost, h_ctl_auto1_rate, h_ctl_course_loop(), lateral_mode, LATERAL_MODE_COURSE, launch, nav_home(), nav_periodic_task(), nav_without_gps(), pprz_mode, PPRZ_MODE_AUTO2, PPRZ_MODE_GPS_OUT_OF_ORDER, PPRZ_MODE_HOME, TRUE, v_ctl_altitude_loop(), v_ctl_mode, and V_CTL_MODE_AUTO_ALT.
Referenced by handle_periodic_tasks_ap(), and sim_nav_task().
void reporting_task | ( | void | ) |
Send a series of initialisation messages followed by a stream of periodic ones.
Called at 60Hz.
Definition at line 472 of file main_ap.c.
References DefaultChannel, DefaultDevice, DefaultPeriodic, FALSE, send_autopilot_version(), and TRUE.
Referenced by handle_periodic_tasks_ap(), and sim_periodic_task().
void sensors_task | ( | void | ) |
Run at PERIODIC_FREQUENCY (60Hz if not defined)
Definition at line 617 of file main_ap.c.
References gps_periodic_check(), imu_periodic(), and update_ahrs_from_sim().
Referenced by handle_periodic_tasks_ap(), and sim_periodic_task().