paparazzi-devel
[Top][All Lists]
Advanced

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

Re: [Paparazzi-devel] Airspeed


From: Christoph Niemann
Subject: Re: [Paparazzi-devel] Airspeed
Date: Thu, 23 Feb 2012 16:52:56 +0100

Hi Jesus,

I also use the ETS with success. Possibly you changed something on our wiring by accident on your AP? Do you get messages? What if you don't load the module and don't define the define?

Cheers

Christoph

2012/2/23 <address@hidden>
Hi

I am using both ETS sensor (baro+speed) succesfully. See the  airframe
config file bellow. I hope it helps.

Balazs

<!DOCTYPE airframe SYSTEM "airframe.dtd">

<!--    EasyGlider
       TWOGv1
       Xsens MtiG
       AC4868
       ETS Airspeed

-->

<airframe name="Trainer60 - TWOG v1">

 <firmware name="fixedwing">
   <target name="sim"                  board="pc"/>
   <target name="ap"                   board="twog_1.0"/>
   <define name="AGR_CLIMB" />
   <define name="USE_I2C0"/>
   <define name="USE_AIRSPEED"/>
   <define name="USE_BARO_ETS"/>
   <define name="LOITER_TRIM" />
   <define name="ALT_KALMAN" />
   <!--  <define name="ADC_CHANNEL_VSUPPLY" value="ADC_3"/> -->
   <!-- <define name="USE_AD0_6" />  -->

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

   <!-- Communication -->
   <subsystem name="telemetry"         type="transparent">
     <configure name="MODEM_BAUD"              value="B57600"/>
   </subsystem>

   <!-- Actuators are automatically chosen according to board -->
   <subsystem name="control"/>
   <subsystem name="gps"                   type="xsens"/>
   <subsystem name="navigation"/>
   <subsystem name="i2c"/>
   <subsystem name="current_sensor">
     <configure name="ADC_CURRENT_SENSOR" value="ADC_4"/>
   </subsystem>
 </firmware>


<!-- commands section -->
 <servos>
   <servo name="AILERON"  no="4" min="1000" neutral="1500" max="2000"/>
<!-- TWOG servo channel layout-->
   <servo name="ELEVATOR"      no="3" min="2000" neutral="1500" max="1000"/>
   <servo name="THROTTLE"      no="7" min="1000" neutral="1000" max="2000"/>
   <servo name="RUDDER"        no="6" min="1000" neutral="1500" max="2000"/>
 </servos>

  <!-- COMMANDS: generated by AP/RC -->
 <commands>
   <axis name="THROTTLE" failsafe_value="0"/>
   <axis name="ROLL" failsafe_value="0"/>
   <axis name="PITCH" failsafe_value="0"/>
   <axis name="YAW" failsafe_value="0"/>
   <axis name="FLAPS" failsafe_value="0"/>
 </commands>

  <!-- MANUAL MODE: links the channels of the RC transmitter (defined in
the Radio Control file)
  to the commands defined above -->
 <rc_commands>
   <set command="THROTTLE" value="@THROTTLE"/>
   <set command="ROLL" value="@ROLL"/>
   <set command="PITCH" value="@PITCH"/>
   <set command="YAW" value="@YAW"/>
   <set command="FLAPS" value="@FLAPS"/>
 </rc_commands>

 <section name="MIXER">
   <define name="COMBI_SWITCH" value="0.4"/>  <!--Orig: 1.0  -->
 </section>

 <command_laws>
   <set servo="THROTTLE" value="@THROTTLE"/>
   <set servo="ELEVATOR" value="@PITCH"/>
   <set servo="RUDDER" value="@YAW + @ROLL*COMBI_SWITCH"/>
   <set servo="AILERON" value="@ROLL"/>
 </command_laws>


  <!-- AUTO1 MODE: max.pitch max.roll-->
 <section name="AUTO1" prefix="AUTO1_">
   <define name="MAX_ROLL" value="RadOfDeg(50)"/>
   <define name="MAX_PITCH" value="RadOfDeg(40)"/>
 </section>


  <!-- Battery -->
 <section name="BAT">
  <!-- <define name="ADC_CHANNEL_CURRENT" value="ADC_3"/> -->
   <define name="MilliAmpereOfAdc(adc)" value="(100*adc)"/>
  <!-- <define name="MILLIAMP_AT_FULL_THROTTLE" value="10000" unit="mA"/>
 -->
   <!-- <define name="ADC_CHANNEL_VSUPPLY"value="AdcBank0(6)"/>  -->
   <!--<define name="VOLTAGE_ADC_A" value="0.05"/>     -->
   <!--<define name="VOLTAGE_ADC_B" value="0"/>      -->
  <!-- <define name="VoltageOfAdc(adc)" value ="(VOLTAGE_ADC_A * adc +
