mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-04 13:55:40 +08:00
*** empty log message ***
This commit is contained in:
@@ -104,6 +104,8 @@
|
||||
<define name="CONTROL_RATE" value="60" unit="Hz"/>
|
||||
<define name="XBEE_INIT" value="\"ATPL2\rATRN1\rATTT80\r\""/>
|
||||
<define name="ALT_KALMAN_ENABLED" value="TRUE"/>
|
||||
|
||||
<define name="TRIGGER_DELAY" value="1."/>
|
||||
</section>
|
||||
|
||||
<section name="VERTICAL CONTROL" prefix="V_CTL_">
|
||||
@@ -116,7 +118,7 @@
|
||||
<define name="AUTO_THROTTLE_NOMINAL_CRUISE_THROTTLE" value="0.35"/>
|
||||
<define name="AUTO_THROTTLE_MIN_CRUISE_THROTTLE" value="0.30"/>
|
||||
<define name="AUTO_THROTTLE_MAX_CRUISE_THROTTLE" value="0.80"/>
|
||||
<define name="AUTO_THROTTLE_LOITER_TRIM" value="1000"/>
|
||||
<define name="AUTO_THROTTLE_LOITER_TRIM" value="1500"/>
|
||||
<define name="AUTO_THROTTLE_DASH_TRIM" value="-1000"/>
|
||||
<define name="AUTO_THROTTLE_CLIMB_THROTTLE_INCREMENT" value="0.15" unit="%/(m/s)"/>
|
||||
<define name="AUTO_THROTTLE_PGAIN" value="-0.01"/>
|
||||
|
||||
@@ -73,9 +73,9 @@
|
||||
|
||||
<define name="ESTIMATED_PHI_PI_4" value="0.55"/>
|
||||
|
||||
<define name="360_LATERAL_CORRECTION" value="1."/>
|
||||
<define name="360_LONGITUDINAL_CORRECTION" value="1."/>
|
||||
<define name="360_VERTICAL_CORRECTION" value="1.5"/>
|
||||
<define name="360_LATERAL_CORRECTION" value="1.25"/>
|
||||
<define name="360_LONGITUDINAL_CORRECTION" value="1.25"/>
|
||||
<define name="360_VERTICAL_CORRECTION" value="1."/>
|
||||
</section>
|
||||
|
||||
<section name="GYRO" prefix="GYRO_">
|
||||
@@ -99,20 +99,22 @@
|
||||
<define name="CONTROL_RATE" value="60" unit="Hz"/>
|
||||
<define name="XBEE_INIT" value="\"ATPL2\rATRN1\rATTT80\r\""/>
|
||||
<define name="ALT_KALMAN_ENABLED" value="TRUE"/>
|
||||
|
||||
<define name="TRIGGER_DELAY" value="1.1"/>
|
||||
</section>
|
||||
|
||||
<section name="VERTICAL CONTROL" prefix="V_CTL_">
|
||||
<!-- outer loop proportional gain -->
|
||||
<define name="ALTITUDE_PGAIN" value="-0.065"/>
|
||||
<define name="ALTITUDE_PGAIN" value="-0.045"/>
|
||||
<!-- outer loop saturation -->
|
||||
<define name="ALTITUDE_MAX_CLIMB" value="3."/>
|
||||
|
||||
<!-- auto throttle inner loop -->
|
||||
<define name="AUTO_THROTTLE_NOMINAL_CRUISE_THROTTLE" value="0.65"/>
|
||||
<define name="AUTO_THROTTLE_MIN_CRUISE_THROTTLE" value=".4"/>
|
||||
<define name="AUTO_THROTTLE_NOMINAL_CRUISE_THROTTLE" value="0.60"/>
|
||||
<define name="AUTO_THROTTLE_MIN_CRUISE_THROTTLE" value=".45"/>
|
||||
<define name="AUTO_THROTTLE_MAX_CRUISE_THROTTLE" value="1"/>
|
||||
<define name="AUTO_THROTTLE_LOITER_TRIM" value="1000"/>
|
||||
<define name="AUTO_THROTTLE_DASH_TRIM" value="-2500"/>
|
||||
<define name="AUTO_THROTTLE_LOITER_TRIM" value="2000"/>
|
||||
<define name="AUTO_THROTTLE_DASH_TRIM" value="-1500"/>
|
||||
<define name="AUTO_THROTTLE_CLIMB_THROTTLE_INCREMENT" value="0.15" unit="%/(m/s)"/>
|
||||
<define name="AUTO_THROTTLE_PGAIN" value="-0.008"/>
|
||||
<define name="AUTO_THROTTLE_IGAIN" value="0.25"/>
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
</dl_settings>
|
||||
|
||||
<dl_settings NAME="attitude">
|
||||
<dl_setting MAX="15000" MIN="1000" STEP="250" VAR="h_ctl_roll_pgain" shortname="roll_pgain"/>
|
||||
<dl_setting MAX="-1000" MIN="-15000" STEP="250" VAR="h_ctl_pitch_pgain" shortname="pitch_pgain"/>
|
||||
<dl_setting MAX="15000" MIN="000" STEP="250" VAR="h_ctl_roll_pgain" shortname="roll_pgain"/>
|
||||
<dl_setting MAX="000" MIN="-15000" STEP="250" VAR="h_ctl_pitch_pgain" shortname="pitch_pgain"/>
|
||||
<dl_setting MAX="2" MIN="0." STEP="0.1" VAR="h_ctl_pitch_dgain" shortname="pitch_dgain"/>
|
||||
<dl_setting MAX="5000" MIN="0" STEP="100" VAR="h_ctl_elevator_of_roll" shortname="elevator_of_roll"/>
|
||||
<dl_setting MAX="5000" MIN="0" STEP="100" VAR="h_ctl_aileron_of_throttle" shortname="aileron_of_throttle"/>
|
||||
@@ -52,14 +52,15 @@
|
||||
|
||||
<dl_settings name="auto_throttle">
|
||||
<dl_setting MAX="0.9" MIN="0.3" STEP="0.05" VAR="v_ctl_auto_throttle_cruise_throttle" shortname="cruise throttle">
|
||||
<strip_button name="Dash" value="0.8"/>
|
||||
<strip_button name="Loiter" value="0.3"/>
|
||||
<strip_button name="Dash" value="1"/>
|
||||
<strip_button name="Loiter" value="0.45"/>
|
||||
<strip_button name="Cruise" value="0.6"/>
|
||||
</dl_setting>
|
||||
|
||||
|
||||
<dl_setting MAX="-0.01" MIN="-0.1" STEP="0.01" VAR="v_ctl_auto_throttle_pgain" shortname="throttle_pgain"/>
|
||||
<dl_setting MAX="1" MIN="0.05" STEP="0.05" VAR="v_ctl_auto_throttle_igain" shortname="throttle_igain"/>
|
||||
<dl_setting MAX="0" MIN="-3000" STEP="100" VAR="v_ctl_auto_throttle_dash_trim" shortname="dash trim"/>
|
||||
<dl_setting MAX="0" MIN="-4000" STEP="100" VAR="v_ctl_auto_throttle_dash_trim" shortname="dash trim"/>
|
||||
<dl_setting MIN="0" MAX="3000" STEP="100" VAR="v_ctl_auto_throttle_loiter_trim" shortname="loiter trim"/>
|
||||
<dl_setting MAX="1" MIN="0" STEP="0.01" VAR="v_ctl_auto_throttle_climb_throttle_increment" shortname="throttle_incr"/>
|
||||
</dl_settings>
|
||||
|
||||
@@ -197,7 +197,7 @@ inline static float loiter(void) {
|
||||
elevator_trim = throttle_dif / max_dif * v_ctl_auto_throttle_dash_trim;
|
||||
} else {
|
||||
float max_dif = Max(v_ctl_auto_throttle_nominal_cruise_throttle - V_CTL_AUTO_THROTTLE_MIN_CRUISE_THROTTLE, 0.1);
|
||||
elevator_trim = throttle_dif / max_dif * v_ctl_auto_throttle_loiter_trim;
|
||||
elevator_trim = - throttle_dif / max_dif * v_ctl_auto_throttle_loiter_trim;
|
||||
}
|
||||
|
||||
float max_change = (v_ctl_auto_throttle_loiter_trim - v_ctl_auto_throttle_dash_trim) / 80.;
|
||||
|
||||
@@ -301,14 +301,14 @@ void estimator_update_state_infrared( void ) {
|
||||
|
||||
} else { /* 360° estimation */
|
||||
/* 250 us for the whole block */
|
||||
ir_roll *= IR_360_LATERAL_CORRECTION;
|
||||
ir_pitch *= IR_360_LONGITUDINAL_CORRECTION;
|
||||
ir_top *= IR_360_VERTICAL_CORRECTION;
|
||||
float tmp_ir_roll = ir_roll * IR_360_LATERAL_CORRECTION;
|
||||
float tmp_ir_pitch = ir_pitch * IR_360_LONGITUDINAL_CORRECTION;
|
||||
float tmp_ir_top = ir_top * IR_360_VERTICAL_CORRECTION;
|
||||
|
||||
estimator_phi = atan2(ir_roll, ir_top) - ir_roll_neutral;
|
||||
estimator_phi = atan2(tmp_ir_roll, tmp_ir_top) - ir_roll_neutral;
|
||||
estimator_phi = correct_angle(estimator_phi, ir_estimated_phi_pi_4);
|
||||
|
||||
estimator_theta = atan2(ir_pitch, ir_top) - ir_pitch_neutral;
|
||||
estimator_theta = atan2(tmp_ir_pitch, tmp_ir_top) - ir_pitch_neutral;
|
||||
estimator_theta = correct_angle(estimator_theta, ir_estimated_phi_pi_4);
|
||||
if (estimator_theta < -M_PI_2)
|
||||
estimator_theta += M_PI;
|
||||
|
||||
@@ -1,4 +1,28 @@
|
||||
(************ Strip handling ***********************************************)
|
||||
(*
|
||||
* $Id$
|
||||
*
|
||||
* Strip handling
|
||||
*
|
||||
* Copyright (C) 2006 ENAC, Pascal Brisset, Antoine Drouin
|
||||
*
|
||||
* This file is part of paparazzi.
|
||||
*
|
||||
* paparazzi is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* paparazzi is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with paparazzi; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*
|
||||
*)
|
||||
|
||||
let bat_max = 12.5
|
||||
let bat_min = 9.
|
||||
@@ -45,7 +69,8 @@ let add config color select center_ac commit_moves mark =
|
||||
let tooltips = GData.tooltips () in
|
||||
|
||||
(* frame of the strip *)
|
||||
let frame = GBin.frame ~shadow_type: `IN ~packing: (widget#attach ~top: (strip_number) ~left: 0) () in
|
||||
let strip_ebox = GBin.event_box ~packing:(widget#attach ~top:strip_number ~left:0) () in
|
||||
let frame = GBin.frame ~shadow_type: `IN ~packing:strip_ebox#add () in
|
||||
let framevb = GPack.vbox ~packing:frame#add () in
|
||||
|
||||
(** Table (everything except the user buttons) *)
|
||||
@@ -60,7 +85,7 @@ let add config color select center_ac commit_moves mark =
|
||||
|
||||
let plane_color = GBin.event_box ~packing:(strip#attach ~top:0 ~left:1 ~right:columns) () in
|
||||
plane_color#coerce#misc#modify_bg [`NORMAL, `NAME color];
|
||||
ignore (plane_color#event#connect#button_press ~callback:(fun _ -> select (); true));
|
||||
ignore (strip_ebox#event#connect#button_press ~callback:(fun _ -> select (); true));
|
||||
let h = GPack.hbox ~packing:plane_color#add () in
|
||||
let ft = GMisc.label ~text: "00:00:00" ~packing:h#add () in
|
||||
ft#set_width_chars 8;
|
||||
|
||||
@@ -98,10 +98,21 @@ class waypoint = fun (wpts_group:group) (name :string) ?(alt=0.) wgs84 ->
|
||||
let wgs84 = self#pos in
|
||||
let s = sprintf "WGS84 %s" (geomap#geo_string wgs84) in
|
||||
let ename = GEdit.entry ~text:name ~editable ~packing:dvbx#add () in
|
||||
let e_pos = GEdit.entry ~text:s ~packing:dvbx#add () in
|
||||
let hbox = GPack.hbox ~packing:dvbx#add () in
|
||||
let optmenu = GMenu.option_menu ~packing:hbox#add () in
|
||||
|
||||
(***
|
||||
let menu = in
|
||||
optmenu#set_menu menu;
|
||||
***)
|
||||
|
||||
|
||||
let e_pos = GEdit.entry ~text:s ~packing:hbox#add () in
|
||||
let ha = GPack.hbox ~packing:dvbx#add () in
|
||||
let minus10= GButton.button ~label:"-10" ~packing:ha#add () in
|
||||
let ea = GEdit.entry ~text:(string_of_float alt) ~packing:ha#add () in
|
||||
let agl = alt -. float (try Srtm.of_wgs84 wgs84 with _ -> 0) in
|
||||
let agl_lab = GMisc.label ~text:(sprintf " AGL: %4.0fm" agl) ~packing:ha#add () in
|
||||
let plus10= GButton.button ~label:"+10" ~packing:ha#add () in
|
||||
let change_alt = fun x ->
|
||||
ea#set_text (string_of_float (float_of_string ea#text +. x)) in
|
||||
@@ -128,6 +139,7 @@ class waypoint = fun (wpts_group:group) (name :string) ?(alt=0.) wgs84 ->
|
||||
let cancel = GButton.button ~stock:`CANCEL ~packing: dhbx#add () in
|
||||
let destroy = fun () ->
|
||||
self#reset_moved ();
|
||||
wpt_group#lower_to_bottom ();
|
||||
dialog#destroy () in
|
||||
ignore(cancel#connect#clicked ~callback:destroy);
|
||||
|
||||
@@ -146,7 +158,19 @@ class waypoint = fun (wpts_group:group) (name :string) ?(alt=0.) wgs84 ->
|
||||
(fun e -> ignore (e#connect#activate ~callback))
|
||||
[ename; e_pos; ea];
|
||||
ok#grab_default ();
|
||||
|
||||
ignore(ok#connect#clicked ~callback:(fun _ -> callback (); dialog#destroy ()));
|
||||
|
||||
(* Update AGL on pos or alt change *)
|
||||
let callback = fun _ ->
|
||||
try
|
||||
let wgs84 = LL.of_string e_pos#text in
|
||||
let agl = float_of_string ea#text -. float (try Srtm.of_wgs84 wgs84 with _ -> 0) in
|
||||
agl_lab#set_text (sprintf " AGL: %4.0fm" agl)
|
||||
with _ -> ()
|
||||
in
|
||||
ignore (ea#connect#changed ~callback);
|
||||
ignore (e_pos#connect#changed ~callback);
|
||||
dialog#show ()
|
||||
|
||||
val mutable motion = false
|
||||
|
||||
Reference in New Issue
Block a user