Hi all
i am just looking for some feedback on anyone that has got any procedures to work properly. I have been working on some routines for payload dropping and i wanted to put them in a procedure so that i could use the same code over many flight plans. I am not sure how limited procedures are but this is what i have written
Thanks for any help
Todd
<procedure>
<header>
#include "datalink.h"
#include "bomb.h"
</header>
<param name="alt" default_value="ground_alt+50"/>
<param name="radius" default_value="75"/>
<waypoints>
<waypoint alt="alt" name="TARGET" x="0" y="0"/>
<waypoint alt="alt" name="START"
x="0" y="-100"/>
<waypoint name="RELEASE" x="0" y="-50"/>
<waypoint name="BLEG" x="100" y="-100"/>
<waypoint alt="alt+50" name="BCLIMB" x="0" y="100"/>
<waypoint alt="alt+50" name="BFEIGHT" x="100" y="0"/>
</waypoints>
<blocks>
<block name="bombloiter" strip_button="B Loiter">
<call fun="NavSetWaypointHere(WP_TARGET)"/>
<eight center="WP_TARGET" radius="radius" turn_around="WP_BEIGHT"/>
</block>
<block name="bombhere" strip_button="B Here">
<call fun="NavSetWaypointHere(WP_TARGET)"/>
</block>
<block name="bomb"
strip_button="Bomb">
<!--<set value="WaypointX(WP_TARGET)" var="WaypointX(WP_START)"/>
<set value="WaypointY(WP_TARGET) - 100" var="WaypointY(WP_START)"/>
<set value="WaypointX(WP_TARGET)" var="WaypointX(WP_CLIMB)"/>
<set value="WaypointY(WP_TARGET) + 100" var="WaypointY(WP_CLIMB)"/>
<set value="BombComputeApproach(WP_TARGET, WP_START, nav_radius)" var="unit"/>-->
<circle radius="nav_radius" until="NavQdrCloseTo(DegOfRad(bomb_start_qdr)-10)" wp="BLEG"/>
</block>
<block name="align">
<exception cond="BombUpdateRelease(WP_TARGET)" deroute="end"/>
<go
approaching_time="bomb_trigger_delay" from="START" hmode="route" wp="RELEASE"/>
</block>
<block name="shoot">
<set value="BombShoot()" var="unit"/>
<go from="RELEASE" hmode="route" wp="BCLIMB"/>
<set value="BombCloseHatch()" var="unit"/>
<deroute block="end"/>
</block>
<block name="close">
<set value="BombCloseHatch()" var="unit"/>
<deroute block="end"/>
</block>
</blocks>
</procedure>