[Top][All Lists]

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

Re: [Paparazzi-devel] Finish setting up Lisa/L

From: Jochen Rieger
Subject: Re: [Paparazzi-devel] Finish setting up Lisa/L
Date: Wed, 14 Mar 2012 11:10:02 +0100

Hi Felix, thank you for your answer.

On the carrier board for the Aspirin IMU is written "Quadrotor IMU v2.0". Its the Version of Aspirin? I bought them at JobyRobotics.
Currently it doesn t exist software compatibly with v2.0 or?
When i set type to v2.0, error while compiling, therefor i tried aspirin_v1.5.

Moreover, i dont get an datasheet from JobyRobotics for the Aspirin.
When i using the dev branch, for gyro values, it is not so much tested before? It is not a critical risk for the first fly, when i using the dev branch? Whats the main difference, between master and dev?

Thank you very much.

Best regards.

2012/3/13 Felix Ruess <address@hidden>
Hi Jochen,

you already have an aspirin2? In your airframe file you specified the the aspirin_v1.5..

Regarding the gyro calibration, you can use the default values from the datasheet.
If you are on the dev branch, you can just omit the gyro calibration in your airframe file and it will use the default datasheet values.

Cheers, Felix

On Thu, Mar 8, 2012 at 11:22 AM, Jochen Rieger <address@hidden> wrote:
Hello community, the weather is fine here and in the next time i want to fly my maiden fixedwing with the Lisa/L.
After hours of reading the wiki and forum, i have last few questions about my airframe file and configuration.
I hope i find an answer for the questions, because they are significant to fly the wing first time, especially in AUTO1/2.

My hardware:

-Lisa/L 1.1
-Aspirin 2.0
-Xbee 2.4 GHz
-Futaba T6J
-PPM Encoder
-Airframe Maja

I tried to calibrate the IMU, acceleration script works fine. I have copied the values in the airframe file. Are they realistic and useable?
But i dont no how i calibrate the gyro and magnetometer. I have read that the magnetometer is currently not useable with ahrs_DCM,
because ferromagnetic issues. And for gyro, i need really an turntable? Is there perhaps another way to calibrate it?

Airspeed measurement and using for controlling is not implemented at the moment for the Lisa/L, with onboard baros, i that true?

I have attached my airframe file, can please anyone read it, to confirm it? It based on the airframe file ppzuav/fixedwing/ppzimu_tiny

I didn t fly a autopilot in the past. That is why i am a little unsure with setting up.

Thank you very much for each help.

Best Regards.


!DOCTYPE airframe SYSTEM "../../airframe.dtd">

    Lisa/L 1.1 + Aspirin 2.0 + 2.4GHz 38400bps +
    MediaTek_Diy GPS 38400bps

<airframe name="Maja">



<!--<load name="airspeed_adc.xml">
     <define name="AIRSPEED_SCALE" value="1.8"/>
     <define name="AIRSPEED_BIAS"  value="0"/>
     <define name="AIRSPEED_ADC_I2C_DEV" value="i2c2"/>
    </load> -->

    <load name="baro_board.xml"/>

<firmware name="fixedwing">

    <target name="ap" board="lisa_l_1.1">

      <define name="STRONG_WIND"/>
      <define name="WIND_INFO"/>
      <define name="WIND_INFO_RET"/>
      <define name="USE_I2C2"/>

<!--<define name="MEASURE_AIRSPEED"/>
      <define name="USE_AIRSPEED"/>
      <define name="SENSOR_SYNC_SEND"/>-->

      <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"/>


    <target name="sim" board="pc"/>

    <define name="AGR_CLIMB"/>
    <define name="LOITER_TRIM"/>
    <define name="ALT_KALMAN"/>

    <subsystem name="control"/>
    <subsystem name="navigation"/>

    <subsystem name="imu" type="aspirin_v1.5"/>

    <subsystem name="ahrs" type="float_dcm"/>

<!--<define name="USE_MAGNETOMETER" />

    </subsystem> -->


    <subsystem name="radio_control" type="ppm"/>


    <subsystem name="telemetry"           type="transparent">
      <configure name="MODEM_PORT"          value="UART3" />
      <configure name="MODEM_BAUD"          value="B38400" />


    <subsystem name="gps"         type="mediatek_diy">
      <configure name="GPS_PORT"          value="UART2"/>
      <configure name="GPS_BAUD"          value="B38400"/>



    <servo name="THROTTLE"      no="2" min="1200" neutral="1200" max="1900"/>
    <servo name="AILERON_LEFT"  no="0" min="1930" neutral="1500" max="1110"/>
    <servo name="AILERON_RIGHT" no="5" min="1930" neutral="1525" max="1110"/>
    <servo name="ELEVATOR"      no="1" min="1930" neutral="1527" max="1110"/>
    <servo name="RUDDER"        no="3" min="1100" neutral="1593" max="1930"/>

    <axis name="THROTTLE" failsafe_value="0"/>
    <axis name="ROLL" failsafe_value="0"/>
    <axis name="PITCH" failsafe_value="0"/>
    <axis name="YAW"      failsafe_value="0"/>

    <set command="THROTTLE" value="@THROTTLE"/>
    <set command="ROLL"  value="@ROLL"/>
    <set command="PITCH" value="@PITCH"/>
    <set command="YAW"   value="@YAW"/>

