paparazzi-devel
[Top][All Lists]
Advanced

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

Re: [Paparazzi-devel] Procedures


From: Todd Sandercock
Subject: Re: [Paparazzi-devel] Procedures
Date: Wed, 26 Aug 2009 01:32:38 -0700 (PDT)

Oh and the stuff that i have written won't compile for some reason.

Todd


From: Todd Sandercock <address@hidden>
To: Paparazzi Development <address@hidden>
Sent: Wednesday, 26 August, 2009 4:13:40 PM
Subject: [Paparazzi-devel] Procedures

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>


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


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]