diff --git a/conf/airframes/examples/quadrotor_lisa_m_2_pwm.xml b/conf/airframes/examples/quadrotor_lisa_m_2_pwm.xml index 544acfcd12..85318f3940 100644 --- a/conf/airframes/examples/quadrotor_lisa_m_2_pwm.xml +++ b/conf/airframes/examples/quadrotor_lisa_m_2_pwm.xml @@ -5,15 +5,11 @@ - - - - - - - - - + + + + + @@ -42,13 +38,6 @@ - -
- - - -
-
@@ -186,12 +175,6 @@
-
- - - -
-
diff --git a/conf/airframes/examples/quadrotor_lisa_m_mkk.xml b/conf/airframes/examples/quadrotor_lisa_m_mkk.xml index bc019c9eef..dd779d1092 100644 --- a/conf/airframes/examples/quadrotor_lisa_m_mkk.xml +++ b/conf/airframes/examples/quadrotor_lisa_m_mkk.xml @@ -172,7 +172,7 @@
- +
diff --git a/conf/airframes/fraser_lisa_m_rotorcraft.xml b/conf/airframes/fraser_lisa_m_rotorcraft.xml index 2fb4a52ad4..b3f63b31b7 100644 --- a/conf/airframes/fraser_lisa_m_rotorcraft.xml +++ b/conf/airframes/fraser_lisa_m_rotorcraft.xml @@ -208,7 +208,7 @@
- +
diff --git a/conf/simulator/jsbsim/aircraft/Quad_LisaM.xml b/conf/simulator/jsbsim/aircraft/Quad_LisaM.xml new file mode 100644 index 0000000000..221cd780b1 --- /dev/null +++ b/conf/simulator/jsbsim/aircraft/Quad_LisaM.xml @@ -0,0 +1,396 @@ + + + + + + Gustavo Violato & Antoine Drouin + 24-02-2009 + Version 0.9 - beta + Simple Quadrotor without rotor dynamic + + + + 78.53 + 10 + 6.89 + 0 + 0 + 0 + 0 + + 0 + 0 + 0 + + + 0 + 0 + 0 + + + 0 + 0 + 0 + + + + + 0.005 + 0.005 + 0.010 + 0. + 0. + 0. + 0.84 + + 0 + 0 + 0 + + + + + + + -0.15 + 0 + -0.1 + + 0.8 + 0.5 + 500 + 100 + 1000 + 0.0 + NONE + 0 + + + + + 0.15 + 0 + -0.1 + + 0.8 + 0.5 + 500 + 100 + 1000 + 0.0 + NONE + 0 + + + + + 0. + 0.15 + -0.1 + + 0.8 + 0.5 + 500 + 100 + 1000 + 0.0 + NONE + 0 + + + + + 0. + -0.15 + -0.1 + + 0.8 + 0.5 + 500 + 100 + 1000 + 0.0 + NONE + 0 + + + + + + + + + + + + + fcs/front_motor + fcs/back_motor + fcs/right_motor + fcs/left_motor + + + + + + + fcs/front_motor + 0.84 + + + + -6.89 + 0 + 0 + + + 0 + 0 + -1 + + + + + + + fcs/back_motor + 0.84 + + + + 6.89 + 0 + 0 + + + 0 + 0 + -1 + + + + + + + fcs/right_motor + 0.84 + + + + 0 + 6.89 + 0 + + + 0 + 0 + -1 + + + + + + + fcs/left_motor + 0.84 + + + + 0 + -6.89 + 0 + + + 0 + 0 + -1 + + + + + + + + + + + fcs/front_motor + 0.84 + + + + -6.89 + + 1.9685 + 0 + + + 1 + 0 + 0 + + + + + + + fcs/front_motor + 0.84 + + + + -6.89 + -1.9685 + 0 + + + -1 + 0 + 0 + + + + + + + + + fcs/back_motor + 0.84 + + + + 6.89 + 1.9685 + 0 + + + 1 + 0 + 0 + + + + + + + fcs/back_motor + 0.84 + + + + 6.89 + -1.9685 + 0 + + + -1 + 0 + 0 + + + + + + + + + fcs/right_motor + 0.84 + + + + -1.9685 + 6.89 + 0 + + + 0 + 1 + 0 + + + + + + + fcs/right_motor + 0.84 + + + + 1.9685 + 6.89 + 0 + + + 0 + -1 + 0 + + + + + + + + + fcs/left_motor + 0.84 + + + + -1.9685 + -6.89 + 0 + + + 0 + 1 + 0 + + + + + + + fcs/left_motor + 0.84 + + + + 1.9685 + -6.89 + 0 + + + 0 + -1 + 0 + + + + + + + + + + + + + Drag + + aero/qbar-psf + 47.9 + 0.0151 + 0.224808943 + + + + + + diff --git a/conf/simulator/nps/nps_sensors_params_aspirin.h b/conf/simulator/nps/nps_sensors_params_aspirin_1.5.h similarity index 88% rename from conf/simulator/nps/nps_sensors_params_aspirin.h rename to conf/simulator/nps/nps_sensors_params_aspirin_1.5.h index 4b1d83ceb8..678a33833a 100644 --- a/conf/simulator/nps/nps_sensors_params_aspirin.h +++ b/conf/simulator/nps/nps_sensors_params_aspirin_1.5.h @@ -1,7 +1,5 @@ /* - * $Id$ - * - * Copyright (C) 2009 Antoine Drouin + * Copyright (C) 2012 Felix Ruess * * This file is part of paparazzi. * @@ -19,13 +17,13 @@ * along with paparazzi; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. - * */ #ifndef NPS_SENSORS_PARAMS_H #define NPS_SENSORS_PARAMS_H #include "generated/airframe.h" +#include "subsystems/imu.h" #if 1 #define NPS_BODY_TO_IMU_PHI IMU_BODY_TO_IMU_PHI @@ -104,17 +102,17 @@ #define NPS_MAG_MIN -2047 #define NPS_MAG_MAX 2047 -#define NPS_MAG_IMU_TO_SENSOR_PHI 0. -#define NPS_MAG_IMU_TO_SENSOR_THETA 0. -#define NPS_MAG_IMU_TO_SENSOR_PSI RadOfDeg(45.) +#define NPS_MAG_IMU_TO_SENSOR_PHI 0. +#define NPS_MAG_IMU_TO_SENSOR_THETA 0. +#define NPS_MAG_IMU_TO_SENSOR_PSI 0. -#define NPS_MAG_SENSITIVITY_XX MAG_BFP_OF_REAL(-1./4.94075530) -#define NPS_MAG_SENSITIVITY_YY MAG_BFP_OF_REAL( 1./5.10207664) -#define NPS_MAG_SENSITIVITY_ZZ MAG_BFP_OF_REAL(-1./4.90788848) +#define NPS_MAG_SENSITIVITY_XX IMU_MAG_X_SIGN * MAG_BFP_OF_REAL(1./IMU_MAG_X_SENS) +#define NPS_MAG_SENSITIVITY_YY IMU_MAG_Y_SIGN * MAG_BFP_OF_REAL(1./IMU_MAG_Y_SENS) +#define NPS_MAG_SENSITIVITY_ZZ IMU_MAG_Z_SIGN * MAG_BFP_OF_REAL(1./IMU_MAG_Z_SENS) -#define NPS_MAG_NEUTRAL_X 2358 -#define NPS_MAG_NEUTRAL_Y 2362 -#define NPS_MAG_NEUTRAL_Z 2119 +#define NPS_MAG_NEUTRAL_X IMU_MAG_X_NEUTRAL +#define NPS_MAG_NEUTRAL_Y IMU_MAG_Y_NEUTRAL +#define NPS_MAG_NEUTRAL_Z IMU_MAG_Z_NEUTRAL #define NPS_MAG_NOISE_STD_DEV_X 2e-3 #define NPS_MAG_NOISE_STD_DEV_Y 2e-3 diff --git a/sw/simulator/nps/nps_autopilot_rotorcraft.c b/sw/simulator/nps/nps_autopilot_rotorcraft.c index 240e50d75b..e1860d40ef 100644 --- a/sw/simulator/nps/nps_autopilot_rotorcraft.c +++ b/sw/simulator/nps/nps_autopilot_rotorcraft.c @@ -1,3 +1,24 @@ +/* + * Copyright (C) 2009 Antoine Drouin + * + * This file is part of paparazzi. + * + * paparazzi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * paparazzi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with paparazzi; see the file COPYING. If not, write to + * the Free Software Foundation, 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + #include "nps_autopilot_rotorcraft.h" #include "firmwares/rotorcraft/main.h" @@ -21,7 +42,6 @@ void nps_autopilot_init(enum NpsRadioControlType type_rc, int num_rc_script, cha nps_radio_control_init(type_rc, num_rc_script, rc_dev); nps_bypass_ahrs = TRUE; - // nps_bypass_ahrs = FALSE; main_init(); @@ -73,16 +93,22 @@ void nps_autopilot_run_step(double time __attribute__ ((unused))) { handle_periodic_tasks(); - if (time < 8) { /* start with a little bit of hovering */ + /* override the commands for the first 8 seconds... + * start with a little bit of hovering + */ + if (time < 8) { int32_t init_cmd[4]; - init_cmd[COMMAND_THRUST] = 0.253*SUPERVISION_MAX_MOTOR; + init_cmd[COMMAND_THRUST] = 0.253*MAX_PPRZ; init_cmd[COMMAND_ROLL] = 0; init_cmd[COMMAND_PITCH] = 0; init_cmd[COMMAND_YAW] = 0; supervision_run(TRUE, FALSE, init_cmd); } - for (uint8_t i=0; i + * + * This file is part of paparazzi. + * + * paparazzi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * paparazzi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with paparazzi; see the file COPYING. If not, write to + * the Free Software Foundation, 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + #ifndef NPS_FDM #define NPS_FDM diff --git a/sw/simulator/nps/nps_fdm_jsbsim.c b/sw/simulator/nps/nps_fdm_jsbsim.c index a2d27decd6..bcbc2192d0 100644 --- a/sw/simulator/nps/nps_fdm_jsbsim.c +++ b/sw/simulator/nps/nps_fdm_jsbsim.c @@ -1,3 +1,24 @@ +/* + * Copyright (C) 2009 Antoine Drouin + * + * This file is part of paparazzi. + * + * paparazzi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * paparazzi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with paparazzi; see the file COPYING. If not, write to + * the Free Software Foundation, 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + #include #include #include diff --git a/sw/simulator/nps/nps_radio_control.c b/sw/simulator/nps/nps_radio_control.c index 479392e1bb..45ad911757 100644 --- a/sw/simulator/nps/nps_radio_control.c +++ b/sw/simulator/nps/nps_radio_control.c @@ -1,3 +1,24 @@ +/* + * Copyright (C) 2009 Antoine Drouin + * + * This file is part of paparazzi. + * + * paparazzi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * paparazzi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with paparazzi; see the file COPYING. If not, write to + * the Free Software Foundation, 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + #include "nps_radio_control.h" #include "nps_radio_control_spektrum.h" diff --git a/sw/simulator/nps/nps_radio_control.h b/sw/simulator/nps/nps_radio_control.h index 0b1fbbd0c8..efde2b287b 100644 --- a/sw/simulator/nps/nps_radio_control.h +++ b/sw/simulator/nps/nps_radio_control.h @@ -1,3 +1,24 @@ +/* + * Copyright (C) 2009 Antoine Drouin + * + * This file is part of paparazzi. + * + * paparazzi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * paparazzi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with paparazzi; see the file COPYING. If not, write to + * the Free Software Foundation, 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + #ifndef NPS_RADIO_CONTROL_H #define NPS_RADIO_CONTROL_H