Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
nps_fdm_rover.c File Reference
#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 "generated/modules.h"
#include "state.h"
Include dependency graph for nps_fdm_rover.c:

Go to the source code of this file.

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
 Holds all necessary NPS FDM state information.
static struct LtpDef_d ltpdef
static struct NedCoor_d rover_pos
 Physical model structures.
static struct NedCoor_d rover_vel
static struct NedCoor_d rover_acc

Function Documentation

◆ init_ltp()

void init_ltp ( void )
static

Definition at line 230 of file nps_fdm_rover.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().

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

◆ nps_fdm_init()

void nps_fdm_init ( double dt)

NPS FDM rover init.

NPS FDM rover init.

Parameters
dt

Definition at line 110 of file nps_fdm_rover.c.

References EULERS_ASSIGN, fdm, init_first_order_low_pass(), init_ltp(), init_ltp(), PPRZ_ISA_SEA_LEVEL_PRESSURE, sim_state, TRUE, and VECT3_ASSIGN.

Referenced by nps_main_init().

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

◆ nps_fdm_run_init_step()

void nps_fdm_run_init_step ( void )

Definition at line 132 of file nps_fdm_rover.c.

Referenced by nps_main_loop().

Here is the caller graph for this function:

◆ nps_fdm_run_step()

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.

Parameters
launch
act_commands
commands_nb

Definition at line 137 of file nps_fdm_rover.c.

References alpha, AUTO_THROTTLE_NOMINAL_CRUISE_THROTTLE, COMMAND_PITCH, COMMAND_ROLL, commands, double_quat_of_eulers(), DRIVE_SHAFT_DISTANCE, ecef_of_enu_point_d(), ecef_of_enu_vect_d(), ecef_of_ned_point_d(), ecef_of_ned_vect_d(), fdm, FLOAT_VECT2_NORM, lla_of_ecef_d(), ltpdef, MAX_DELTA, MAX_PPRZ, MAXIMUM_AIRSPEED, MAXIMUM_POWER, ned_of_ecef_point_d(), ned_of_ecef_vect_d(), PITCH_RESPONSE_FACTOR, PPRZ_ISA_GRAVITY, ROLL_MAX_SETPOINT, ROLL_RATE_MAX_SETPOINT, ROLL_RESPONSE_FACTOR, rover_acc, rover_pos, rover_vel, sim_state, speed_sp, update_first_order_low_pass(), v2, WEIGHT, and YAW_RESPONSE_FACTOR.

Referenced by nps_main_run_sim_step().

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

◆ nps_fdm_set_temperature()

void nps_fdm_set_temperature ( double temp,
double h )

Set temperature in degrees Celcius at given height h above MSL.

Definition at line 282 of file nps_fdm_rover.c.

References h().

Here is the call graph for this function:

◆ nps_fdm_set_turbulence()

void nps_fdm_set_turbulence ( double wind_speed,
int turbulence_severity )

Definition at line 277 of file nps_fdm_rover.c.

Referenced by nps_atmosphere_update().

Here is the caller graph for this function:

◆ nps_fdm_set_wind()

void nps_fdm_set_wind ( double speed,
double dir )

Definition at line 266 of file nps_fdm_rover.c.

References dir, and sim_state.

◆ nps_fdm_set_wind_ned()

void nps_fdm_set_wind_ned ( double wind_north,
double wind_east,
double wind_down )

Definition at line 271 of file nps_fdm_rover.c.

References sim_state.

Referenced by nps_atmosphere_update().

Here is the caller graph for this function:

Variable Documentation

◆ fdm

◆ ltpdef

struct LtpDef_d ltpdef
static

Definition at line 98 of file nps_fdm_rover.c.

◆ rover_acc

struct NedCoor_d rover_acc
static

Definition at line 106 of file nps_fdm_rover.c.

Referenced by nps_fdm_run_step().

◆ rover_pos

struct NedCoor_d rover_pos
static

Physical model structures.

Definition at line 104 of file nps_fdm_rover.c.

Referenced by fill_bayesian_cell(), fill_free_cells(), and nps_fdm_run_step().

◆ rover_vel

struct NedCoor_d rover_vel
static

Definition at line 105 of file nps_fdm_rover.c.

Referenced by nps_fdm_run_step().