34 #include "generated/airframe.h"
35 #include "generated/flight_plan.h"
41 #ifndef ROVER_FIRMWARE
42 #error "The module nps_fdm_rover is designed for rovers and doesn't support other firmwares!!"
60 static float mu = 0.01;
93 #ifdef COMMAND_STEERING
110 rover_acc.
x =
commands[COMMAND_THROTTLE] * cos(phi) - speed * (sin(phi) * phi_d + cos(phi) *
mu);
111 rover_acc.
y =
commands[COMMAND_THROTTLE] * sin(phi) + speed * (cos(phi) * phi_d - sin(phi) *
mu);
125 phi = (phi > M_PI)? - 2*M_PI + phi : (phi < -M_PI)? 2*M_PI + phi : phi;
128 #warning "The physics of this rover are not yet implemented in nps_fdm_rover!!"
170 llh_nav0.
lat = RadOfDeg((
double)NAV_LAT0 / 1e7);
171 llh_nav0.
lon = RadOfDeg((
double)NAV_LON0 / 1e7);
202 double dir __attribute__((unused)))
207 double wind_east __attribute__((unused)),
208 double wind_down __attribute__((unused)))
213 int turbulence_severity __attribute__((unused)))
218 double h __attribute__((unused)))
static void h(const real32_T x[7], const real32_T q[4], real32_T y[6])
pprz_t commands[COMMANDS_NB]
void double_quat_of_eulers(struct DoubleQuat *q, struct DoubleEulers *e)
#define FLOAT_VECT2_NORM(_v)
void ltp_def_from_ecef_d(struct LtpDef_d *def, struct EcefCoor_d *ecef)
void enu_of_ecef_point_d(struct EnuCoor_d *enu, struct LtpDef_d *def, struct EcefCoor_d *ecef)
void ecef_of_enu_vect_d(struct EcefCoor_d *ecef, struct LtpDef_d *def, struct EnuCoor_d *enu)
void enu_of_ecef_vect_d(struct EnuCoor_d *enu, struct LtpDef_d *def, struct EcefCoor_d *ecef)
void ned_of_ecef_vect_d(struct NedCoor_d *ned, struct LtpDef_d *def, struct EcefCoor_d *ecef)
void ned_of_ecef_point_d(struct NedCoor_d *ned, struct LtpDef_d *def, struct EcefCoor_d *ecef)
void ecef_of_lla_d(struct EcefCoor_d *ecef, struct LlaCoor_d *lla)
void ecef_of_enu_point_d(struct EcefCoor_d *ecef, struct LtpDef_d *def, struct EnuCoor_d *enu)
vector in EarthCenteredEarthFixed coordinates
vector in East North Up coordinates Units: meters
vector in Latitude, Longitude and Altitude
definition of the local (flat earth) coordinate system
#define PPRZ_ISA_SEA_LEVEL_PRESSURE
ISA sea level standard atmospheric pressure in Pascal.
PRINT_CONFIG_MSG("USE_INS_NAV_INIT defaulting to TRUE")
struct NedCoor_d ltpprz_ecef_vel
velocity in ltppprz frame, wrt ECEF frame
double pressure_sl
pressure at sea level in Pascal
double total_pressure
total atmospheric pressure in Pascal
struct EcefCoor_d ecef_pos
struct NedCoor_d ltpprz_pos
struct NedCoor_d ltpprz_ecef_accel
accel in ltppprz frame, wrt ECEF frame
double dynamic_pressure
dynamic pressure in Pascal
struct DoubleEulers ltp_to_body_eulers
struct EcefCoor_d ecef_ecef_accel
acceleration in ECEF frame, wrt ECEF frame
double pressure
current (static) atmospheric pressure in Pascal
struct DoubleQuat ltp_to_body_quat
struct DoubleRates body_ecef_rotvel
struct EcefCoor_d ecef_ecef_vel
velocity in ECEF frame, wrt ECEF frame
double temperature
current temperature in degrees Celcius
struct DoubleRates body_ecef_rotaccel
struct DoubleEulers ltpprz_to_body_eulers
void nps_fdm_set_wind_ned(double wind_north, double wind_east, double wind_down)
void nps_fdm_init(double dt)
NPS FDM rover init.
static void init_ltp(void)
static float mu
Physical model parameters.
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 c...
static struct EnuCoor_d rover_vel
static struct EnuCoor_d rover_pos
Physical model structures.
void nps_fdm_set_temperature(double temp, double h)
Set temperature in degrees Celcius at given height h above MSL.
static struct EnuCoor_d rover_acc
void nps_fdm_set_turbulence(double wind_speed, int turbulence_severity)
void nps_fdm_set_wind(double speed, double dir)
struct NpsFdm fdm
Holds all necessary NPS FDM state information.
static struct LtpDef_d ltpdef
Paparazzi generic algebra macros.
Paparazzi floating point algebra.
Paparazzi generic macros for geodetic calculations.
Paparazzi double-precision floating point math for geodetic calculations.
Paparazzi floating point math for geodetic calculations.
Paparazzi atmospheric pressure conversion utilities.
#define MAX_DELTA
Generated airframe.h from airframe.xml.
#define DRIVE_SHAFT_DISTANCE
API to get/set the generic vehicle states.