|
Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "nps_fdm.h"#include <stdlib.h>#include <stdio.h>#include "std.h"#include "math/pprz_geodetic.h"#include "math/pprz_geodetic_double.h"#include "math/pprz_geodetic_float.h"#include "math/pprz_algebra.h"#include "math/pprz_algebra_float.h"#include "math/pprz_isa.h"#include "generated/airframe.h"#include "generated/flight_plan.h"#include "state.h"Go to the source code of this file.
Data Structures | |
| struct | fixedwing_sim_state |
Macros | |
| #define | ROLL_RESPONSE_FACTOR 15. |
| #define | PITCH_RESPONSE_FACTOR 1. |
| #define | YAW_RESPONSE_FACTOR 1. |
| #define | WEIGHT 1. |
| #define | ROLL_MAX_SETPOINT RadOfDeg(40.) |
| #define | ROLL_RATE_MAX_SETPOINT RadOfDeg(15.) |
| #define | MAXIMUM_AIRSPEED (NOMINAL_AIRSPEED * 1.5) |
| #define | MAXIMUM_POWER (5. * MAXIMUM_AIRSPEED * WEIGHT) |
| #define | AUTO_THROTTLE_NOMINAL_CRUISE_THROTTLE 0.45 |
Functions | |
| static void | init_ltp (void) |
| void | nps_fdm_init (double dt) |
| NPS FDM rover init. | |
| void | nps_fdm_run_init_step (void) |
| void | nps_fdm_run_step (bool launch, double *commands, int commands_nb) |
| Minimum complexity flight dynamic model In legacy Paparazzi simulator, was implemented in OCaml and correspond to the 'sim' target. | |
| void | nps_fdm_set_wind (double speed, double dir) |
| void | nps_fdm_set_wind_ned (double wind_north, double wind_east, double wind_down) |
| void | nps_fdm_set_turbulence (double wind_speed, int turbulence_severity) |
| void | nps_fdm_set_temperature (double temp, double h) |
| Set temperature in degrees Celcius at given height h above MSL. | |
Variables | |
| struct NpsFdm | fdm |
| static struct LtpDef_d | ltpdef |
| static struct fixedwing_sim_state | sim_state |
| struct fixedwing_sim_state |
Definition at line 93 of file nps_fdm_fixedwing_sim.c.
| Data Fields | ||
|---|---|---|
| double | airspeed | |
| struct DoubleEulers | attitude | |
| double | delta_pitch | |
| double | delta_roll | |
| double | delta_thrust | |
| struct EnuCoor_d | pos | |
| struct DoubleEulers | rates | |
| struct EnuCoor_d | speed | |
| struct EnuCoor_d | wind | |
| #define AUTO_THROTTLE_NOMINAL_CRUISE_THROTTLE 0.45 |
Definition at line 81 of file nps_fdm_fixedwing_sim.c.
Referenced by nps_fdm_run_step().
| #define MAXIMUM_AIRSPEED (NOMINAL_AIRSPEED * 1.5) |
Definition at line 73 of file nps_fdm_fixedwing_sim.c.
Referenced by nps_fdm_run_step().
| #define MAXIMUM_POWER (5. * MAXIMUM_AIRSPEED * WEIGHT) |
Definition at line 77 of file nps_fdm_fixedwing_sim.c.
Referenced by nps_fdm_run_step().
| #define PITCH_RESPONSE_FACTOR 1. |
Definition at line 49 of file nps_fdm_fixedwing_sim.c.
Referenced by nps_fdm_run_step().
| #define ROLL_MAX_SETPOINT RadOfDeg(40.) |
Definition at line 61 of file nps_fdm_fixedwing_sim.c.
Referenced by nps_fdm_run_step().
| #define ROLL_RATE_MAX_SETPOINT RadOfDeg(15.) |
Definition at line 65 of file nps_fdm_fixedwing_sim.c.
Referenced by nps_fdm_run_step().
| #define ROLL_RESPONSE_FACTOR 15. |
Definition at line 45 of file nps_fdm_fixedwing_sim.c.
Referenced by nps_fdm_run_step().
| #define WEIGHT 1. |
Definition at line 57 of file nps_fdm_fixedwing_sim.c.
Referenced by nps_fdm_run_step().
| #define YAW_RESPONSE_FACTOR 1. |
Definition at line 53 of file nps_fdm_fixedwing_sim.c.
Referenced by nps_fdm_run_step().
|
static |
Definition at line 264 of file nps_fdm_fixedwing_sim.c.
References LlaCoor_d::alt, ecef_of_lla_d(), fdm, LlaCoor_d::lat, LlaCoor_d::lon, ltp_def_from_ecef_d(), and ltpdef.
Referenced by nps_fdm_init().
| void nps_fdm_init | ( | double | dt | ) |
NPS FDM rover init.
Definition at line 109 of file nps_fdm_fixedwing_sim.c.
| void nps_fdm_run_init_step | ( | void | ) |
Definition at line 142 of file nps_fdm_fixedwing_sim.c.
| void nps_fdm_run_step | ( | bool | launch, |
| double * | commands, | ||
| int | commands_nb ) |
Minimum complexity flight dynamic model In legacy Paparazzi simulator, was implemented in OCaml and correspond to the 'sim' target.
Johnson, E.N., Fontaine, S.G., and Kahn, A.D., “Minimum Complexity Uninhabited Air Vehicle Guidance And Flight Control System,” Proceedings of the 20th Digital Avionics Systems Conference, 2001. http://www.ae.gatech.edu/~ejohnson/JohnsonFontaineKahn.pdf
Johnson, E.N. and Fontaine, S.G., “Use Of Flight Simulation To Complement Flight Testing Of Low-Cost UAVs,” Proceedings of the AIAA Modeling and Simulation Technology Conference, 2001. http://www.ae.gatech.edu/~ejohnson/AIAA%202001-4059.pdf
Definition at line 161 of file nps_fdm_fixedwing_sim.c.
| void nps_fdm_set_temperature | ( | double | temp, |
| double | h ) |
Set temperature in degrees Celcius at given height h above MSL.
Definition at line 311 of file nps_fdm_fixedwing_sim.c.
| void nps_fdm_set_turbulence | ( | double | wind_speed, |
| int | turbulence_severity ) |
Definition at line 306 of file nps_fdm_fixedwing_sim.c.
| void nps_fdm_set_wind | ( | double | speed, |
| double | dir ) |
Definition at line 292 of file nps_fdm_fixedwing_sim.c.
| void nps_fdm_set_wind_ned | ( | double | wind_north, |
| double | wind_east, | ||
| double | wind_down ) |
Definition at line 299 of file nps_fdm_fixedwing_sim.c.
| struct NpsFdm fdm |
Definition at line 85 of file nps_fdm_fixedwing_sim.c.
|
static |
Definition at line 88 of file nps_fdm_fixedwing_sim.c.
Referenced by fetch_state(), get_acc(), get_pos(), get_vel(), init_ltp(), init_ltp(), init_ltp(), init_ltp(), and nps_fdm_run_step().
|
static |
Definition at line 105 of file nps_fdm_fixedwing_sim.c.
Referenced by nps_fdm_init(), nps_fdm_run_step(), nps_fdm_set_wind(), and nps_fdm_set_wind_ned().