Difference between revisions of "Explorer/PPRZ"
Jump to navigation
Jump to search
| Line 173: | Line 173: | ||
[[Explorer/PPRZ/Configuration]]<br /> | [[Explorer/PPRZ/Configuration]]<br /> | ||
[[Explorer/PPRZ/Tunning]] | [[Explorer/PPRZ/Tunning]] | ||
[[Explorer]] | |||
Revision as of 04:37, 29 September 2020
airframe file:
<!DOCTYPE airframe SYSTEM "../../airframe.dtd">
<airframe name="Quadricopter XP">
<description>
* Autopilot: Tawaki/ Apogee
* Actuators: 4 in 1 Holybro BLHELI ESC
* Telemetry: XBee and Wifibroadcast (compagnon board)
* GPS: ublox M8P (optional DGPS) or Datalink
* RC: FrSky XM+ or Datalink
IMU Apogee :
- MPU6050 (acc+gyro),
- MPU9150 (acc+gyro+mag) = MPU6050 + AK8975
MAG Apogee (AK8975 on I2C1) or on external GPS board (LIS3MDL on I2C1) or Datalink
BARO Apogee (MPL3115A2 on I2C1)
</description>
<firmware name="rotorcraft">
<configure name="PERIODIC_FREQUENCY" value="1000"/>
<configure name="AHRS_PROPAGATE_FREQUENCY" value="$(PERIODIC_FREQUENCY)"/>
<configure name="KILL_AS_FAILSAFE" value="1"/>
<!-- OPTION 1A & 1B -->
<target name="ap" board="apogee_1.0_chibios"/>
<!-- OPTION 1C -->
<!--
<target name="nps" board="pc"/>
-->
</firmware>
<!-- apogee_1.0_chibios -->
<!-- OPTION 1A -->
<include href="conf/airframes/ENAC/quadrotor/xp/xp_option_board_apogee_mpu9150.xml"/>
<include href="conf/airframes/ENAC/quadrotor/xp/xp_option_imu_apogee_mpu9150.xml"/>
<include href="conf/airframes/ENAC/quadrotor/xp/xp_common_target_flying.xml"/>
<include href="conf/airframes/ENAC/quadrotor/xp/xp_option_target_apogee.xml"/>
<!-- OPTION 1B -->
<!--
<include href="conf/airframes/ENAC/quadrotor/xp/xp_option_board_apogee_lis3mdl.xml"/>
<include href="conf/airframes/ENAC/quadrotor/xp/xp_option_imu_apogee_lis3mdl.xml"/>
<include href="conf/airframes/ENAC/quadrotor/xp/xp_common_target_flying.xml"/>
<include href="conf/airframes/ENAC/quadrotor/xp/xp_option_target_apogee.xml"/>
-->
<!-- OPTION 1C -->
<!--
<include href="conf/airframes/ENAC/quadrotor/xp/xp_option_board_tawaki.xml"/>
<include href="conf/airframes/ENAC/quadrotor/xp/xp_option_board_apogee_mpu9150.xml"/>
<include href="conf/airframes/ENAC/quadrotor/xp/xp_option_board_apogee_lis3mdl.xml"/>
-->
<!-- tawaki_1.0 & apogee_1.0_chibios -->
<!-- OPTION 2A -->
<!-- include href="conf/airframes/ENAC/quadrotor/xp/xp_option_indoor.xml"/-->
<!-- OPTION 2B -->
<include href="conf/airframes/ENAC/quadrotor/xp/xp_option_outdoor.xml"/>
<!-- OPTION 2C -->
<!--
<include href="conf/airframes/ENAC/quadrotor/xp/xp_option_target_nps.xml"/>
-->
<!-- All targets -->
<include href="conf/airframes/ENAC/quadrotor/xp/xp_common_stab_rate.xml"/>
<include href="conf/airframes/ENAC/quadrotor/xp/xp_common_stab_attitude.xml"/>
<include href="conf/airframes/ENAC/quadrotor/xp/xp_common_guidance.xml"/>
<include href="conf/airframes/ENAC/quadrotor/xp/xp_common_modules.xml"/>
</airframe>
flght_plan file:
<!DOCTYPE flight_plan SYSTEM "../flight_plan.dtd">
<flight_plan alt="148" ground_alt="146" lat0="43.5640917" lon0="1.4829201" max_dist_from_home="20" name="Rotorcraft Optitrack (ENAC)" security_height="0.3">
<header>
</header>
<waypoints>
<waypoint name="HOME" x="0.0" y="0.0"/>
<waypoint name="GOAL" x="2.0" y="2.0"/>
<waypoint name="STDBY" x="-0.7" y="-0.8"/>
<waypoint name="TD" x="0.8" y="-1.7"/>
<waypoint name="S1" x="2.1" y="2.8"/>
<waypoint name="S2" x="2.0" y="-3.0"/>
<waypoint name="S3" x="-2.1" y="-3.1"/>
<waypoint name="S4" x="-2.2" y="2.8"/>
<waypoint name="_N1" x="4.5" y="5.2"/>
<waypoint name="_N2" x="4.5" y="-5.2"/>
<waypoint name="_N3" x="-4.5" y="-5.2"/>
<waypoint name="_N4" x="-4.5" y="5.2"/>
</waypoints>
<sectors>
<sector color="red" name="Net">
<corner name="_N1"/>
<corner name="_N2"/>
<corner name="_N3"/>
<corner name="_N4"/>
</sector>
<sector color="green" name="Survey" type="dynamic">
<corner name="S1"/>
<corner name="S2"/>
<corner name="S3"/>
<corner name="S4"/>
</sector>
</sectors>
<modules>
<module name="nav" type="survey_rectangle_rotorcraft"/>
</modules>
<blocks>
<block name="Wait GPS">
<call_once fun="NavKillThrottle()"/>
<while cond="!GpsFixValid()"/>
</block>
<block name="Holding point">
<call_once fun="NavKillThrottle()"/>
<attitude pitch="0" roll="0" throttle="0" until="FALSE" vmode="throttle"/>
</block>
<block name="Start Engine">
<call_once fun="NavResurrect()"/>
<attitude pitch="0" roll="0" throttle="0" until="FALSE" vmode="throttle"/>
</block>
<block name="Takeoff" strip_button="Takeoff" strip_icon="takeoff.png">
<exception cond="stateGetPositionEnu_f()->z > 1.0" deroute="Standby"/>
<call_once fun="NavSetWaypointHere(WP_STDBY)"/>
<stay climb="nav_climb_vspeed" vmode="climb" wp="STDBY"/>
</block>
<block name="Standby" strip_button="Standby" strip_icon="home.png">
<call_once fun="nav_set_heading_deg(0)"/>
<stay wp="STDBY"/>
</block>
<block name="START" strip_button="Go" strip_icon="lookfore.png">
<call_once fun="NavSetWaypointHere(WP_GOAL)"/>
</block>
<block name="StayGoal">
<stay wp="GOAL"/>
</block>
<block group="extra_pattern" name="Survey S1-S2 Sweep NS SET" strip_button="SvySweep-NS" strip_icon="survey_rect_ns.png">
<call_once fun="nav_survey_rectangle_rotorcraft_setup(WP_S1, WP_S3, 1, NS)"/>
<deroute block="Survey RECTANGLE RUN"/>
</block>
<block group="extra_pattern" name="Survey S1-S2 Sweep WE SET" strip_button="SvySweep-WE" strip_icon="survey_rect_we.png">
<call_once fun="nav_survey_rectangle_rotorcraft_setup(WP_S1, WP_S3, 1, WE)"/>
<deroute block="Survey RECTANGLE RUN"/>
</block>
<block group="extra_pattern" name="Survey RECTANGLE RUN" strip_button="SvySweep CONT" strip_icon="survey_rect_run.png">
<exception cond="rectangle_survey_sweep_num == 1" deroute="Standby"/>
<call fun="nav_survey_rectangle_rotorcraft_run(WP_S1, WP_S3)"/>
</block>
<block name="land here" strip_button="Land Here" strip_icon="land-right.png">
<call_once fun="NavSetWaypointHere(WP_TD)"/>
</block>
<block name="land">
<go wp="TD"/>
</block>
<block name="flare">
<exception cond="!nav_is_in_flight()" deroute="KILL_LANDED"/>
<stay climb="nav_descend_vspeed" vmode="climb" wp="TD"/>
</block>
<block name="KILL_LANDED">
<call_once fun="NavKillThrottle()"/>
<attitude pitch="0" roll="0" throttle="0" until="FALSE" vmode="throttle"/>
</block>
</blocks>
</flight_plan>