<!--<section name="MIXER">
     <define name="AILERON_YAW_MIX" value="0.5"/>
  </section> NO MIX at the moment  -->

    <set servo="AILERON_LEFT" value="@ROLL"/>
    <set servo="AILERON_RIGHT" value="@ROLL"/>
    <set servo="THROTTLE" value="@THROTTLE"/>
    <set servo="ELEVATOR" value="@PITCH"/>
    <set servo="RUDDER" value="@YAW"/>

 <section name="AUTO1" prefix="AUTO1_">
    <define name="MAX_ROLL" value="0.85"/>
    <define name="MAX_PITCH" value="0.6"/>

    <set command="YAW" value="@YAW"/>

  <!--*************Local magnetic field*****in******Stuttgart/Germany*******************-->

  <section name="AHRS" prefix="AHRS_" >
    <define name="H_X" value="0.4289796" />
    <define name="H_Y" value="0.0127580" />
    <define name="H_Z" value="0.9032241" />
  <!--*************IMU calibration***********************************************-->

  <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="4"/>
    <define name="ACCEL_Y_NEUTRAL" value="8"/>
    <define name="ACCEL_Z_NEUTRAL" value="-28"/>
<!--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="47.4921849975" integer="16"/>
    <define name="ACCEL_Y_SENS" value="38.0678723599" integer="16"/>
    <define name="ACCEL_Z_SENS" value="38.8382723049" 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"/>

    <!--*************IMU orientation***********************************************-->

    <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 name="INS" prefix="INS_">
    <define name="ROLL_NEUTRAL_DEFAULT" value="0" unit="deg"/>
    <define name="PITCH_NEUTRAL_DEFAULT" value="0" unit="deg"/>

  <section name="AUTO1" prefix="AUTO1_">
    <define name="MAX_ROLL" value="0.7"/>
    <define name="MAX_PITCH" value="0.7"/>
  <!--*************Batterie warnings***********************************************-->

  <section name="BAT">
<!--<define name="MilliAmpereOfAdc(adc)" value="((adc) - 505) * 124.0f"/>-->
    <define name="MILLIAMP_AT_FULL_THROTTLE" value="12000" unit="mA" />
    <define name="LOW_BAT_LEVEL" value="10.5" unit="V"/>
    <define name="CRITIC_BAT_LEVEL" value="10" unit="V"/>
    <define name="CATASTROPHIC_BAT_LEVEL" value="9.1" unit="V"/>

  <section name="MISC">
    <define name="NOMINAL_AIRSPEED" value="12." unit="m/s"/>
    <define name="CARROT" value="5." unit="s"/>
    <define name="CONTROL_RATE" value="60" unit="Hz"/>
    <define name="XBEE_INIT" value="&quot;ATPL2\rATRN5\rATTT80\r&quot;"/>
