paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] Reply to: "Re: Strange gcs simulation problem #2 (


From: Felix Ruess
Subject: Re: [Paparazzi-devel] Reply to: "Re: Strange gcs simulation problem #2 (Felix Ruess)"
Date: Thu, 29 Sep 2011 16:34:34 +0200

Hi Chris,

you wrote that you use different configurations for sim and ap. You
didn't explicitly choose different ones in your airframe file though.
But the ahrs_float_dcm (was ahrs_dcm) uses infrared for simulation, so
it _should_ be fine.

Just to test, can you please explicitly set infrared for sim and imu
and ahrs only for ap and see if that works.
Something like

<firmware name="fixedwing">
  <target name="ap"             board="twog_1.0">
    <subsystem name="imu" type="ppzuav"/>
    <subsystem name="ahrs" type="dcm"/>
  </target>
  <target name="sim"             board="pc">
    <subsystem name="attitude" type="infrared"/>
  </target>
  ...
  .. defines and other subsystems...
</firmware>

Cheers, Felix

On Thu, Sep 29, 2011 at 1:54 PM, Chris <address@hidden> wrote:
> Hi Felix
> Here is the main setup:
>
> <!DOCTYPE airframe SYSTEM "airframe.dtd">
>
> <!--
>     THUNDER TIGER CESSNA 177 CARDINAL
>     Twog v1  board     (http://paparazzi.enac.fr/wiki/index.php/Tiny_v2)
>     PPZUAV IMU
>     XBee modem
> (http://paparazzi.enac.fr/wiki/index.php/Modems#Maxstream_XBee_Pro) in
> transparent mode.
>     Attopilot (SparkFun) curent sensor
> (http://paparazzi.enac.fr/wiki/Current_sensor)
>     PTZ camera
> (http://www.foxtechfpv.com/fh10z-10x-optical-zoom-rc-controlled-camworld-smallest-75g-p-166.htm)
> -->
>
> <airframe name="Cessna_Ppzuavimu.xml">
>
> <firmware name="fixedwing">
>
> <!-- ###################   I USE DIFFERENT CONFIGURATIONS FOR "ap" AND "sim"
> because PPZUAVIMU is not simulated yet ####### -->
> <target name="ap"             board="twog_1.0"/>
> <target name="sim"             board="pc"/>
>
> <define name="GPS_LED" value="2"/>
> <define name="AGR_CLIMB"/>
> <!-- <define name="LOITER_TRIM"/> --> <!-- without this everything works
> fine -->
> <define name="WIND_INFO"/>
> <define name="WIND_INFO_RET"/>
> <define name="STRONG_WIND"/>
> <define name="ALT_KALMAN"/>
> <define name="USE_GROUNDSPEED_CONTROL"/>
> <define name="USE_ADC_3"/>
> <define name="USE_I2C0"/>
> <!-- <define name="USE_MAGNETOMETER" />  -->
> <!--
> <configure name="PERIODIC_FREQUENCY" value="120"/>
> <configure name="AHRS_PROPAGATE_FREQUENCY" value="100"/>
> <configure name="AHRS_CORRECT_FREQUENCY" value="100"/>
> <define name="AHRS_TRIGGERED_ATTITUDE_LOOP" />
> -->
> <configure name="AHRS_ALIGNER_LED" value="3"/>
> <configure name="CPU_LED" value="3"/>
>
> <subsystem name="radio_control" type="ppm"/>
> <subsystem name="telemetry"     type="transparent"> <configure
> name="MODEM_BAUD" value="B9600"/> </subsystem>
> <subsystem name="control" />
> <subsystem name="gps"           type="ublox"> <configure name="GPS_BAUD"
> value="B38400"/> </subsystem>
> <subsystem name="i2c"/>
> <subsystem name="navigation" />
> <subsystem name="imu" type="ppzuav"/>
> <subsystem name="ahrs" type="dcm"/>
>
> </firmware>
>
> <firmware name="setup">
> <target name="tunnel"         board="twog_1.0" />
> <target name="setup_actuators"     board="twog_1.0" />
> </firmware>
>
> <modules>
> <!-- <load name="imu_ppzuav.xml" />  --> <!-- Only used for testing   -->
> <load name="my_cam.xml"/>
> <!-- <load name="parachute.xml"/>  -->
> <!-- <load name="maxsonar.xml"/>   -->
> </modules>
>
> <!-- commands section -->
> <servos>
> <servo name="AILERON"        no="0" min="2000"    neutral="1500"
> max="1000"/>
> <servo name="ELEVATOR"        no="1" min="2000"    neutral="1500"
> max="1000"/>
> <servo name="MOTOR"        no="2" min="1100"    neutral="1100"  max="2000"/>
> <servo name="RUDDER"        no="3" min="1000"    neutral="1500" max="2000"/>
> <servo name="PARACHUTE"        no="4" min="920"    neutral="920"
>  max="2000"/>
> <servo name="CAMERA_PAN"    no="6" min="943"    neutral="1520" max="2056"/>
> <servo name="CAMERA_TILT"    no="7" min="996"    neutral="1221" max="2004"/>
> <servo name="CAMERA_ZOOM"    no="8" min="950"    neutral="1500" max="2050"/>
> </servos>
>
> <commands>
> <axis name="ROLL"        failsafe_value="0"/>
> <axis name="PITCH"        failsafe_value="0"/>
> <axis name="THROTTLE"        failsafe_value="0"/>
> <axis name="YAW"        failsafe_value="0"/>
> <axis name="PARACHUTE"        failsafe_value="9600"/>
> <axis name="CAM_TILT"        failsafe_value="0"/>
> <axis name="CAM_PAN"        failsafe_value="0"/>
> <axis name="CAM_ZOOM"        failsafe_value="0"/>
> <axis name="CAM_LOCK"        failsafe_value="0"/>
> </commands>
>
> <rc_commands>
> <set command="ROLL"          value="@ROLL"/>
> <set command="PITCH"         value="@PITCH"/>
> <set command="THROTTLE"      value="@THROTTLE"/>
> <set command="YAW"        value="@YAW"/>
> <set command="PARACHUTE"          value="@PARACHUTE"/>
> </rc_commands>
>
> <section name="MIXER">
> <define name="COMBI_SWITCH" value="0.3"/>
> </section>
>
> <command_laws>
> <set servo="AILERON"        value="@ROLL"/>
> <set servo="ELEVATOR"        value="@PITCH"/>
> <set servo="MOTOR"        value="@THROTTLE"/>
> <set servo="RUDDER"        value="@YAW + @ROLL*COMBI_SWITCH"/>
> <set servo="PARACHUTE"        value="@PARACHUTE"/>
> <set servo="CAMERA_TILT"    value="@CAM_TILT"/>
> <set servo="CAMERA_PAN"        value="@CAM_PAN"/>
> <set servo="CAMERA_ZOOM"    value="@CAM_ZOOM"/>
> </command_laws>
>
> <!-- EMPTY "auto_rc_commands" block means NO RC RUDDER CONTROL IN AUTO2 AND
> AUTO1 -->
> <auto_rc_commands>
> <set command="YAW" value="@YAW"/>
> </auto_rc_commands>
>
>
> <!--
> <ap_only_commands>
> <copy command="CAM_PAN"/>
> <copy command="CAM_TILT"/>
> </ap_only_commands>
> -->
>
> <!-- Local magnetic field -->
> <section name="AHRS" prefix="AHRS_" >
> <define name="H_X" value="0.51562740288882" />
> <define name="H_Y" value="-0.05707735220832" />
> <define name="H_Z" value="0.85490967783446" />
> </section>
>
> <section name="IMU" prefix="IMU_">
> <!-- Calibration Neutral -->
> <define name="GYRO_P_NEUTRAL" value="0"/>
> <define name="GYRO_Q_NEUTRAL" value="0"/>
> <define name="GYRO_R_NEUTRAL" value="0"/>
>
> <!-- SENS = 14.375 LSB/(deg/sec) * 57.6 deg/rad = 828 LSB/rad/sec / 12bit
> FRAC: 4096 / 828 -->
> <define name="GYRO_P_SENS" value="4.947" integer="16"/>
> <define name="GYRO_Q_SENS" value="4.947" integer="16"/>
> <define name="GYRO_R_SENS" value="4.947" integer="16"/>
>
> <define name="GYRO_P_Q" value="0."/>
> <define name="GYRO_P_R" value="0"/>
> <define name="GYRO_Q_P" value="0."/>
> <define name="GYRO_Q_R" value="0."/>
> <define name="GYRO_R_P" value="0."/>
> <define name="GYRO_R_Q" value="0."/>
>
> <define name="GYRO_P_SIGN" value="1"/>
> <define name="GYRO_Q_SIGN" value="1"/>
> <define name="GYRO_R_SIGN" value="1"/>
>
> <define name="ACCEL_X_NEUTRAL" value="0"/>
> <define name="ACCEL_Y_NEUTRAL" value="0"/>
> <define name="ACCEL_Z_NEUTRAL" value="0"/>
>
> <!-- SENS = 256 LSB/g @ 2.5V [X&Y: 265 LSB/g @ 3.3V] / 9.81 ms2/g = 26.095
> LSB/ms2 / 10bit FRAC: 1024 / 26.095 for z and 1024 / 27.01 for X&Y -->
> <define name="ACCEL_X_SENS" value="37.9" integer="16"/>
> <define name="ACCEL_Y_SENS" value="37.9" integer="16"/>
> <define name="ACCEL_Z_SENS" value="39.24" integer="16"/>
>
> <define name="ACCEL_X_SIGN" value="1"/>
> <define name="ACCEL_Y_SIGN" value="1"/>
> <define name="ACCEL_Z_SIGN" value="1"/>
>
> <define name="MAG_X_NEUTRAL" value="0"/>
> <define name="MAG_Y_NEUTRAL" value="0"/>
> <define name="MAG_Z_NEUTRAL" value="0"/>
>
> <define name="MAG_X_SENS" value="1" integer="16"/>
> <define name="MAG_Y_SENS" value="1" integer="16"/>
> <define name="MAG_Z_SENS" value="1" integer="16"/>
>
> <define name="MAG_X_SIGN" value="1"/>
> <define name="MAG_Y_SIGN" value="1"/>
> <define name="MAG_Z_SIGN" value="1"/>
>
> <define name="BODY_TO_IMU_PHI" value="0"/>
> <define name="BODY_TO_IMU_THETA" value="0"/>
> <define name="BODY_TO_IMU_PSI" value="0"/>
> </section>
>
> <section name="INS" prefix="INS_">
> <define name="ROLL_NEUTRAL_DEFAULT" value="RadOfDeg(-4)" unit="radians"/>
> <define name="PITCH_NEUTRAL_DEFAULT" value="RadOfDeg(0)" unit="radians"/>
> </section>
>
> <section name="AUTO1" prefix="AUTO1_">
> <define name="MAX_ROLL" value="RadOfDeg(40)"/>
> <define name="MAX_PITCH" value="RadOfDeg(30)"/>
> </section>
>
>
> <section name="BAT">
> <!-- "MilliAmpereOfAdc(adc)" default is 88 but i have changed the sensor's
> resistors with 3 turn, 1,6 mm thick copper wire -->
> <!--
> <define name="ADC_CHANNEL_CURRENT"            value="ADC_3" />
> <define name="MilliAmpereOfAdc(adc)"            value="(90*adc)"/>
> -->
> <define name="MILLIAMP_AT_FULL_THROTTLE"        value="20000"/>
> <define name="BAT_CAPACITY"                value="8800."/>
> <define name="FUEL_RESERVE_SECONDS"            value="300" unit="s"/>
> <!--
> <define name="VOLTAGE_ADC_A" value="0.035449219"/>
> <define name="VOLTAGE_ADC_B" value="0.0"/>
> <define name="VoltageOfAdc(adc)" value ="(VOLTAGE_ADC_A * adc +
> VOLTAGE_ADC_B)"/>
> -->
>
> <define name="CATASTROPHIC_BAT_LEVEL"            value="10.0" unit="V"/>
> <define name="CRITIC_BAT_LEVEL"                value="10.5" unit="V"/>
> <define name="LOW_BAT_LEVEL"                value="11.0" unit="V"/>
> <define name="MAX_BAT_LEVEL"                value="12.0" unit="V"/>
> </section>
>
> .......................
> .................
> .........
> etc. etc. etc.
>
> _______________________________________________
> Paparazzi-devel mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]