paparazzi-devel
[Top][All Lists]
Advanced

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

Re: [Paparazzi-devel] Is lisa/m 2.0 now support the baro and the magneto


From: Marvin Wang
Subject: Re: [Paparazzi-devel] Is lisa/m 2.0 now support the baro and the magnetometer on board?
Date: Tue, 5 Jun 2012 08:52:33 +0800

oh, i know thanks 

i will try the multimotor firmware, and see the code


2012/6/5 Felix Ruess <address@hidden>
Hi Marvin,

I just flashed your airframe with master. I get mag values just fine..
Unfortunately we don't have a test prog for the hmc on aspirin2.1 (as we do for the previous aspirins), since the mag is connected as slave to the MPU6000 and read through that.

In the fixedwing firmware the onboard baro is currently not read...(in lisa_l for fixedwings it is read but unused). This is a known issue and I will look into that (write a new baro interface) as time permits... sorry... just didn't want to add more hacks. See https://github.com/paparazzi/paparazzi/issues/106

Cheers, Felix

On Tue, Jun 5, 2012 at 1:40 AM, yy <address@hidden> wrote:
hi, Felix
maybe my HMC5883 is broken during the soldering. many of the developers have this issue. it is too sensitive about heat, so the solder should below 300℃

you said baro should show the data, but with my airframe.xml, i cant read any data from the baro.

so what should add into the file?

thanks
Marvin

Felix Ruess <address@hidden>编写:

