mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-31 03:57:45 +08:00
first flights with Twinstar3 and Plaster1
This commit is contained in:
+18
-13
@@ -5,8 +5,8 @@
|
||||
</section>
|
||||
<servos min="1000" neutral="1500" max="2000">
|
||||
<servo name="GAZ" no="0" min="1000" neutral="1000" max="2000"/>
|
||||
<servo name="AILEVON_RIGHT" no="5" min="1000" neutral="1500" max="2000"/>
|
||||
<servo name="AILEVON_LEFT" no="1" min="1000" neutral="1700" max="2000"/>
|
||||
<servo name="AILEVON_RIGHT" no="5" min="1800" neutral="1480" max="1200"/>
|
||||
<servo name="AILEVON_LEFT" no="1" min="1800" neutral="1480" max="1200"/>
|
||||
</servos>
|
||||
<command>
|
||||
<set servo="GAZ" value="2 * @THROTTLE"/>
|
||||
@@ -21,27 +21,28 @@
|
||||
</section>
|
||||
<section name="INFRARED" prefix="IR_">
|
||||
<define name="ROLL_NEUTRAL_DEFAULT" value="-1040"/>
|
||||
<define name="PITCH_NEUTRAL_DEFAULT" value="0"/>
|
||||
<define name="PITCH_NEUTRAL_DEFAULT" value="70"/>
|
||||
<define name="DEFAULT_CONTRAST" value="400"/>
|
||||
<define name="RAD_OF_IR_CONTRAST" value="0.6"/>
|
||||
<linear name="RollOfIrs" arity="2" coeff1="-1" coeff2="-1"/>
|
||||
<linear name="PitchOfIrs" arity="2" coeff1="-1" coeff2="1"/>
|
||||
</section>
|
||||
<section name="PID">
|
||||
<define name="ROLL_PGAIN" value="7000."/>
|
||||
<define name="ROLL_PGAIN" value="5000."/>
|
||||
<define name="PITCH_OF_ROLL" value="0.2"/>
|
||||
<define name="PITCH_PGAIN" value="10000."/>
|
||||
<define name="PITCH_PGAIN" value="7000."/>
|
||||
<define name="MAX_ROLL" value="0.4"/>
|
||||
<define name="MAX_PITCH" value="0.35"/>
|
||||
<define name="AUTO1_MAX_ROLL" value="0.8"/>
|
||||
<define name="MAX_PITCH" value="0.25"/>
|
||||
<define name="MIN_PITCH" value="-0.35"/>
|
||||
</section>
|
||||
</section>
|
||||
<section name="ALT" prefix="CLIMB_">
|
||||
<define name="PITCH_PGAIN" value="-0.1"/>
|
||||
<define name="PITCH_IGAIN" value="0.025"/>
|
||||
<define name="PITCH_PGAIN" value="-0.1"/>
|
||||
<define name="PITCH_IGAIN" value="1.0"/>
|
||||
<define name="PGAIN" value="-0.025"/>
|
||||
<define name="IGAIN" value="0.01"/>
|
||||
<define name="MAX" value="1."/>
|
||||
<define name="LEVEL_GAZ" value="0.22"/>
|
||||
<define name="LEVEL_GAZ" value="0.34"/>
|
||||
<define name="GAZ_OF_CLIMB" value="0.15" unit="% / m/s"/>
|
||||
<define name="PITCH_OF_VZ_PGAIN" value="0.00"/>
|
||||
</section>
|
||||
@@ -52,8 +53,8 @@
|
||||
</section>
|
||||
<section name="BAT" channel="3">
|
||||
<define name="MILLIAMP_PER_PERCENT" value="2.16"/>
|
||||
<define name="VOLTAGE_ADC_A" value="0.016892"/>
|
||||
<define name="VOLTAGE_ADC_B" value="0.083604"/>
|
||||
<define name="VOLTAGE_ADC_A" value="0.0139498"/>
|
||||
<define name="VOLTAGE_ADC_B" value="0.382856"/>
|
||||
<define name="VoltageOfAdc(adc)" value="(VOLTAGE_ADC_A * adc + VOLTAGE_ADC_B)"/>
|
||||
<define name="LOW_BATTERY" value="90" unit="1e-1V"/>
|
||||
</section>
|
||||
@@ -63,7 +64,7 @@
|
||||
<define name="ServosVoltageOfAdc(adc)" value="(VOLTAGE_ADC_A * adc + VOLTAGE_ADC_B)"/>
|
||||
</section>
|
||||
<section name="MISC">
|
||||
<define name="NOMINAL_AIRSPEED" value="15."/>
|
||||
<define name="NOMINAL_AIRSPEED" value="9."/>
|
||||
<define name="CARROT" value="5." unit="s"/>
|
||||
</section>
|
||||
<section name="SIMU">
|
||||
@@ -72,3 +73,7 @@
|
||||
<define name="WEIGHT" value="0.45"/>
|
||||
</section>
|
||||
</airframe>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+15
-7
@@ -1,6 +1,20 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<conf>
|
||||
<aircraft
|
||||
name="Plaster1"
|
||||
ac_id="1"
|
||||
airframe="airframes/plaster1.xml"
|
||||
radio="radios/mc3030.xml"
|
||||
flight_plan="flight_plans/ricou_pla.xml"
|
||||
/>
|
||||
<aircraft
|
||||
name="Twinstar3"
|
||||
ac_id="1"
|
||||
airframe="airframes/twinstar3.xml"
|
||||
radio="radios/mc3030.xml"
|
||||
flight_plan="flight_plans/ricou_pla.xml"
|
||||
/>
|
||||
<aircraft
|
||||
name="Morue1"
|
||||
ac_id="0"
|
||||
@@ -25,13 +39,6 @@
|
||||
flight_plan="flight_plans/muret_cam.xml"
|
||||
/>
|
||||
|
||||
<aircraft
|
||||
name="Plaster1"
|
||||
ac_id="3"
|
||||
airframe="airframes/plaster1.xml"
|
||||
radio="radios/mc3030.xml"
|
||||
flight_plan="flight_plans/muret_mini.xml"
|
||||
/>
|
||||
<aircraft
|
||||
name="Microjet"
|
||||
ac_id="1"
|
||||
@@ -40,6 +47,7 @@
|
||||
flight_plan="flight_plans/muret_mini.xml"
|
||||
/>
|
||||
|
||||
|
||||
<aircraft
|
||||
name="Gorazoptere_brushless_3DMG"
|
||||
ac_id="1"
|
||||
|
||||
@@ -122,12 +122,15 @@
|
||||
</session>
|
||||
|
||||
<session name="flight microjet multimon">
|
||||
<variable name="ivy_bus" value="127:2007"/>
|
||||
<variable name="map" value="ricouUTM.xml"/>
|
||||
<variable name="ivy_bus" value="127:2010"/>
|
||||
<program name="http server"/>
|
||||
<program name="multimon"><arg flag="-p" constant="/tmp/multimon"/></program>
|
||||
<program name="modem"><arg flag="-d" constant="/tmp/multimon"/></program>
|
||||
<program name="receive"/>
|
||||
<program name="messages"><arg flag="-c" constant="telemetry_ap:1"/><arg flag="-c" constant="ground"/></program>
|
||||
<program name="cockpit"/>
|
||||
<program name="map 2d ml"/>
|
||||
</session>
|
||||
|
||||
<session name="flight microjet multimon sim">
|
||||
|
||||
@@ -69,8 +69,6 @@ int main( void ) {
|
||||
nav_init();
|
||||
ir_init();
|
||||
estimator_init();
|
||||
uart0_init();
|
||||
|
||||
/** - start interrupt task */
|
||||
sei();
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ sub completeinit {
|
||||
ap_mode => { 'MANUAL' => 'sienna', 'AUTO1' => 'blue', 'AUTO2' => 'brown', 'HOME' => 'red'},
|
||||
rc_status => {'OK' => 'brown', 'LOST' => 'orange', 'REALLY_LOST' => 'red'},
|
||||
rc_mode => {'AUTO'=> 'orange', 'MANUAL' => 'brown', 'FAILSAFE' => 'red'},
|
||||
contrast_status => {'DEFAULT' => 'orange', 'WAITING' => 'brown', 'SET' => 'set'},
|
||||
contrast_status => {'DEFAULT' => 'orange', 'WAITING' => 'brown', 'SET' => 'green'},
|
||||
gps_mode => {'NOFIX' => 'red', 'DRO' => 'red', '2D' => 'orange', '3D' => 'brown', 'GPSDRO' => 'red'},
|
||||
};
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
*)
|
||||
|
||||
open Printf
|
||||
open Srtm
|
||||
open Latlong
|
||||
|
||||
module Ground_Pprz = Pprz.Protocol(struct let name = "ground" end)
|
||||
@@ -39,7 +38,7 @@ module G = MapCanvas
|
||||
|
||||
let home = Env.paparazzi_home
|
||||
let (//) = Filename.concat
|
||||
let default_path_SRTM = home // "data" // "SRTM"
|
||||
let default_path_srtm = home // "data" // "srtm"
|
||||
let default_path_maps = home // "data" // "maps" // ""
|
||||
let default_path_missions = home // "conf"
|
||||
|
||||
@@ -138,7 +137,12 @@ let aircraft_pos_msg = fun track utm_x_ utm_y_ heading altitude ->
|
||||
| Some utm0 ->
|
||||
let en = {G.east = utm_x_ -. utm0.utm_x; north = utm_y_ -. utm0.utm_y } in
|
||||
track#add_point en;
|
||||
let h = Srtm.of_utm { utm_zone = utm0.utm_zone; utm_x = utm_x_; utm_y = utm_y_} in
|
||||
let h =
|
||||
try
|
||||
Srtm.of_utm { utm_zone = utm0.utm_zone; utm_x = utm_x_; utm_y = utm_y_}
|
||||
with
|
||||
_ -> truncate altitude
|
||||
in
|
||||
track#move_icon en heading altitude (float_of_int h)
|
||||
|
||||
let carrot_pos_msg = fun track utm_x utm_y ->
|
||||
@@ -312,9 +316,7 @@ let _ =
|
||||
Ivy.init "Paparazzi map 2D" "READY" (fun _ _ -> ());
|
||||
Ivy.start !ivy_bus;
|
||||
|
||||
Srtm.add_path default_path_SRTM;
|
||||
|
||||
Srtm.add_path (Env.paparazzi_home ^ "/data/srtm");
|
||||
Srtm.add_path default_path_srtm;
|
||||
|
||||
let window = GWindow.window ~title: "Map2d" ~border_width:1 ~width:400 () in
|
||||
let vbox= GPack.vbox ~packing: window#add () in
|
||||
|
||||
@@ -476,7 +476,7 @@ let send_config = fun _asker args ->
|
||||
try
|
||||
let conf = ExtXml.child conf_xml "aircraft" ~select:(fun x -> ExtXml.attrib x "ac_id" = ac_id) in
|
||||
let ac_name = ExtXml.attrib conf "name" in
|
||||
let prefix = fun s -> sprintf "http://%s:8889/%s" (Unix.gethostname ()) s in
|
||||
let prefix = fun s -> sprintf "http://%s:8889/%s" "localhost" s in
|
||||
(** Expanded flight plan has been compiled in var/ *)
|
||||
let fp = prefix ("var" // ac_name // "flight_plan.xml")
|
||||
and af = prefix ("conf" // ExtXml.attrib conf "airframe")
|
||||
|
||||
@@ -20,6 +20,7 @@ sub completeinit {
|
||||
my $self = shift;
|
||||
$self->SUPER::completeinit();
|
||||
my $airframe_url = $self->get('-url');
|
||||
print "airframe url $airframe_url\n";
|
||||
my $airframe_xml = LWP::Simple::get($airframe_url);
|
||||
$self->parse_airframe($airframe_xml) if defined $airframe_xml;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user