Hi.
I use the integrated functions i found in one flight plan and then i
experimented a bit.
Here is the code i use and so far it works ok.
Also have a look to the "slayer_training.xml" flight plan.
<block name="Bomb Right" strip_button="Bomb R" strip_icon="kill.png">
<set value="DEFAULT_CIRCLE_RADIUS" var="nav_radius"/>
<deroute block="bomb"/>
</block>
<block name="Bomb Left" strip_button="Bomb L"strip_icon="kill.png">
<set value="-DEFAULT_CIRCLE_RADIUS" var="nav_radius"/>
<deroute block="bomb"/>
</block>
<block name="bomb">
<call fun="BombComputeApproach(WP_TARGET, WP_START, nav_radius)"/>
<circle radius="nav_radius" until="NavCircleCount() > 0.5"
wp="BASELEG"/>
<circle radius="nav_radius"
until="NavQdrCloseTo(DegOfRad(bomb_start_qdr)-10)" wp="BASELEG"/>
</block>
<block name="align">
<exception cond="BombUpdateRelease(WP_TARGET)" deroute="standby"/>
<go approaching_time="bomb_trigger_delay" from="START"
hmode="route" wp="RELEASE"/>
</block>
<block name="shoot">
<set value="BombShoot()" var="unit"/> <go approaching_time="0"
from="RELEASE" hmode="route" wp="CLIMB" alt="ground_alt+100" />
<set value="BombCloseHatch()" var="unit"/> <deroute
block="standby"/>
</block>
_______________________________________________
Paparazzi-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/paparazzi-devel