[Top][All Lists]

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

Re: [Paparazzi-devel] YAPA name in .xml file?

From: Jorn Anke
Subject: Re: [Paparazzi-devel] YAPA name in .xml file?
Date: Thu, 11 Oct 2012 09:23:39 +0200

I want to know that which name of AP is suitable for me(now I'm using tiny2.11 in my file)?
I think you can use any tiny or twog as reference for the YAPA-board. 
For configuration of your system, I would suggest to start with an almost empty airframe file, get the file compiling, then add code for the various attached hardware and controls one by one;
1. Get the board running and establish wireless contact
2. Add code for the gps, compile, upload, check that the gps works
3. Add code for the imu, compile, upload, check that the imu works
4. Add code for the servos, ...
5. Add code for control, ... 
An old airframe file for Yapa and ppzimu:
<!DOCTYPE airframe SYSTEM "airframe.dtd">
<airframe name="EasyStar YAPA v2">
<firmware name="fixedwing">
<target name="ap" board="twog_1.0">
<define name="LOITER_TRIM"/>
<define name="ALT_KALMAN"/>
<target name="sim" board="pc">
<define name="LOITER_TRIM"/>
<define name="ALT_KALMAN"/>
<subsystem name="radio_control" type="ppm"/>
<subsystem name="telemetry" type="transparent"/>
<subsystem name="control"/>
<subsystem name="imu" type="ppzuav"/>
<subsystem name="ahrs" type="dcm"/>
<subsystem name="gps" type="ublox_lea5h"/>
<subsystem name="navigation"/>
<firmware name="setup">
<target name="tunnel" board="twog_1.0"/>
<target name="setup_actuators" board="twog_1.0"/>
<!-- command section -->

<servo name="THROTTLE" no="7" min="1120" neutral="1120" max="1920"/>
<servo name="ELEVATOR" no="3" min="1100" neutral="1515" max="1900"/>
<servo name="RUDDER" no="4" min="2050" neutral="1440" max="950"/>
<!-- -->
<axis name="THROTTLE" failsafe_value="0"/>
<axis name="ROLL" failsafe_value="0"/>
<axis name="PITCH" failsafe_value="0"/>
<set command="ROLL" value="@ROLL"/>
<set command="PITCH" value="@PITCH"/>
<set command="THROTTLE" value="@THROTTLE"/>
<set servo="THROTTLE" value="@THROTTLE"/>
<set servo="RUDDER" value="@ROLL"/>
<set servo="ELEVATOR" value="@PITCH"/>
<section name="AUTO1" prefix="AUTO1_">
<define name="MAX_ROLL" value="RadOfDeg(50)"/>
<define name="MAX_PITCH" value="RadOfDeg(40)"/>
<section name="AUTO1" prefix="AUTO1_">
<define name="MAX_ROLL" value="0.7"/>
<define name="MAX_PITCH" value="0.7"/>
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 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"/>
<!-- PPZIMU0009 calibration -->
<define name="ACCEL_X_NEUTRAL" value="2"/>
<define name="ACCEL_Y_NEUTRAL" value="1"/>
<define name="ACCEL_Z_NEUTRAL" value="37"/>
<define name="ACCEL_X_SENS" value="38.6961365381" integer="16"/>
<define name="ACCEL_Y_SENS" value="38.1108912698" integer="16"/>
<define name="ACCEL_Z_SENS" value="39.6104778694" 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 name="INS" prefix="INS_">
<define name="ROLL_NEUTRAL_DEFAULT" value="0" unit="deg"/>
<define name="PITCH_NEUTRAL_DEFAULT" value="0" unit="deg"/>
<section name="BAT">
<define name="CATASTROPHIC_BAT_LEVEL" value="9.0" unit="V"/>
<define name="CRITIC_BAT_LEVEL" value="9.5" unit="V"/>
<define name="LOW_BAT_LEVEL" value="10.0" unit="V"/>
<define name="MAX_BAT_LEVEL" value="12.5" unit="V"/>
<section name="MISC">
<define name="NOMINAL_AIRSPEED" value="15." unit="m/s"/>
<define name="CARROT" value="4." unit="s"/>
<define name="KILL_MODE_DISTANCE" value="(2.0*MAX_DIST_FROM_HOME)"/>
<define name="CONTROL_RATE" value="60" unit="Hz"/>
<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="90."/>
<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)"/>
<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 name="HORIZONTAL CONTROL" prefix="H_CTL_">
<define name="COURSE_PGAIN" value="-0.7"/>
<define name="ROLL_MAX_SETPOINT" value="RadOfDeg(35)" unit="radians"/>
<define name="PITCH_MAX_SETPOINT" value="RadOfDeg(25)" unit="radians"/>
<define name="PITCH_MIN_SETPOINT" value="RadOfDeg(-25)" unit="radians"/>
<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 name="NAV">
<define name="NAV_PITCH" value="0."/>
<define name="NAV_GLIDE_PITCH_TRIM" 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.9"/><!-- Gaz for Aggressive Climb -->
<define name="CLIMB_PITCH" value="RadOfDeg(18)"/><!-- 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 name="FAILSAFE" prefix="FAILSAFE_">
<define name="DELAY_WITHOUT_GPS" value="3" unit="s"/>
<define name="DEFAULT_THROTTLE" value="0.4" unit="%"/>
<define name="DEFAULT_ROLL" value="RadOfDeg(15)" unit="rad"/>
<define name="DEFAULT_PITCH" value="RadOfDeg(0)" unit="rad"/>
<define name="HOME_RADIUS" value="90" unit="m"/>
<section name="DATALINK" prefix="DATALINK_">
<define name="DEVICE_TYPE" value="PPRZ"/>
<define name="DEVICE_ADDRESS" value="...."/>
<section name="DIGITAL_CAMERA" prefix="DC_">
<define name="AUTOSHOOT_QUARTERSEC_PERIOD" value="6" unit="quarter_second"/>
<define name="AUTOSHOOT_METER_GRID" value="50" unit="meter"/>


 YAPA name in .xml file?

From: iman shirdareh
Subject: [Paparazzi-devel] YAPA name in .xml file?
Date: Wed, 10 Oct 2012 10:32:43 +0330


I have a YAPAv2 autopilot and I use funjet.xml file to configure that for my AP and I use PPZimu_tiny.xml to mix that with funjet.xml file. but I have problem with my file(I can't build that) I attach my airframe file.

I want to know that which name of AP is suitable for me(now I'm using tiny2.11 in my file)? there isn't any name or suggestion for YAPA in "select your board" here(I think it's better to add it) :

Thanks a lot........Iman


reply via email to

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