Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
main_ap.c File Reference

Autopilot main loop. More...

#include "main_ap.h"
#include "generated/airframe.h"
#include "generated/modules.h"
#include "modules/core/abi.h"
+ Include dependency graph for main_ap.c:

Go to the source code of this file.

Macros

#define MODULES_C
 
#define ABI_C
 
#define SYS_PERIOD   (1.f / PERIODIC_FREQUENCY)
 
#define SENSORS_PERIOD   (1.f / PERIODIC_FREQUENCY)
 
#define DATALINK_PERIOD   (1.f / TELEMETRY_FREQUENCY)
 

Functions

void main_ap_init (void)
 
void main_ap_periodic (void)
 
void main_ap_event (void)
 

Variables

tid_t modules_mcu_core_tid
 IDs for timers. More...
 
tid_t modules_sensors_tid
 
tid_t modules_radio_control_tid
 
tid_t modules_gnc_tid
 
tid_t modules_datalink_tid
 

Detailed Description

Autopilot main loop.

This process is reponsible for the collecting the different sensors data, calling the appropriate estimation algorithms and running the different control loops.

Definition in file main_ap.c.

Macro Definition Documentation

◆ ABI_C

#define ABI_C

Definition at line 33 of file main_ap.c.

◆ DATALINK_PERIOD

#define DATALINK_PERIOD   (1.f / TELEMETRY_FREQUENCY)

Definition at line 77 of file main_ap.c.

◆ MODULES_C

#define MODULES_C

Definition at line 31 of file main_ap.c.

◆ SENSORS_PERIOD

#define SENSORS_PERIOD   (1.f / PERIODIC_FREQUENCY)

Definition at line 76 of file main_ap.c.

◆ SYS_PERIOD

#define SYS_PERIOD   (1.f / PERIODIC_FREQUENCY)

Definition at line 75 of file main_ap.c.

Function Documentation

◆ main_ap_event()

void main_ap_event ( void  )

Definition at line 146 of file main_ap.c.

Referenced by nps_autopilot_run_step().

+ Here is the caller graph for this function:

◆ main_ap_init()

void main_ap_init ( void  )

Definition at line 79 of file main_ap.c.

References autopilot_failsafe_checks(), DATALINK_PERIOD, modules_datalink_tid, modules_gnc_tid, modules_mcu_core_tid, modules_radio_control_tid, modules_sensors_tid, SENSORS_PERIOD, SYS_PERIOD, sys_time_register_timer(), and sys_time_register_timer_offset().

Referenced by nps_autopilot_init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ main_ap_periodic()

void main_ap_periodic ( void  )

Definition at line 119 of file main_ap.c.

References modules_datalink_tid, modules_gnc_tid, modules_mcu_core_tid, modules_radio_control_tid, modules_sensors_tid, and sys_time_check_and_ack_timer().

Referenced by nps_autopilot_run_step().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ modules_datalink_tid

tid_t modules_datalink_tid

Definition at line 73 of file main_ap.c.

Referenced by main_ap_init(), and main_ap_periodic().

◆ modules_gnc_tid

tid_t modules_gnc_tid

Definition at line 72 of file main_ap.c.

Referenced by main_ap_init(), and main_ap_periodic().

◆ modules_mcu_core_tid

tid_t modules_mcu_core_tid

IDs for timers.

Definition at line 69 of file main_ap.c.

Referenced by main_ap_init(), and main_ap_periodic().

◆ modules_radio_control_tid

tid_t modules_radio_control_tid

Definition at line 71 of file main_ap.c.

Referenced by main_ap_init(), and main_ap_periodic().

◆ modules_sensors_tid

tid_t modules_sensors_tid

Definition at line 70 of file main_ap.c.

Referenced by main_ap_init(), and main_ap_periodic().