mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-26 16:30:07 +08:00
Prettier ...
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
<flight_plan alt="75" ground_alt="0" lat0="43.4622" lon0="1.2729" max_dist_from_home="1500" name="Basic" qfu="270" security_height="25">
|
||||
<header>
|
||||
#include "nav_line.h"
|
||||
#include "datalink.h"
|
||||
</header>
|
||||
<waypoints>
|
||||
<waypoint name="HOME" x="0" y="0"/>
|
||||
@@ -18,6 +19,9 @@
|
||||
<waypoint name="BASELEG" x="26.9" y="-23.0"/>
|
||||
<waypoint name="CLIMB" x="-122.5" y="35.4"/>
|
||||
</waypoints>
|
||||
<exceptions>
|
||||
<exception cond="datalink_time > 22" deroute="Standby"/>
|
||||
</exceptions>
|
||||
<blocks>
|
||||
<block name="Wait GPS">
|
||||
<set value="1" var="kill_throttle"/>
|
||||
@@ -27,11 +31,11 @@
|
||||
<while cond="LessThan(NavBlockTime(), 10)"/>
|
||||
<call fun="NavSetGroundReferenceHere()"/>
|
||||
</block>
|
||||
<block name="Kill">
|
||||
<block name="Holding point">
|
||||
<set value="1" var="kill_throttle"/>
|
||||
<attitude roll="0" throttle="0" vmode="throttle"/>
|
||||
</block>
|
||||
<block name="Takeoff" strip_icon="takeoff.png" strip_button="Takeoff">
|
||||
<block name="Takeoff" strip_icon="takeoff.png" strip_button="Takeoff (wp CLIMB)">
|
||||
<exception cond="estimator_z > ground_alt+25" deroute="Standby"/>
|
||||
<set value="0" var="kill_throttle"/>
|
||||
<set value="0" var="estimator_flight_time"/>
|
||||
@@ -40,10 +44,10 @@
|
||||
<block name="Standby" strip_button="Standby" strip_icon="home.png">
|
||||
<circle radius="nav_radius" wp="STDBY"/>
|
||||
</block>
|
||||
<block name="Figure 8 around wp 1" strip_button="Figure 8" strip_icon="eight.png">
|
||||
<block name="Figure 8 around wp 1" strip_button="Figure 8 (wp 1-2)" strip_icon="eight.png">
|
||||
<eight center="1" radius="nav_radius" turn_around="2"/>
|
||||
</block>
|
||||
<block name="Oval 1-2" strip_button="Oval" strip_icon="oval.png">
|
||||
<block name="Oval 1-2" strip_button="Oval (wp 1-2)" strip_icon="oval.png">
|
||||
<oval p1="1" p2="2" radius="nav_radius"/>
|
||||
</block>
|
||||
<block name="MOB" strip_button="Turn around here" strip_icon="mob.png">
|
||||
@@ -51,18 +55,18 @@
|
||||
<set value="DEFAULT_CIRCLE_RADIUS" var="nav_radius"/>
|
||||
<circle radius="nav_radius" wp="MOB"/>
|
||||
</block>
|
||||
<block name="Line 1-2" strip_button="Line 1-2" strip_icon="line.png">
|
||||
<block name="Line 1-2" strip_button="Line (wp 1-2)" strip_icon="line.png">
|
||||
<call fun="nav_line_init()"/>
|
||||
<call fun="nav_line(WP_1, WP_2, nav_radius)"/>
|
||||
</block>
|
||||
<block name="Survey S1-S2" strip_button="Survey" strip_icon="survey.png">
|
||||
<block name="Survey S1-S2" strip_button="Survey (wp S1-S2)" strip_icon="survey.png">
|
||||
<survey_rectangle grid="150" wp1="S1" wp2="S2"/>
|
||||
</block>
|
||||
<block name="Land Right AF-TD" strip_button="Land right" strip_icon="land-right.png">
|
||||
<block name="Land Right AF-TD" strip_button="Land right (wp AF-TD)" strip_icon="land-right.png">
|
||||
<set value="DEFAULT_CIRCLE_RADIUS" var="nav_radius"/>
|
||||
<deroute block="land"/>
|
||||
</block>
|
||||
<block name="Land Left AF-TD" strip_button="Land left" strip_icon="land-left.png">
|
||||
<block name="Land Left AF-TD" strip_button="Land left (wp AF-TD)" strip_icon="land-left.png">
|
||||
<set value="-DEFAULT_CIRCLE_RADIUS" var="nav_radius"/>
|
||||
<deroute block="land"/>
|
||||
</block>
|
||||
|
||||
@@ -39,25 +39,25 @@
|
||||
<while cond="LessThan(NavBlockTime(), 10)"/>
|
||||
<call fun="NavSetGroundReferenceHere()"/>
|
||||
</block>
|
||||
<block name="Kill">
|
||||
<block name="Holding point">
|
||||
<set value="1" var="kill_throttle"/>
|
||||
<attitude roll="0" throttle="0" vmode="throttle"/>
|
||||
</block>
|
||||
<block name="Takeoff">
|
||||
<block name="Takeoff" strip_icon="takeoff.png" strip_button="Takeoff (wp CLIMB)">
|
||||
<exception cond="estimator_z > ground_alt+25" deroute="Standby"/>
|
||||
<set value="0" var="kill_throttle"/>
|
||||
<go wp="CLIMB"/>
|
||||
</block>
|
||||
<block name="Standby" strip_button="Standby">
|
||||
<block name="Standby" strip_button="Standby" strip_icon="home.png">
|
||||
<circle radius="nav_radius" wp="STDBY"/>
|
||||
</block>
|
||||
<block name="Figure 8 around wp 1">
|
||||
<block name="Figure 8 around wp 1" strip_button="Figure 8 (wp 1-2)" strip_icon="eight.png">
|
||||
<eight center="1" radius="nav_radius" turn_around="2"/>
|
||||
</block>
|
||||
<block name="Oval 1-2">
|
||||
<block name="Oval 1-2" strip_button="Oval (wp 1-2)" strip_icon="oval.png">
|
||||
<oval p1="1" p2="2" radius="nav_radius"/>
|
||||
</block>
|
||||
<block name="MOB" strip_button="MOB">
|
||||
<block name="MOB" strip_button="Turn around here" strip_icon="mob.png">
|
||||
<call fun="NavSetWaypointHere(WP_MOB)"/>
|
||||
<circle radius="100" wp="MOB"/>
|
||||
</block>
|
||||
@@ -76,7 +76,7 @@
|
||||
<block name="Climb nav_climb m/s">
|
||||
<circle climb="nav_climb" radius="nav_radius" until="(10 > PowerVoltage()) || (estimator_z > ground_alt+ 1350)" vmode="climb" wp="1"/>
|
||||
</block>
|
||||
<block name="Descent 0% throttle" strip_button="Descent">
|
||||
<block name="Descent 0% throttle">
|
||||
<circle pitch="-5" radius="50+(estimator_z-ground_alt)/2" throttle="0.0" until="ground_alt+50 > estimator_z" vmode="throttle" wp="1"/>
|
||||
<deroute block="Standby"/>
|
||||
</block>
|
||||
@@ -96,14 +96,14 @@
|
||||
<go from="1" hmode="route" vmode="glide" wp="2"/>
|
||||
<deroute block="Standby"/>
|
||||
</block>
|
||||
<block name="Survey S1-S2">
|
||||
<block name="Survey S1-S2" strip_button="Survey (wp S1-S2)" strip_icon="survey.png">
|
||||
<survey_rectangle grid="150" wp1="S1" wp2="S2"/>
|
||||
</block>
|
||||
<block name="Land Right AF-TD">
|
||||
<block name="Land Right AF-TD" strip_button="Land right (wp AF-TD)" strip_icon="land-right.png">
|
||||
<set value="DEFAULT_CIRCLE_RADIUS" var="nav_radius"/>
|
||||
<deroute block="land"/>
|
||||
</block>
|
||||
<block name="Land Left AF-TD">
|
||||
<block name="Land Left AF-TD" strip_button="Land left (wp AF-TD)" strip_icon="land-left.png">
|
||||
<set value="-DEFAULT_CIRCLE_RADIUS" var="nav_radius"/>
|
||||
<deroute block="land"/>
|
||||
</block>
|
||||
@@ -139,7 +139,7 @@
|
||||
<attitude alt="250" pitch="-10" roll="0.0" until=" stage_time > 2" vmode="alt"/>
|
||||
</while>
|
||||
</block>
|
||||
<block name="Heading 30°">
|
||||
<block name="Heading 30°">
|
||||
<heading alt="ground_alt+50" course="30" until="FALSE"/>
|
||||
</block>
|
||||
<block name="For loop (circles wp 1)">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<rows>
|
||||
<widget size="500" name="map2d"/>
|
||||
<columns>
|
||||
<rows size="400">
|
||||
<rows size="375">
|
||||
<widget size="200" name="strips"/>
|
||||
</rows>
|
||||
<widget size="400" name="aircraft"/>
|
||||
|
||||
@@ -144,6 +144,7 @@
|
||||
|
||||
<child>
|
||||
<widget class="GtkFrame" id="frame3">
|
||||
<property name="width_request">53</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="label_yalign">0.5</property>
|
||||
@@ -177,7 +178,7 @@
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label_mode">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">AUTO2</property>
|
||||
<property name="label" translatable="yes"><b>AUTO2</b></property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
@@ -1059,6 +1060,7 @@
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label_block_name">
|
||||
<property name="width_request">85</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"><i>N/A</i></property>
|
||||
<property name="use_underline">False</property>
|
||||
|
||||
@@ -822,7 +822,8 @@ let listen_flight_params = fun geomap auto_center_new_ac alert ->
|
||||
if ap_mode <> ac.last_ap_mode then begin
|
||||
log_and_say alert ac.ac_name (sprintf "%s, %s" ac.ac_name ap_mode);
|
||||
ac.last_ap_mode <- ap_mode;
|
||||
ac.strip#set_label "AP" (Pprz.string_assoc "ap_mode" vs);
|
||||
let label = Pprz.string_assoc "ap_mode" vs in
|
||||
ac.strip#set_label "AP" (if label="MANUAL" then "MANU" else label);
|
||||
let color =
|
||||
match ap_mode with
|
||||
"AUTO2" -> ok_color
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
*)
|
||||
|
||||
open Printf
|
||||
module LL=Latlong
|
||||
|
||||
let (//) = Filename.concat
|
||||
|
||||
@@ -123,7 +124,14 @@ class gauge = fun ?(color="green") ?(history_len=50) gauge v_min v_max ->
|
||||
let fh = 0.8 *. float w in
|
||||
let x = truncate (cos angle_rad *. fh)
|
||||
and y = - truncate (sin angle_rad *. fh) in
|
||||
let l = [w/10, h/2; w/10+x,h/2+y] in
|
||||
let a = -.angle_rad +. 5. *. LL.pi /. 6.
|
||||
and a' = -.angle_rad -. 5. *. LL.pi /. 6.
|
||||
and al = 0.2 *. fh in
|
||||
let ax = truncate (cos a *. al)
|
||||
and ay = truncate (sin a *. al) in
|
||||
let ax' = truncate (cos a' *. al)
|
||||
and ay' = truncate (sin a' *. al) in
|
||||
let l = [w/10, h/2; w/10+x,h/2+y; w/10+x+ax,h/2+y+ay; w/10+x,h/2+y; w/10+x+ax',h/2+y+ay'] in
|
||||
dr#set_foreground `BLACK;
|
||||
dr#lines l
|
||||
end;
|
||||
|
||||
Reference in New Issue
Block a user