mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-05 06:54:49 +08:00
*** empty log message ***
This commit is contained in:
@@ -105,3 +105,7 @@ manque gerbmerge dans les dependance??? ha non ca n'existe pas... a packager !
|
|||||||
> - It's strange MIN_HEIGHT_CARROT and MAX_HEIGHT_CARROT are in the
|
> - It's strange MIN_HEIGHT_CARROT and MAX_HEIGHT_CARROT are in the
|
||||||
>code. Shouldn't it be in a conf file so as to change it ?
|
>code. Shouldn't it be in a conf file so as to change it ?
|
||||||
>
|
>
|
||||||
|
- In the same way, MIN_SPEED_FOR_TAKEOFF should be in the airframe
|
||||||
|
conf file ?
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+12
-11
@@ -15,12 +15,12 @@
|
|||||||
<variable name="fbw_serial_port" value="/dev/ttyS1"/>
|
<variable name="fbw_serial_port" value="/dev/ttyS1"/>
|
||||||
<variable name="ap_serial_port" value="/dev/ttyS0"/>
|
<variable name="ap_serial_port" value="/dev/ttyS0"/>
|
||||||
<variable name="ivy_bus" value="127.25.255.255:2009"/>
|
<variable name="ivy_bus" value="127.25.255.255:2009"/>
|
||||||
<variable name="map" value="maps/muret_UTM.xml"/>
|
<variable name="map" value="muret_UTM.xml"/>
|
||||||
<variable name="flight_plan" value="flight_plans/muret1.xml"/>
|
<variable name="flight_plan" value="flight_plans/muret1.xml"/>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section name="programs">
|
<section name="programs">
|
||||||
<program name="receive" command="sw/ground_segment/tmtc/receive.opt">
|
<program name="receive" command="sw/ground_segment/tmtc/receive">
|
||||||
<arg flag="-b" variable="ivy_bus"/>
|
<arg flag="-b" variable="ivy_bus"/>
|
||||||
</program>
|
</program>
|
||||||
<program name="cockpit" command="sw/ground_segment/cockpit/cockpit.pl">
|
<program name="cockpit" command="sw/ground_segment/cockpit/cockpit.pl">
|
||||||
@@ -33,10 +33,11 @@
|
|||||||
<arg flag="-f" variable="flight_plan"/>
|
<arg flag="-f" variable="flight_plan"/>
|
||||||
<arg flag="-r" variable="render"/>
|
<arg flag="-r" variable="render"/>
|
||||||
</program>
|
</program>
|
||||||
<program name="map 2d ml" command="sw/ground_segment/cockpit/map2d.out">
|
<program name="map 2d ml" command="sw/ground_segment/cockpit/map2d">
|
||||||
<arg flag="-b" variable="ivy_bus"/>
|
<arg flag="-b" variable="ivy_bus"/>
|
||||||
|
<arg flag="-m" variable="map"/>
|
||||||
</program>
|
</program>
|
||||||
<program name="map 3d" command="sw/ground_segment/visu3d/mapGL.opt">
|
<program name="map 3d" command="sw/ground_segment/visu3d/mapGL">
|
||||||
<arg flag="-b" variable="ivy_bus"/>
|
<arg flag="-b" variable="ivy_bus"/>
|
||||||
<arg flag="-m" variable="map"/>
|
<arg flag="-m" variable="map"/>
|
||||||
<arg flag="-f" variable="flight_plan"/>
|
<arg flag="-f" variable="flight_plan"/>
|
||||||
@@ -46,27 +47,27 @@
|
|||||||
<arg flag="-m" variable="map"/>
|
<arg flag="-m" variable="map"/>
|
||||||
<arg flag="-f" variable="flight_plan"/>
|
<arg flag="-f" variable="flight_plan"/>
|
||||||
</program>
|
</program>
|
||||||
<program name="messages" command="sw/ground_segment/tmtc/messages.opt">
|
<program name="messages" command="sw/ground_segment/tmtc/messages">
|
||||||
<arg flag="-b" variable="ivy_bus"/>
|
<arg flag="-b" variable="ivy_bus"/>
|
||||||
</program>
|
</program>
|
||||||
<program name="speech" command="sw/ground_segment/speech/paparazzi_speak.pl">
|
<program name="speech" command="sw/ground_segment/speech/paparazzi_speak.pl">
|
||||||
<arg flag="-b" variable="ivy_bus"/>
|
<arg flag="-b" variable="ivy_bus"/>
|
||||||
<!-- <arg flag="-t" variable="paparazzi_home"/> -->
|
<!-- <arg flag="-t" variable="paparazzi_home"/> -->
|
||||||
</program>
|
</program>
|
||||||
<program name="wind" command ="sw/ground_segment/wind/wind.opt"><arg flag="-b" variable="ivy_bus"/></program>
|
<program name="wind" command ="sw/ground_segment/wind/wind"><arg flag="-b" variable="ivy_bus"/></program>
|
||||||
<program name="plot" command ="sw/logalizer/plot.pl"/>
|
<program name="plot" command ="sw/logalizer/plot.pl"/>
|
||||||
<program name="play" command="sw/logalizer/play.opt">
|
<program name="play" command="sw/logalizer/play">
|
||||||
<arg flag="-b" variable="ivy_bus"/>
|
<arg flag="-b" variable="ivy_bus"/>
|
||||||
</program>
|
</program>
|
||||||
<program name="sim" command="sw/simulator/simsitl.pl">
|
<program name="sim" command="sw/simulator/simsitl.pl">
|
||||||
<arg flag="-b" variable="ivy_bus"/>
|
<arg flag="-b" variable="ivy_bus"/>
|
||||||
</program>
|
</program>
|
||||||
<program name="hitl" command="sw/simulator/simhitl.out">
|
<program name="hitl" command="sw/simulator/simhitl">
|
||||||
<arg flag="-fbw" variable="fbw_serial_port"/>
|
<arg flag="-fbw" variable="fbw_serial_port"/>
|
||||||
<arg flag="-ap" variable="ap_serial_port"/>
|
<arg flag="-ap" variable="ap_serial_port"/>
|
||||||
</program>
|
</program>
|
||||||
<program name="configurator" command="sw/configurator/configurator"/>
|
<program name="configurator" command="sw/configurator/configurator"/>
|
||||||
<program name="medit" command="sw/configurator/medit.out"/>
|
<program name="medit" command="sw/configurator/medit"/>
|
||||||
<program name="make aircraft" command="sw/configurator/configurator"/>
|
<program name="make aircraft" command="sw/configurator/configurator"/>
|
||||||
|
|
||||||
|
|
||||||
@@ -80,7 +81,7 @@
|
|||||||
<program name="sim"><arg flag="-a" constant="Thon1"/></program>
|
<program name="sim"><arg flag="-a" constant="Thon1"/></program>
|
||||||
<program name="sim"><arg flag="-a" constant="Thon2"/></program>
|
<program name="sim"><arg flag="-a" constant="Thon2"/></program>
|
||||||
<program name="cockpit"/>
|
<program name="cockpit"/>
|
||||||
<program name="map 2d"/>
|
<program name="map 2d ml"/>
|
||||||
<program name="map 3d"/>
|
<program name="map 3d"/>
|
||||||
</session>
|
</session>
|
||||||
|
|
||||||
@@ -89,7 +90,7 @@
|
|||||||
<program name="receive"/>
|
<program name="receive"/>
|
||||||
<program name="sim"><arg flag="-a" constant="Thon1"/></program>
|
<program name="sim"><arg flag="-a" constant="Thon1"/></program>
|
||||||
<program name="cockpit"/>
|
<program name="cockpit"/>
|
||||||
<program name="map 2d"/>
|
<program name="map 2d ml"/>
|
||||||
<program name="wind"/>
|
<program name="wind"/>
|
||||||
</session>
|
</session>
|
||||||
|
|
||||||
|
|||||||
+2
-4
@@ -287,7 +287,8 @@ twinstar2 POSITION_UTM 10 10
|
|||||||
<field name="flight_time" type="uint32"/>
|
<field name="flight_time" type="uint32"/>
|
||||||
<field name="block_time" type="uint32"/>
|
<field name="block_time" type="uint32"/>
|
||||||
<field name="stage_time" type="uint32"/>
|
<field name="stage_time" type="uint32"/>
|
||||||
|
<field name="target_east" type="float" unit="m"/>
|
||||||
|
<field name="target_north" type="float" unit="m"/>
|
||||||
</message>
|
</message>
|
||||||
|
|
||||||
<message name="ENGINE_STATUS" ID="0x07">
|
<message name="ENGINE_STATUS" ID="0x07">
|
||||||
@@ -332,9 +333,6 @@ twinstar2 POSITION_UTM 10 10
|
|||||||
<field name="airframe" type="string" unit="url"/>
|
<field name="airframe" type="string" unit="url"/>
|
||||||
<field name="rc_tx" type="string" unit="url"/>
|
<field name="rc_tx" type="string" unit="url"/>
|
||||||
</message>
|
</message>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</class>
|
</class>
|
||||||
|
|
||||||
</protocol>
|
</protocol>
|
||||||
|
|||||||
@@ -115,6 +115,13 @@ let aircraft_pos_msg = fun track utm_x utm_y heading ->
|
|||||||
track#add_point en;
|
track#add_point en;
|
||||||
track#move_icon en heading
|
track#move_icon en heading
|
||||||
|
|
||||||
|
let carrot_pos_msg = fun track x y ->
|
||||||
|
match !map_ref with
|
||||||
|
None -> ()
|
||||||
|
| Some utm0 ->
|
||||||
|
let en = {G.east = x; north = y } in
|
||||||
|
track#move_carrot en
|
||||||
|
|
||||||
let new_color =
|
let new_color =
|
||||||
let colors = ref ["red"; "blue"; "green"] in
|
let colors = ref ["red"; "blue"; "green"] in
|
||||||
fun () ->
|
fun () ->
|
||||||
@@ -179,6 +186,10 @@ let live_aircrafts_msg = fun (geomap:MapCanvas.widget) acs ->
|
|||||||
Ivy.bind
|
Ivy.bind
|
||||||
(fun _ args -> aircraft_pos_msg track (fos args.(0)) (fos args.(1))(fos args.(2)))
|
(fun _ args -> aircraft_pos_msg track (fos args.(0)) (fos args.(1))(fos args.(2)))
|
||||||
(sprintf "%s +FLIGHT_PARAM +[^ ]* +[^ ]* +([0-9\\.]*) +([0-9\\.]*) +[0-9\\.]* +([0-9\\.]*)" ac) in
|
(sprintf "%s +FLIGHT_PARAM +[^ ]* +[^ ]* +([0-9\\.]*) +([0-9\\.]*) +[0-9\\.]* +([0-9\\.]*)" ac) in
|
||||||
|
let b =
|
||||||
|
Ivy.bind
|
||||||
|
(fun _ args -> carrot_pos_msg track (fos args.(0)) (fos args.(1)))
|
||||||
|
(sprintf "%s +NAV_STATUS +[^ ]* +[^ ]* +[^ ]* +[^ ]* +[^ ]* +([\\-0-9\\.]*) +([\\-0-9\\.]*)" ac) in
|
||||||
Hashtbl.add live_aircrafts ac { track = track; color = color; fp_group = None }
|
Hashtbl.add live_aircrafts ac { track = track; color = color; fp_group = None }
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -78,6 +78,8 @@ type aircraft = {
|
|||||||
mutable pitch : float;
|
mutable pitch : float;
|
||||||
mutable east : float;
|
mutable east : float;
|
||||||
mutable north : float;
|
mutable north : float;
|
||||||
|
mutable desired_east : float;
|
||||||
|
mutable desired_north : float;
|
||||||
mutable gspeed : float;
|
mutable gspeed : float;
|
||||||
mutable course : float;
|
mutable course : float;
|
||||||
mutable alt : float;
|
mutable alt : float;
|
||||||
@@ -150,6 +152,9 @@ let log_and_parse = fun log ac_name a msg values ->
|
|||||||
a.course <- fvalue "course";
|
a.course <- fvalue "course";
|
||||||
a.alt <- fvalue "alt";
|
a.alt <- fvalue "alt";
|
||||||
a.climb <- fvalue "climb"
|
a.climb <- fvalue "climb"
|
||||||
|
| "DESIRED" ->
|
||||||
|
a.desired_east <- fvalue "desired_x";
|
||||||
|
a.desired_north <- fvalue "desired_y"
|
||||||
| "ATTITUDE" ->
|
| "ATTITUDE" ->
|
||||||
a.roll <- fvalue "phi";
|
a.roll <- fvalue "phi";
|
||||||
a.pitch <- fvalue "theta"
|
a.pitch <- fvalue "theta"
|
||||||
@@ -198,7 +203,7 @@ let send_aircraft_msg = fun ac ->
|
|||||||
let _, fp_msg = AcInfo_Pprz.message_of_name "FLIGHT_PARAM" in
|
let _, fp_msg = AcInfo_Pprz.message_of_name "FLIGHT_PARAM" in
|
||||||
Ivy.send (sprintf "%s %s" ac (AcInfo_Pprz.string_of_message fp_msg values));
|
Ivy.send (sprintf "%s %s" ac (AcInfo_Pprz.string_of_message fp_msg values));
|
||||||
|
|
||||||
let values = ["cur_block", Pprz.Int a.cur_block;"cur_stage", Pprz.Int a.cur_stage]
|
let values = ["cur_block", Pprz.Int a.cur_block;"cur_stage", Pprz.Int a.cur_stage; "target_east", f a.desired_east; "target_north", f a.desired_north]
|
||||||
and _, ns_msg = AcInfo_Pprz.message_of_name "NAV_STATUS" in
|
and _, ns_msg = AcInfo_Pprz.message_of_name "NAV_STATUS" in
|
||||||
Ivy.send (sprintf "%s %s" ac (AcInfo_Pprz.string_of_message ns_msg values));
|
Ivy.send (sprintf "%s %s" ac (AcInfo_Pprz.string_of_message ns_msg values));
|
||||||
|
|
||||||
@@ -213,7 +218,7 @@ let send_aircraft_msg = fun ac ->
|
|||||||
Not_found -> prerr_endline ac
|
Not_found -> prerr_endline ac
|
||||||
|
|
||||||
let new_aircraft = fun id ->
|
let new_aircraft = fun id ->
|
||||||
{ port = id ; roll = 0.; pitch = 0.; east = 0.; north = 0.; gspeed=0.; course = 0.; alt=0.; climb=0.; cur_block=0; cur_stage=0; throttle = 0.; rpm = 0.; temp = 0.; bat = 0.; amp = 0.; energy = 0.; ap_mode=0; ap_altitude=0; if_calib_mode=0; mcu1_status=0; lls_calib=0 }
|
{ port = id ; roll = 0.; pitch = 0.; east = 0.; north = 0.; desired_east = 0.; desired_north = 0.; gspeed=0.; course = 0.; alt=0.; climb=0.; cur_block=0; cur_stage=0; throttle = 0.; rpm = 0.; temp = 0.; bat = 0.; amp = 0.; energy = 0.; ap_mode=0; ap_altitude=0; if_calib_mode=0; mcu1_status=0; lls_calib=0 }
|
||||||
|
|
||||||
let register_aircraft = fun name a ->
|
let register_aircraft = fun name a ->
|
||||||
Hashtbl.add aircrafts name a;
|
Hashtbl.add aircrafts name a;
|
||||||
@@ -223,9 +228,11 @@ let register_aircraft = fun name a ->
|
|||||||
(** Callback of an identifying message from a soft simulator *)
|
(** Callback of an identifying message from a soft simulator *)
|
||||||
let ident_msg = fun log id name ->
|
let ident_msg = fun log id name ->
|
||||||
if not (Hashtbl.mem aircrafts name) then begin
|
if not (Hashtbl.mem aircrafts name) then begin
|
||||||
|
prerr_endline "ident_msg";
|
||||||
let ac = new_aircraft (Ivy id) in
|
let ac = new_aircraft (Ivy id) in
|
||||||
let b = Ivy.bind (fun _ args -> sim_msg log name ac args.(0)) (sprintf "^%s +(.*)" id) in
|
let b = Ivy.bind (fun _ args -> sim_msg log name ac args.(0)) (sprintf "^%s +(.*)" id) in
|
||||||
register_aircraft name ac
|
register_aircraft name ac;
|
||||||
|
send_aircrafts_msg ()
|
||||||
end
|
end
|
||||||
|
|
||||||
(* Waits for new simulated aircrafts *)
|
(* Waits for new simulated aircrafts *)
|
||||||
|
|||||||
@@ -46,6 +46,9 @@ class track = fun ?(name="coucou") ?(size = 50) ?(color="red") (geomap:MapCanvas
|
|||||||
ignore (GnoCanvas.line ~fill_color:color ~props:[`WIDTH_PIXELS 4;`CAP_STYLE `ROUND] ~points:[|-4.;10.;4.;10.|] aircraft) in
|
ignore (GnoCanvas.line ~fill_color:color ~props:[`WIDTH_PIXELS 4;`CAP_STYLE `ROUND] ~points:[|-4.;10.;4.;10.|] aircraft) in
|
||||||
let ac_label =
|
let ac_label =
|
||||||
GnoCanvas.text group ~props:[`TEXT name; `X 25.; `Y 25.; `ANCHOR `SW; `FILL_COLOR color] in
|
GnoCanvas.text group ~props:[`TEXT name; `X 25.; `Y 25.; `ANCHOR `SW; `FILL_COLOR color] in
|
||||||
|
let carrot = GnoCanvas.group group in
|
||||||
|
let _ac_carrot =
|
||||||
|
ignore (GnoCanvas.polygon ~points:[|0.;0.;-2.5;5.;2.5;5.|] ~props:[`WIDTH_UNITS 1.;`FILL_COLOR "orange"; `OUTLINE_COLOR "orange"; `FILL_STIPPLE (Gdk.Bitmap.create_from_data ~width:2 ~height:2 "\002\001")] carrot) in
|
||||||
|
|
||||||
object (self)
|
object (self)
|
||||||
val mutable segments = Array.create size empty
|
val mutable segments = Array.create size empty
|
||||||
@@ -81,6 +84,9 @@ class track = fun ?(name="coucou") ?(size = 50) ?(color="red") (geomap:MapCanvas
|
|||||||
let (xw,yw) = geomap#world_of_en en in
|
let (xw,yw) = geomap#world_of_en en in
|
||||||
aircraft#affine_absolute (affine_pos_and_angle geomap#zoom_adj#value xw yw heading);
|
aircraft#affine_absolute (affine_pos_and_angle geomap#zoom_adj#value xw yw heading);
|
||||||
ac_label#affine_absolute (affine_pos_and_angle geomap#zoom_adj#value xw yw 0.);
|
ac_label#affine_absolute (affine_pos_and_angle geomap#zoom_adj#value xw yw 0.);
|
||||||
|
method move_carrot = fun en ->
|
||||||
|
let (xw,yw) = geomap#world_of_en en in
|
||||||
|
carrot#affine_absolute (affine_pos_and_angle geomap#zoom_adj#value xw yw 0.)
|
||||||
method zoom = fun z ->
|
method zoom = fun z ->
|
||||||
let a = aircraft#i2w_affine in
|
let a = aircraft#i2w_affine in
|
||||||
let z' = sqrt (a.(0)*.a.(0)+.a.(1)*.a.(1)) in
|
let z' = sqrt (a.(0)*.a.(0)+.a.(1)*.a.(1)) in
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ GetOptions (
|
|||||||
);
|
);
|
||||||
my @args = ();
|
my @args = ();
|
||||||
push @args, "-b", $options->{ivy_bus};
|
push @args, "-b", $options->{ivy_bus};
|
||||||
my $sim_binary = Paparazzi::Environment::paparazzi_home()."/var/".$options->{aircraft}."/sim/simsitl.out";
|
my $sim_binary = Paparazzi::Environment::paparazzi_home()."/var/".$options->{aircraft}."/sim/simsitl";
|
||||||
die "$sim_binary not found. try make AIRCRAFT=$options->{aircraft} ac\n" unless -e $sim_binary;
|
die "$sim_binary not found. try make AIRCRAFT=$options->{aircraft} ac\n" unless -e $sim_binary;
|
||||||
exec ($sim_binary, @args)
|
exec ($sim_binary, @args)
|
||||||
|
|
||||||
|
|||||||
@@ -33,9 +33,9 @@ module Make(A:Data.MISSION) = struct
|
|||||||
let servos_period = 25 (* ms *)
|
let servos_period = 25 (* ms *)
|
||||||
let periodic_period = 16 (* ms *)
|
let periodic_period = 16 (* ms *)
|
||||||
let rc_period = 25 (* ms *)
|
let rc_period = 25 (* ms *)
|
||||||
let id_period = 10_000 (* ms *)
|
|
||||||
|
|
||||||
let periodic = fun p f ->
|
let periodic = fun p f ->
|
||||||
|
f ();
|
||||||
ignore (GMain.Timeout.add p (fun () -> f (); true))
|
ignore (GMain.Timeout.add p (fun () -> f (); true))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ sub parse_args {
|
|||||||
my ($self) = @_;
|
my ($self) = @_;
|
||||||
my $options = {
|
my $options = {
|
||||||
ivy_bus => "127.255.255.255:2005",
|
ivy_bus => "127.255.255.255:2005",
|
||||||
map => "maps/muret_UTM.xml",
|
map => "muret_UTM.xml",
|
||||||
render => "1",
|
render => "1",
|
||||||
};
|
};
|
||||||
GetOptions("b=s" => \$options->{ivy_bus},
|
GetOptions("b=s" => \$options->{ivy_bus},
|
||||||
|
|||||||
@@ -51,12 +51,12 @@ let gen_periodic = fun avr_h messages ->
|
|||||||
|
|
||||||
fprintf avr_h "#define PeriodicSend() { /* %dHz */ \\\n" freq;
|
fprintf avr_h "#define PeriodicSend() { /* %dHz */ \\\n" freq;
|
||||||
fprintf avr_h " static uint8_t i;\\\n";
|
fprintf avr_h " static uint8_t i;\\\n";
|
||||||
fprintf avr_h " i++; if (i == %d) i = 0;\\\n" nb_steps;
|
fprintf avr_h " if (i == %d) i = 0;\\\n" nb_steps;
|
||||||
List.iter
|
List.iter
|
||||||
(fun (p, id) ->
|
(fun (p, id) ->
|
||||||
fprintf avr_h " if (i %% %d == 0) PERIODIC_SEND_%s();\\\n" p id)
|
fprintf avr_h " if (i %% %d == 0) PERIODIC_SEND_%s();\\\n" p id)
|
||||||
scheduled_messages;
|
scheduled_messages;
|
||||||
fprintf avr_h "}\n"
|
fprintf avr_h " i++;\\\n}\n"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user