Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
nps_autopilot.h File Reference
#include "generated/airframe.h"
#include "nps_radio_control.h"
Include dependency graph for nps_autopilot.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  NpsAutopilot

Macros

#define NPS_COMMANDS_NB   ACTUATORS_NB
 Number of commands sent to the FDM of NPS.

Functions

void sim_overwrite_ahrs (void)
void sim_overwrite_ins (void)
void nps_autopilot_init (enum NpsRadioControlType type, int num_script, char *js_dev)
void nps_autopilot_run_step (double time)
void nps_autopilot_run_systime_step (void)

Variables

struct NpsAutopilot nps_autopilot
 #ifndef NPS_NO_MOTOR_MIXING #include "modules/actuators/motor_mixing.h"
bool nps_bypass_ahrs
bool nps_bypass_ins

Data Structure Documentation

◆ NpsAutopilot

struct NpsAutopilot

Definition at line 48 of file nps_autopilot.h.

Data Fields
double commands[NPS_COMMANDS_NB]
bool launch

Macro Definition Documentation

◆ NPS_COMMANDS_NB

#define NPS_COMMANDS_NB   ACTUATORS_NB

Number of commands sent to the FDM of NPS.

If MOTOR_MIXING_NB_MOTOR is defined (usually rotorcraft firmware) we have that many commands (one per motor), otherwise we default to the number of high level commands (COMMANDS_NB).

Definition at line 44 of file nps_autopilot.h.

Referenced by PaparazziSystem::FindModel(), gazebo_write(), init_gazebo(), init_gazebo(), init_jsbsim(), nps_ap_data_loop(), nps_autopilot_run_step(), nps_fdm_init(), nps_main_run_sim_step(), and PaparazziSystem::PreUpdate().

Function Documentation

◆ nps_autopilot_init()

void nps_autopilot_init ( enum NpsRadioControlType type,
int num_script,
char * js_dev )
extern

Definition at line 70 of file nps_autopilot_fixedwing.c.

References FALSE, main_ap_init(), nps_autopilot, NPS_BYPASS_AHRS, nps_bypass_ahrs, NPS_BYPASS_INS, nps_bypass_ins, nps_electrical_init(), nps_radio_control_init(), and TRUE.

Referenced by nps_radio_and_autopilot_init().

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

◆ nps_autopilot_run_step()

◆ nps_autopilot_run_systime_step()

void nps_autopilot_run_systime_step ( void )
extern

Definition at line 88 of file nps_autopilot_fixedwing.c.

References sys_tick_handler().

Referenced by nps_main_run_sim_step().

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

◆ sim_overwrite_ahrs()

void sim_overwrite_ahrs ( void )
extern

Definition at line 237 of file nps_autopilot_fixedwing.c.

References fdm, QUAT_COPY, RATES_COPY, STATE_INPUT_ATTITUDE, STATE_INPUT_RATES, stateSetBodyRates_f(), stateSetInputFilter(), and stateSetNedToBodyQuat_f().

Referenced by nps_autopilot_run_step().

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

◆ sim_overwrite_ins()

void sim_overwrite_ins ( void )
extern

Definition at line 250 of file nps_autopilot_fixedwing.c.

References fdm, LLA_COPY, state, stateCalcPositionEnu_i(), stateSetAccelNed_f(), stateSetPositionLla_f(), stateSetPositionNed_f(), stateSetSpeedNed_f(), and VECT3_COPY.

Referenced by ins_ekf2_update(), ins_ned_to_state(), ins_ned_to_state(), and nps_autopilot_run_step().

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

Variable Documentation

◆ nps_autopilot

struct NpsAutopilot nps_autopilot
extern

#ifndef NPS_NO_MOTOR_MIXING #include "modules/actuators/motor_mixing.h"

if NPS_COMMANDS_NB != MOTOR_MIXING_NB_MOTOR #warning "NPS_COMMANDS_NB does not match MOTOR_MIXING_NB_MOTOR!" #endif #endif

Definition at line 52 of file nps_autopilot_fixedwing.c.

Referenced by nps_ap_data_loop(), nps_autopilot_init(), nps_autopilot_init(), nps_autopilot_run_step(), nps_main_run_sim_step(), and nps_update_launch_from_dl().

◆ nps_bypass_ahrs

bool nps_bypass_ahrs
extern

◆ nps_bypass_ins