VOLTAGE_ADC_B)"/>      -->
   <define name="CATASTROPHIC_BAT_LEVEL" value="10.0" unit="V"/> <!-- 19V
!!!!!!!!!!!!! -->
   <define name="CRITIC_BAT_LEVEL" value="10.5.0" unit="V"/>       <!--
20V !!!!!!!!!!!!! -->
   <define name="LOW_BAT_LEVEL" value="11.0" unit="V"/>          <!--
21.5V !!!!!!!!!!!!! -->
   <define name="MAX_BAT_LEVEL" value="24.0" unit="V"/>
 </section>

  <!-- Horizontal control -->
 <section name="HORIZONTAL CONTROL" prefix="H_CTL_">
   <define name="COURSE_PGAIN" value="-0.7"/>  <!-- course error-> roll
command orig: -1.0-->
   <define name="ROLL_MAX_SETPOINT" value="0.7" unit="radians"/>  <!--
max. roll command -->
   <define name="ROLL_SLEW" value="0.1"/>                         <!--
roll rate-->
   <define name="ROLL_ATTITUDE_GAIN" value="-9000"/>              <!--
roll command from roll error-->
   <define name="ROLL_RATE_GAIN" value="-1500"/>                  <!-- if
gyro is installed-->
   <define name="PITCH_DGAIN" value="1.5"/>                    <!-- originally positive!-->
   <define name="ELEVATOR_OF_ROLL" value="1300"/>
   <define name="PITCH_PGAIN" value="-7000"/>
   <define name="PITCH_MAX_SETPOINT" value="0.3" unit="radians"/>
   <define name="PITCH_MIN_SETPOINT" value="-0.5" unit="radians"/>

 </section>

  <!-- Vertical control -->
 <section name="VERTICAL CONTROL" prefix="V_CTL_">
   <define name="ALTITUDE_PGAIN" value="-0.1" unit="(m/s)/m"/> <!--
altitude error->rate of climb -->
   <define name="ALTITUDE_MAX_CLIMB" value="0.7" unit="m/s"/>      <!--
max. rate of climb -->
   <!-- auto throttle inner loop -->
   <define name="AUTO_THROTTLE_NOMINAL_CRUISE_THROTTLE" value="0.7"
unit="%"/>
   <define name="AUTO_THROTTLE_MIN_CRUISE_THROTTLE" value=".6" unit="%"/>
   <define name="AUTO_THROTTLE_MAX_CRUISE_THROTTLE" value="1.0" unit="%"/>
   <define name="AUTO_THROTTLE_LOITER_TRIM" value="1500" unit="pprz_t"/>
   <define name="AUTO_THROTTLE_DASH_TRIM" value="-4000" unit="pprz_t"/>
   <define name="AUTO_THROTTLE_CLIMB_THROTTLE_INCREMENT" value="0.15"
unit="%/(m/s)"/>
   <define name="AUTO_THROTTLE_PGAIN" value="-0.008" unit="%/(m/s)"/>
   <define name="AUTO_THROTTLE_IGAIN" value="0.1"/>
   <define name="AUTO_THROTTLE_PITCH_OF_VZ_PGAIN" value="0.1"
unit="rad/(m/s)"/>  <!-- orig 0.05  -->
   <!-- auto airspeed and altitude inner loop -->
   <define name="AUTO_AIRSPEED_SETPOINT" value="14.0" unit="m/s"/>
