32 #define NPS_QNH 101325.0
35 #ifndef NPS_WIND_SPEED
36 #define NPS_WIND_SPEED 0.0
40 #define NPS_WIND_DIR 0
43 #ifndef NPS_TURBULENCE_SEVERITY
44 #define NPS_TURBULENCE_SEVERITY 0
47 #ifndef NPS_WORLD_ENV_UPDATE
48 #define NPS_WORLD_ENV_UPDATE 1.0
74 while (dir < 0.0) { dir += 2 * M_PI; }
75 while (dir >= 2 * M_PI) { dir -= 2 * M_PI; }
91 double dir = atan2(-wind_east, -wind_north);
93 while (dir < 0.0) { dir += 2 * M_PI; }
94 while (dir >= 2 * M_PI) { dir -= 2 * M_PI; }
100 static double req_time = 0.;
void nps_atmosphere_set_wind_ned(double wind_north, double wind_east, double wind_down)
void nps_atmosphere_set_wind_dir(double dir)
double last_world_env_req
last world env request time
int turbulence_severity
turbulence severity from 0-7
#define NPS_TURBULENCE_SEVERITY
#define FLOAT_VECT3_ZERO(_v)
#define FLOAT_VECT2_NORM(_v)
struct NpsAtmosphere nps_atmosphere
double wind_speed
horizontal wind magnitude in m/s
void nps_atmosphere_set_wind_speed(double speed)
void nps_fdm_set_turbulence(double wind_speed, int turbulence_severity)
#define NPS_WORLD_ENV_UPDATE
void nps_ivy_send_WORLD_ENV_REQ(void)
void nps_atmosphere_update(double dt)
double qnh
barometric pressure at sea level in Pascal
double wind_dir
horitzontal wind direction in radians north=0, increasing CCW
void nps_fdm_set_wind_ned(double wind_north, double wind_east, double wind_down)
void nps_atmosphere_init(void)
Atmosphere model (pressure, wind) for NPS.
struct DoubleVect3 wind
wind speed in NED in m/s