[Top][All Lists]

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

[Paparazzi-devel] Procedures

From: Todd Sandercock
Subject: [Paparazzi-devel] Procedures
Date: Tue, 25 Aug 2009 23:43:40 -0700 (PDT)

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

    #include "datalink.h"
    #include "bomb.h"
  <param name="alt" default_value="ground_alt+50"/>
  <param name="radius" default_value="75"/>
    <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"/>
    <block name="bombloiter" strip_button="B Loiter">
      <call fun="NavSetWaypointHere(WP_TARGET)"/>
      <eight center="WP_TARGET" radius="radius" turn_around="WP_BEIGHT"/>
    <block name="bombhere" strip_button="B Here">
      <call fun="NavSetWaypointHere(WP_TARGET)"/>
    <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 name="align">
      <exception cond="BombUpdateRelease(WP_TARGET)" deroute="end"/>
      <go approaching_time="bomb_trigger_delay" from="START" hmode="route" wp="RELEASE"/>
    <block name="shoot">
      <set value="BombShoot()" var="unit"/>
      <go from="RELEASE" hmode="route" wp="BCLIMB"/>
      <set value="BombCloseHatch()" var="unit"/>
      <deroute block="end"/>
    <block name="close">
      <set value="BombCloseHatch()" var="unit"/>
      <deroute block="end"/>

Find local businesses and services in your area with Yahoo!7 Local. Get started.
reply via email to

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