|
Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "nps_fdm.h"#include <stdlib.h>#include <stdio.h>#include <Python.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.
Macros | |
| #define | _WIDEN(x) |
| #define | WIDEN(x) |
| #define | NPS_PYTHON_EXEC "python3" |
| #define | NPS_PYBULLET_GUI TRUE |
| #define | NPS_PYBULLET_MODULE "simple_quad_sim" |
| #define | NPS_PYBULLET_URDF "robobee.urdf" |
Functions | |
| static void | py_check_status (PyConfig *config, PyStatus *status) |
| static void | py_check (bool exit_on_error, int line_nb) |
| static void | python_init (double dt) |
| static void | init_ltp (void) |
| static void | get_pos (PyObject *ppos) |
| static void | get_vel (PyObject *pvel) |
| static void | get_acc (PyObject *pacc) |
| static void | get_orient (PyObject *porient) |
| static void | get_ang_vel (PyObject *pang_vel) |
| static void | get_ang_acc (PyObject *pang_acc) |
| 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 |
| Holds all necessary NPS FDM state information. | |
| static struct LtpDef_d | ltpdef |
| struct DoubleQuat | quat_to_pprz |
| PyObject * | fdm_module = NULL |
| PyObject * | bullet_fdm = NULL |
| #define _WIDEN | ( | x | ) |
Definition at line 25 of file nps_fdm_pybullet.c.
| #define NPS_PYBULLET_GUI TRUE |
Definition at line 35 of file nps_fdm_pybullet.c.
Referenced by python_init().
| #define NPS_PYBULLET_MODULE "simple_quad_sim" |
Definition at line 45 of file nps_fdm_pybullet.c.
Referenced by python_init().
| #define NPS_PYBULLET_URDF "robobee.urdf" |
Definition at line 51 of file nps_fdm_pybullet.c.
Referenced by python_init().
| #define NPS_PYTHON_EXEC "python3" |
Definition at line 29 of file nps_fdm_pybullet.c.
Referenced by python_init().
| #define WIDEN | ( | x | ) |
|
static |
accel in ltppprz frame, wrt ECEF frame
acceleration in LTP frame, wrt ECEF frame
acceleration in ECEF frame, wrt ECEF frame
acceleration in body frame as measured by an accelerometer (incl. gravity)
acceleration in body frame, wrt ECEF frame
acceleration in body frame, wrt ECI inertial frame
Definition at line 193 of file nps_fdm_pybullet.c.
References double_quat_vmult(), ecef_of_enu_vect_d(), fdm, ltpdef, VECT3_COPY, and VECT3_NED_OF_ENU.
Referenced by nps_fdm_run_step().
|
static |
Definition at line 256 of file nps_fdm_pybullet.c.
References fdm, DoubleVect3::x, DoubleVect3::y, and DoubleVect3::z.
Referenced by nps_fdm_run_step().
|
static |
Definition at line 241 of file nps_fdm_pybullet.c.
References fdm, DoubleVect3::x, DoubleVect3::y, and DoubleVect3::z.
Referenced by nps_fdm_run_step().
|
static |
Definition at line 224 of file nps_fdm_pybullet.c.
References double_eulers_of_quat(), double_quat_comp(), EULERS_COPY, fdm, QUAT_COPY, and quat_to_pprz.
Referenced by nps_fdm_run_step().
|
static |
Definition at line 158 of file nps_fdm_pybullet.c.
References ecef_of_enu_point_d(), fdm, lla_of_ecef_d(), ltpdef, py_check(), VECT3_NED_OF_ENU, EnuCoor_d::x, EnuCoor_d::y, and EnuCoor_d::z.
Referenced by nps_fdm_run_step().
|
static |
velocity in LTP frame, wrt ECEF frame (NedCoor_d)
velocity in ECEF frame, wrt ECEF frame
velocity in body frame, wrt ECEF frame
velocity in ltppprz frame, wrt ECEF frame
Definition at line 174 of file nps_fdm_pybullet.c.
References ecef_of_enu_vect_d(), fdm, ltpdef, py_check(), VECT3_NED_OF_ENU, EnuCoor_d::x, EnuCoor_d::y, and EnuCoor_d::z.
Referenced by nps_fdm_run_step().
|
static |
Definition at line 277 of file nps_fdm_pybullet.c.
References LlaCoor_d::alt, ecef_of_lla_d(), fdm, LlaCoor_d::lat, LlaCoor_d::lon, ltp_def_from_ecef_d(), ltpdef, and PRINT_CONFIG_MSG().
Referenced by nps_fdm_init().
| void nps_fdm_init | ( | double | dt | ) |
NPS FDM rover init.
NPS FDM rover init.
| dt |
Definition at line 91 of file nps_fdm_pybullet.c.
References fdm, init_ltp(), PPRZ_ISA_SEA_LEVEL_PRESSURE, and TRUE.
| void nps_fdm_run_init_step | ( | void | ) |
Definition at line 110 of file nps_fdm_pybullet.c.
References fdm, nps_fdm_run_step(), and python_init().
| 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
Minimum complexity flight dynamic model In legacy Paparazzi simulator, was implemented in OCaml and correspond to the 'sim' target.
| launch | |
| act_commands | |
| commands_nb |
Definition at line 119 of file nps_fdm_pybullet.c.
References bullet_fdm, commands, get_acc(), get_ang_acc(), get_ang_vel(), get_orient(), get_pos(), get_vel(), and py_check().
Referenced by nps_fdm_run_init_step().
| void nps_fdm_set_temperature | ( | double | temp, |
| double | h ) |
Set temperature in degrees Celcius at given height h above MSL.
Definition at line 329 of file nps_fdm_pybullet.c.
References h().
| void nps_fdm_set_turbulence | ( | double | wind_speed, |
| int | turbulence_severity ) |
Definition at line 324 of file nps_fdm_pybullet.c.
| void nps_fdm_set_wind | ( | double | speed, |
| double | dir ) |
Definition at line 313 of file nps_fdm_pybullet.c.
References dir.
| void nps_fdm_set_wind_ned | ( | double | wind_north, |
| double | wind_east, | ||
| double | wind_down ) |
Definition at line 318 of file nps_fdm_pybullet.c.
|
static |
Definition at line 379 of file nps_fdm_pybullet.c.
Referenced by get_pos(), get_vel(), nps_fdm_run_step(), and python_init().
|
static |
Definition at line 369 of file nps_fdm_pybullet.c.
References status.
Referenced by python_init().
|
static |
Definition at line 334 of file nps_fdm_pybullet.c.
References bullet_fdm, fdm_module, NPS_PYBULLET_GUI, NPS_PYBULLET_MODULE, NPS_PYBULLET_URDF, NPS_PYTHON_EXEC, py_check(), py_check_status(), status, and WIDEN.
Referenced by nps_fdm_run_init_step().
| PyObject* bullet_fdm = NULL |
Definition at line 73 of file nps_fdm_pybullet.c.
Referenced by nps_fdm_run_step(), and python_init().
| struct NpsFdm fdm |
Holds all necessary NPS FDM state information.
Definition at line 57 of file nps_fdm_pybullet.c.
| PyObject* fdm_module = NULL |
Definition at line 72 of file nps_fdm_pybullet.c.
Referenced by python_init().
|
static |
Definition at line 60 of file nps_fdm_pybullet.c.
| struct DoubleQuat quat_to_pprz |
Definition at line 64 of file nps_fdm_pybullet.c.
Referenced by get_orient().