<!--orig 10.5  -->
   <define name="AUTO_AIRSPEED_PGAIN" value="0.060"/>  <!-- orig 0.060 -->
   <define name="AUTO_AIRSPEED_IGAIN" value="0.050"/>    <!-- orig 0.050 -->
   <define name="AUTO_GROUNDSPEED_SETPOINT" value="6.0" unit="m/s"/>
   <define name="AUTO_GROUNDSPEED_PGAIN" value="0.75"/>
   <define name="AUTO_GROUNDSPEED_IGAIN" value="0.25"/>
   <!-- auto pitch inner loop -->
   <define name="AUTO_PITCH_PGAIN" value="-0.1"/>
   <define name="AUTO_PITCH_IGAIN" value="0.025"/>
   <define name="AUTO_PITCH_MAX_PITCH" value="0.3"/>
   <define name="AUTO_PITCH_MIN_PITCH" value="-0.5"/>
   <define name="THROTTLE_SLEW_LIMITER" value="2" unit="s"/>
 </section>

 <section name="MISC">
   <define name="NOMINAL_AIRSPEED" value="12.0" unit="m/s"/>  <!--mainly
for simulator  -->
   <define name="CARROT" value="5." unit="s"/>
   <define name="KILL_MODE_DISTANCE" value="(1.5*MAX_DIST_FROM_HOME)"/>
   <define name="CONTROL_RATE" value="60" unit="Hz"/>
   <define name="DEFAULT_CIRCLE_RADIUS" value="50."/>
   <define name="UNLOCKED_HOME_MODE" value="FALSE"/>  <!-- if true, HOME
mode does not get stuck   -->
   <define name="RC_LOST_MODE" value="PPRZ_MODE_AUTO2"/>
   <define name="ALT_KALMAN_ENABLED" value="TRUE"/>

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

 <section name="NAV">
   <define name="NAV_PITCH" value="0."/>
   <define name="NAV_GLIDE_PITCH_TRIM" value="0"/>
 </section>

 <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="1.00"/><!-- Gaz for Aggressive
Climb -->
   <define name="CLIMB_PITCH" value="0.3"/><!-- Pitch for Aggressive
Climb -->
   <define name="DESCENT_THROTTLE" value="0.1"/><!-- Gaz for Aggressive
Decent -->
   <define name="DESCENT_PITCH" value="-0.25"/><!-- 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>

 <section name="FAILSAFE" prefix="FAILSAFE_">
   <define name="DELAY_WITHOUT_GPS" value="2" unit="s"/>
   <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"/>
 </section>

 <!--  <section name="DATALINK" prefix="DATALINK_">
   <define name="DEVICE_TYPE" value="PPRZ"/>
   <define name="DEVICE_ADDRESS" value="...."/>
 </section> -->


 <section name="XSENS">
 <!--  <define name="GPS_IMU_LEVER_ARM_X" value="-0.285f"/>  -->
 <!--  <define name="GPS_IMU_LEVER_ARM_Y" value="0.0f"/>  -->
 <!--  <define name="GPS_IMU_LEVER_ARM_Z" value="0.0f"/>  -->
   <define name="INS_PITCH_NEUTRAL_DEFAULT" value="0.0f"/>
   <define name="INS_ROLL_NEUTRAL_DEFAULT" value="0.0f"/>
 </section>

 <modules>
   <load name="ins_xsens_MTiG_fixedwing.xml">
      <configure name="XSENS_UART_NR" value="0"/>
   </load>
   <load name="airspeed_ets.xml">
     <define name="AIRSPEED_ETS_SCALE"   value="1.8"/>
     <define name="AIRSPEED_ETS_OFFSET"  value="4"/>
     <define name="AIRSPEED_ETS_I2C_DEV" value="i2c0"/>
  <!-- <define name="SENSOR_SYNC_SEND"/>     Sending the raw airspeed by
telemetry (high bandwith)-->
   </load>
   <load name="baro_ets.xml">
     <define name="BARO_ETS_TELEMETRY"/>  <!-- Sending the barometric
pressure by telemetry -->
   </load>
    <load name="adc_generic.xml">   <!-- (don't activate here the ADC of
the current sensor)-->
     <configure name="ADC_CHANNEL_GENERIC1" value="ADC_3"/>  <!--motor
voltage sensor -->
   <!--  <configure name="ADC_CHANNEL_GENERIC2" value="ADC_4"/>  motor
current sensor -->
    </load>
 </modules>



</airframe>

> Hello:
>   I´m using the TWOG, and the more strange thing it´s that I haven´t got
> any error message and any advise...
>  Thanks
>
> --
> Jesús Martín
> _______________________________________________
> Paparazzi-devel mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
>



_______________________________________________
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]