mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-06 16:58:48 +08:00
*** empty log message ***
This commit is contained in:
@@ -17,6 +17,8 @@ sim.CFLAGS += -DSITL
|
||||
sim.CFLAGS += `pkg-config glib-2.0 --cflags` -I /usr/include/meschach
|
||||
sim.LDFLAGS += `pkg-config glib-2.0 --libs` -lm -lmeschach -lpcre -lglibivy
|
||||
|
||||
sim.CFLAGS += -DBYPASS_AHRS
|
||||
|
||||
sim.CFLAGS += -I$(SRC_BOOZ) -I$(SRC_BOOZ_SIM) -I../simulator -DFLOAT_T=float
|
||||
|
||||
sim.srcs = $(SIMDIR)/booz2_sim_main.c \
|
||||
|
||||
@@ -50,6 +50,7 @@ double disp_time;
|
||||
|
||||
double booz_sim_actuators_values[] = {0., 0., 0., 0.};
|
||||
|
||||
static void sim_bypass_ahrs(void);
|
||||
static void sim_gps_feed_data(void);
|
||||
static void sim_mag_feed_data(void);
|
||||
|
||||
@@ -118,6 +119,9 @@ static gboolean booz2_sim_periodic(gpointer data __attribute__ ((unused))) {
|
||||
if (booz_sensors_model_gyro_available()) {
|
||||
booz2_imu_feed_data();
|
||||
booz2_main_event();
|
||||
#ifdef BYPASS_AHRS
|
||||
sim_bypass_ahrs();
|
||||
#endif /* BYPASS_AHRS */
|
||||
}
|
||||
|
||||
if (booz_sensors_model_gps_available()) {
|
||||
@@ -137,6 +141,19 @@ static gboolean booz2_sim_periodic(gpointer data __attribute__ ((unused))) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#include "booz_geometry_mixed.h"
|
||||
#include "booz2_filter_attitude.h"
|
||||
static void sim_bypass_ahrs(void) {
|
||||
booz2_filter_attitude_euler_aligned.phi = BOOZ_ANGLE_I_OF_F(bfm.state->ve[BFMS_PHI]);
|
||||
booz2_filter_attitude_euler_aligned.theta = BOOZ_ANGLE_I_OF_F(bfm.state->ve[BFMS_THETA]);
|
||||
booz2_filter_attitude_euler_aligned.psi = BOOZ_ANGLE_I_OF_F(bfm.state->ve[BFMS_PSI]);
|
||||
|
||||
booz2_filter_attitude_rate.x = BOOZ_RATE_I_OF_F(bfm.state->ve[BFMS_P]);
|
||||
booz2_filter_attitude_rate.y = BOOZ_RATE_I_OF_F(bfm.state->ve[BFMS_Q]);
|
||||
booz2_filter_attitude_rate.z = BOOZ_RATE_I_OF_F(bfm.state->ve[BFMS_R]);
|
||||
|
||||
}
|
||||
|
||||
#include "booz2_gps.h"
|
||||
static void sim_gps_feed_data(void) {
|
||||
booz2_gps_lat = bsm.gps_pos_lla.lat;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
else { \
|
||||
ppm_pulses[RADIO_YAW] = 1500 + 0. * (2050-950); \
|
||||
ppm_pulses[RADIO_THROTTLE] = 1223 + 0.99 * (2050-1223); \
|
||||
ppm_pulses[RADIO_MODE] = MODE_SWITCH_AUTO2; \
|
||||
ppm_pulses[RADIO_MODE] = MODE_SWITCH_AUTO1; \
|
||||
} \
|
||||
ppm_pulses[RADIO_PITCH] = 1500 + 0. * (2050-950); \
|
||||
ppm_pulses[RADIO_ROLL] = 1500 + 0. * (2050-950); \
|
||||
|
||||
Reference in New Issue
Block a user