>Hi Marvin,
>
>what branch are you using? v3.9?
>With some setups the mag sometimes only updates once at startup. Seems to
>be an I2C driver issue that is probably fixed with the new driver (in
>master).
>You can also test the new driver in v3.9 by adding <configure
>name="USE_NEW_I2C_DRIVER"/> to your firmware.
>
>Baro should be read just fine, although for fixedwings the onboard baro is
>currently not used to update the altitude kalman filter.... Eduardo said he
>had a patch?
>
>Cheers, Felix
>
>On Mon, Jun 4, 2012 at 11:08 AM, Marvin Wang <address@hidden> wrote:
>
>> hi all
>>
>> Is lisa/m 2.0 now support the baro and the magnetometer on board?
>>
>> i cant use them both, i have look up the message cant find the baro
>> datalink,the mag value is constant, what should i add to the ariframe? i
>> checked the wiki everywhere cant find the answer, so please help me with
>> this.
>>
>> my airframe.xml:
>>
>> !DOCTYPE airframe SYSTEM "airframe.dtd">
>>
>> <airframe name="Sky Surfer 1.4m with Lisa/M 2.0">
>>
>>     <firmware name="fixedwing">
>>
>>     <target name="sim"   board="pc">
>>
>>       <define name="LOITER_TRIM"/>
>>
>>       <define name="ALT_KALMAN"/>
>>
>>       <define name="AGR_CLIMB"/>
>>
>>     </target>
>>
>>     <target name="ap"   board="lisa_m_2.0">
>>
>>       <define name="LOITER_TRIM"/>
>>
>>       <define name="ALT_KALMAN"/>
>>
>>       <define name="AGR_CLIMB"/>
>>
>>     </target>
>>
>>     <subsystem name="imu"  type="aspirin_v2.1"/>
>>
>>     <subsystem name="ahrs"  type="int_cmpl_quat">
>>
>> <!--   ******** AHRS_MAG_UPDATE_YAW_ONLY is defult set ********
>>
>>       <define name="AHRS_MAG_UPDATE_YAW_ONLY"/>     -->
>>
>>        <define name="AHRS_PROPAGATE_LOW_PASS_RATES"/>
>>
>>     </subsystem>
>>
>>     <subsystem name="radio_control" type="ppm"/>
>>
>>     <subsystem name="telemetry"  type="transparent">
>>
>>       <configure name="MODEM_BAUD"  value="B57600"/>
>>
>>     </subsystem>
>>
>>     <subsystem name="gps"      type="ublox">
>>
>>        <configure name="GPS_BAUD" value="B38400"/>
>>
>>     </subsystem>
>>
>>     <subsystem name="control"/>
>>
>>     <subsystem name="navigation"/>
>>
>>   </firmware>
>>
>>   <firmware name="setup">
>>
>>     <target name="tunnel"      board="lisa_m_2.0" />
>>
>>     <target name="setup_actuators"  board="lisa_m_2.0" />
>>
>>   </firmware>
>>
>>   <modules>
>>
>>     <load name="gps_ubx_ucenter.xml"/>
>>
>>   </modules>
>>
>> <section name="AHRS" prefix="AHRS_">
>>
>>   <define name="H_X" value="0.834910303443909"/>
>>
>>   <define name="H_Y" value="-0.0488381297153481"/>
>>
>>   <define name="H_Z" value="0.548214941687206"/>
>>
>> <!--
>>
>>    above data calcultated by
>> www.ngdc.noaa.gov/geomagmodels/struts/calcIGRFWMM
>>  , model = Tainan Taiwan, iaa building IGRF11, date: 2012,may,22th
>>
>> -->
>>
>> </section>
>>
>> <!-- commands section -->
>>
>> <!-- ppm input process chain:
>>
>>
>>      radio.xml -> decode according to radio.xml -> commands-> rc_command + command_law -->
>>
>>   <commands>
>>
>>     <axis name="ROLL"     failsafe_value="0"/>
>>
>>     <axis name="THROTTLE" failsafe_value="0"/>
>>
>>     <axis name="PITCH"    failsafe_value="0"/>
>>
>>     <axis name="YAW"      failsafe_value="0"/>
>>
>>   </commands>
>>
>>   <rc_commands>
>>
>>     <set command="ROLL"      value="@ROLL"/>
>>
>>     <set command="THROTTLE"  value="@THROTTLE"/>
>>
>>     <set command="PITCH"     value="@PITCH"/>
>>
>>     <set command="YAW"  value="@YAW"/>
>>
>>   </rc_commands>
>>
>>   <servos>
>>
>>
>>     <servo name="AILERON"      no="0" min="1948" neutral="1536" max="1108"/>
>>
>>
>>     <servo name="THROTTLE"      no="1" min="1100" neutral="1100" max="1942"/>
>>
>>
>>     <servo name="ELEVATOR"      no="2" min="1940" neutral="1520" max="1074"/>
>>
>>
>>     <servo name="RUDDER"        no="3" min="1844" neutral="1428" max="1004"/>
>>
>>   </servos>
>>
>>   <command_laws>
>>
>>     <set servo="THROTTLE"    value="@THROTTLE"/>
>>
>>     <set servo="RUDDER"      value="@YAW"/>
>>
>>     <set servo="ELEVATOR"    value="@PITCH"/>
>>
>>     <set servo="AILERON" value="@ROLL"/>
>>
>>   </command_laws>
>>
>>    <auto_rc_commands>
>>
>>   <!-- enable rudder in AUTO1 mode-->
>>
>>     <set command="YAW" value="@YAW"/>
>>
>>   </auto_rc_commands>
>>
>> <!-- End command section -->
>>
>>   <section name="AUTO1" prefix="AUTO1_">
>>
>>     <define name="MAX_ROLL" value="RadOfDeg(50)"/>
>>
>>     <define name="MAX_PITCH" value="RadOfDeg(30)"/>
>>
>>   </section>
>>
>>    <section name="IMU" prefix="IMU_">
>>
>>
>> <!-- gyrosens, accelemeter neutral and sens undefined here means use default value defined in imu_aspirinv2.0.h
>>
>>
>>                                                               /paparazzi/sw/airbone/subsystems/imu/ -->
>>
>>
>> <!-- mag sensor values are found by calibrate.py scrip, 2012/05/22 NCKU_iaa_building, Tainan, Taiwan-->
>>
>>     <define name="GYRO_P_NEUTRAL" value="-6"/>
>>
>>     <define name="GYRO_Q_NEUTRAL" value="-3"/>
>>
>>     <define name="GYRO_R_NEUTRAL" value="8"/>
>>
>>
>>
>> <define name="MAG_X_NEUTRAL" value="-961"/>
>>
>> <define name="MAG_Y_NEUTRAL" value="-115"/>
>>
>> <define name="MAG_Z_NEUTRAL" value="20"/>
>>
>> <define name="MAG_X_SENS" value="4.45045690083" integer="16"/>
>>
>> <define name="MAG_Y_SENS" value="4.3861081417" integer="16"/>
>>
>> <define name="MAG_Z_SENS" value="4.64145389502" integer="16"/>
>>
>>     <define name="BODY_TO_IMU_PHI" value="RadOfDeg(0.0)"/>
>>
>>     <define name="BODY_TO_IMU_THETA" value="RadOfDeg(0.0)"/>
>>
>>     <define name="BODY_TO_IMU_PSI" value="RadOfDeg(90.0)"/>
>>
>>   </section>
>>
>>   <section name="BAT">
>>
>>  <!-- checked-->
>>
>>     <define name="MILLIAMP_AT_FULL_THROTTLE" value="35000" unit="mA"/>
>>
>>     <define name="CATASTROPHIC_BAT_LEVEL" value="10.8" unit="V"/>
>>
>>     <define name="CRITIC_BAT_LEVEL" value="11.0" unit="V"/>
>>
>>     <define name="LOW_BAT_LEVEL" value="11.4" unit="V"/>
>>
>>     <define name="MAX_BAT_LEVEL" value="12.5" unit="V"/>
>>
>>
>>     <!-- adc factor in sw/airbone/boards/lisa_m_2.0.h has been changed into 0.00455(defult 0.00485) -->
>>
>>   </section>
>>
>>   <section name="MISC">
>>
>>     <define name="NOMINAL_AIRSPEED" value="15." unit="m/s"/>
>>
>>     <define name="CARROT" value="5." unit="s"/>
>>
>>     <define name="KILL_MODE_DISTANCE" value="MAX_DIST_FROM_HOME"/>
>>
>>     <define name="CONTROL_RATE" value="60" unit="Hz"/>
>>
>>     <define name="NAV_RADIUS" value="30"unit="m"/>
>>
>>     <define name="NO_XBEE_API_INIT" value="TRUE"/>
>>
>>     <define name="ALT_KALMAN_ENABLED" value="TRUE"/>
>>
>>     <define name="TRIGGER_DELAY" value="1."/>
>>
>>     <define name="DEFAULT_CIRCLE_RADIUS" value="20."/>
>>
>>   </section>
>>
>>   <section name="VERTICAL CONTROL" prefix="V_CTL_">
>>
>>     <define name="POWER_CTL_BAT_NOMINAL" value="11.0" unit="volt"/>
>>
>>     <!-- outer loop -->
>>
>>     <define name="ALTITUDE_PGAIN" value="0.075" unit="(m/s)/m"/>
>>
>>     <define name="ALTITUDE_MAX_CLIMB" value="4." unit="m/s"/>
>>
>>     <!-- auto throttle inner loop -->
>>
>>
>>     <define name="AUTO_THROTTLE_NOMINAL_CRUISE_THROTTLE" value="0.5" unit="%"/>
>>
>>     <define name="AUTO_THROTTLE_MIN_CRUISE_THROTTLE" value="0.4" unit="%"/>
>>
>>     <define name="AUTO_THROTTLE_MAX_CRUISE_THROTTLE" value="0.8" unit="%"/>
>>
>>     <define name="AUTO_THROTTLE_LOITER_TRIM" value="1500" unit="pprz_t"/>
>>
>>     <define name="AUTO_THROTTLE_DASH_TRIM" value="-1000" unit="pprz_t"/>
>>
>>
>>     <define name="AUTO_THROTTLE_CLIMB_THROTTLE_INCREMENT" value="0.1" unit="%/(m/s)"/>
>>
>>     <define name="AUTO_THROTTLE_PGAIN" value="0.02" unit="%/(m/s)"/>
>>
>>     <define name="AUTO_THROTTLE_IGAIN" value="0.1"/>
>>
>>
>>     <define name="AUTO_THROTTLE_PITCH_OF_VZ_PGAIN" value="0.05" unit="rad/(m/s)"/>
>>
>>     <!-- auto pitch inner loop-->
>>
>>     <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)"/>
>>
>>     <define name="THROTTLE_SLEW" value="1.0"/>
>>
>>   </section>
>>
>>   <section name="HORIZONTAL CONTROL" prefix="H_CTL_">
>>
>>     <define name="COURSE_PGAIN" value="0.7"/>
>>
>>     <define name="ROLL_MAX_SETPOINT" value="35" unit="deg"/>
>>
>>     <define name="PITCH_MAX_SETPOINT" value="25" unit="deg"/>
>>
>>     <define name="PITCH_MIN_SETPOINT" value="-25" unit="deg"/>
>>
>>     <define name="PITCH_PGAIN" value="20000."/>
>>
>>     <define name="PITCH_DGAIN" value="1.5"/>
>>
>>     <define name="ELEVATOR_OF_ROLL" value="2500"/>
>>
>>     <define name="ROLL_ATTITUDE_GAIN" value="7400"/>
>>
>>     <define name="ROLL_RATE_GAIN" value="200"/>
>>
>>   </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="0.9"/><!-- Gaz for Aggressive Climb -->
>>
>>
>>     <define name="CLIMB_PITCH" value="RadOfDeg(20)"/><!-- Pitch for Aggressive Climb -->
>>
>>
>>     <define name="DESCENT_THROTTLE" value="0.1"/><!-- Gaz for Aggressive Decent -->
>>
>>
>>     <define name="DESCENT_PITCH" value="RadOfDeg(-20)"/><!-- 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="SIMU">
>>
>>     <define name="WEIGHT" value="1."/>
>>
>>     <define name="YAW_RESPONSE_FACTOR" value="1."/>
>>
>>     <define name="ROLL_RESPONSE_FACTOR" value="15."/>
>>
>>   </section>
>>
>> </airframe>
>>
>> _______________________________________________
>> 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


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