<!--<define name="NO_XBEE_API_INIT" value="TRUE"/> -->
    <define name="ALT_KALMAN_ENABLED" value="TRUE"/>

    <define name="DEFAULT_CIRCLE_RADIUS" value="80."/>
    <define name="MIN_CIRCLE_RADIUS" value="50."/>

    <define name="GLIDE_AIRSPEED" value="10"/>
    <define name="GLIDE_VSPEED" value="3."/>
    <define name="GLIDE_PITCH" value="45" unit="deg"/>

  <section name="VERTICAL CONTROL" prefix="V_CTL_">
    <define name="POWER_CTL_BAT_NOMINAL" value="11.1" unit="volt"/>

    <!-- outer loop proportional gain -->
    <define name="ALTITUDE_PGAIN" value="-0.04"/>

    <!-- outer loop saturation -->
    <define name="ALTITUDE_MAX_CLIMB" value="2."/>

    <!-- auto throttle inner loop -->
    <define name="AUTO_THROTTLE_NOMINAL_CRUISE_THROTTLE" value="0.35"/>
    <define name="AUTO_THROTTLE_MIN_CRUISE_THROTTLE" value="0.25"/>
    <define name="AUTO_THROTTLE_MAX_CRUISE_THROTTLE" value="0.80"/>
    <define name="AUTO_THROTTLE_LOITER_TRIM" value="1500"/>
    <define name="AUTO_THROTTLE_DASH_TRIM" value="-1000"/>
    <define name="AUTO_THROTTLE_CLIMB_THROTTLE_INCREMENT" value="0.1" unit="%/(m/s)"/>
    <define name="AUTO_THROTTLE_PGAIN" value="-0.02"/>
    <define name="AUTO_THROTTLE_IGAIN" value="0.1"/>
    <define name="AUTO_THROTTLE_PITCH_OF_VZ_PGAIN" value="0.1"/>

    <!-- auto pitch inner loop -->
    <define name="AUTO_PITCH_PGAIN" value="-0.05"/>
    <define name="AUTO_PITCH_IGAIN" value="0.075"/>
    <define name="AUTO_PITCH_MAX_PITCH" value="0.35"/>
    <define name="AUTO_PITCH_MIN_PITCH" value="-0.35"/>

    <define name="THROTTLE_SLEW" value="0.5"/>

    <!--<define name="THROTTLE_SLEW_LIMITER" value="2" unit="s"/>-->


    <define name="AUTO_AIRSPEED_SETPOINT" value="13.0" unit="m/s"/>
    <define name="AUTO_AIRSPEED_PGAIN" value="0.060"/>
    <define name="AUTO_AIRSPEED_IGAIN" value="0.050"/>
    <define name="AUTO_GROUNDSPEED_SETPOINT" value="7.0" unit="m/s"/>
    <define name="AUTO_GROUNDSPEED_PGAIN" value="0.75"/>
    <define name="AUTO_GROUNDSPEED_IGAIN" value="0.25"/>

    <define name="AUTO_PITCH_PGAIN" value="-0.125"/>
    <define name="AUTO_PITCH_IGAIN" value="0.025"/>
    <define name="AUTO_PITCH_MAX_PITCH" value="RadOfDeg(25)"/>
    <define name="AUTO_PITCH_MIN_PITCH" value="RadOfDeg(-25)"/>-->


  <section name="HORIZONTAL CONTROL" prefix="H_CTL_">
    <define name="COURSE_PGAIN" value="-1.20000004768"/>
    <define name="COURSE_DGAIN" value="0.3"/>
    <define name="COURSE_PRE_BANK_CORRECTION" value="0.2"/>

    <define name="ROLL_MAX_SETPOINT" value="0.75" unit="radians"/>
    <define name="PITCH_MAX_SETPOINT" value="0.5" unit="radians"/>
    <define name="PITCH_MIN_SETPOINT" value="-0.5" unit="radians"/>

    <define name="PITCH_PGAIN" value="-12000."/>
    <define name="PITCH_DGAIN" value="1.5"/>

    <define name="ELEVATOR_OF_ROLL" value="1000."/>

    <define name="ROLL_SLEW" value="1."/>

    <define name="ROLL_ATTITUDE_GAIN" value="-7500"/>
    <define name="ROLL_RATE_GAIN" value="0."/>

  <section name="AGGRESSIVE" prefix="AGR_">
    <define name="BLEND_START" value="20"/><!-- Altitude Error to Initiate Aggressive Climb CANNOT BE ZERO!!-->
    <define name="BLEND_END" value="10"/><!-- Altitude Error to Blend Aggressive to Regular Climb Modes  CANNOT BE ZERO!!-->
    <define name="CLIMB_THROTTLE" value="0.6"/><!-- Gaz for Aggressive Climb -->
    <define name="CLIMB_PITCH" value="0.2"/><!-- Pitch for Aggressive Climb -->
    <define name="DESCENT_THROTTLE" value="0.1"/><!-- Gaz for Aggressive Decent -->
    <define name="DESCENT_PITCH" value="-0.15"/><!-- Pitch for Aggressive Decent -->
    <define name="CLIMB_NAV_RATIO" value="0.8"/><!-- Percent Navigation for Altitude Error Equal to Start Altitude -->
    <define name="DESCENT_NAV_RATIO" value="1.0"/>


  <section name="FAILSAFE" prefix="FAILSAFE_">
    <define name="DEFAULT_THROTTLE" value="0.3" unit="%"/>
    <define name="DEFAULT_ROLL" value="0.3" unit="rad"/>
    <define name="DEFAULT_PITCH" value="0.5" unit="rad"/>
    <!--<define name="RC_LOST_MODE" value="PPRZ_MODE_AUTO2"/>-->
    <define name="HOME_RADIUS" value="DEFAULT_CIRCLE_RADIUS" unit="m"/>
    <define name="KILL_MODE_DISTANCE" value="(MAX_DIST_FROM_HOME*1.5)"/>
    <define name="DELAY_WITHOUT_GPS" value="3" unit="s"/>



Paparazzi-devel mailing list

Paparazzi-devel mailing list

reply via email to

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