*** empty log message ***

This commit is contained in:
Pascal Brisset
2006-05-21 11:00:27 +00:00
parent 1c64444e81
commit 37c9fdc136
8 changed files with 37 additions and 56 deletions
+1 -1
View File
@@ -65,7 +65,7 @@ Q=@
CFLAGS = \
-Werror -W -Wall \
-Werror -W -Wall -Wundef \
$(ATMEL_INCLUDES) \
$(INCLUDES) \
-Wstrict-prototypes \
+1 -1
View File
@@ -133,7 +133,7 @@ ap.srcs += rc_settings.c
ap.CFLAGS += -DDATALINK=WAVECARD
ap.srcs += traffic_info.c datalink.c
ap.CFLAGS += -DWAVECARD -DWAVECARD_UART=Uart0 -DUSE_UART0
ap.CFLAGS += -DWAVECARD_UART=Uart0 -DUSE_UART0
ap.srcs += wavecard.c
</makefile>
+2 -2
View File
@@ -1,4 +1,4 @@
<flight_plan SECURITY_HEIGHT="25" lat0="43.449300" lon0="1.266300" ground_alt="189" qfu="270" alt="250" max_dist_from_home="450" name="AirExpo">
<flight_plan SECURITY_HEIGHT="25" lat0="43.449300" lon0="1.266300" ground_alt="189" qfu="270" alt="250" max_dist_from_home="450" name="AirExpo" airspace="airexpo">
<rc_control>
<mode NAME="AUTO1">
<setting VAR="ir_pitch_neutral" RANGE="60." RC="gain_1_up" TYPE="int16"/>
@@ -34,7 +34,7 @@
<circle WP="HOME" RADIUS="-50"/>
</block>
<block name="survey">
<survey sector="airexpo" grid="100"/>
<survey sector="survey" grid="70"/>
</block>
<block name="circuit">
<exception COND="(RcEvent1())" DEROUTE="circlehome"/>
+9
View File
@@ -12,4 +12,13 @@
<point pos="WGS84 43.4475 1.2663"/>
</polygon>
</sector>
<sector name="survey">
<polygon>
<point pos="WGS84 43.449442 1.264670"/>
<point pos="WGS84 43.450918 1.260512"/>
<point pos="WGS84 43.450290 1.260029"/>
<point pos="WGS84 43.448759 1.264170"/>
</polygon>
</sector>
</sectors>
+8 -11
View File
@@ -176,7 +176,7 @@ static float qdr;
static struct point survey_from;
static struct point survey_to;
static float shift;
static bool_t survey_uturn = FALSE;
static bool_t survey_uturn __attribute__ ((unused)) = FALSE;
#include <stdio.h>
@@ -204,7 +204,12 @@ void nav_goto_block(uint8_t b) {
GotoBlock(b);
}
static void survey_init(float y_south, float y_north, float grid);
static inline void survey_init(float y_south, float y_north, float grid) {
survey_from.x = survey_to.x = estimator_x;
survey_from.y = y_south;
survey_to.y = y_north;
shift = grid;
}
#include "flight_plan.h"
@@ -324,19 +329,11 @@ static inline void compute_dist2_to_home(void) {
dist2_to_home = ph_x*ph_x + ph_y *ph_y;
too_far_from_home = dist2_to_home > (MAX_DIST_FROM_HOME*MAX_DIST_FROM_HOME);
#if defined InAirspace
too_far_from_home = too_far_from_home || !(InAirspace());
too_far_from_home = too_far_from_home || !(InAirspace(estimator_x, estimator_y));
#endif
}
static void survey_init(float y_south, float y_north, float grid) {
survey_from.x = survey_to.x = estimator_x;
survey_from.y = y_south;
survey_to.y = y_north;
shift = grid;
}
#ifndef FAILSAFE_HOME_RADIUS
#define FAILSAFE_HOME_RADIUS 50
#endif
+3 -20
View File
@@ -28,7 +28,6 @@ CONF = ../../../conf
VAR = ../../../var
all: link server messages $(VAR)/boa.conf
# stereo_demod
clean:
rm -f link server messages *.bak *~ core *.o .depend *.opt *.out *.cm*
@@ -36,7 +35,7 @@ clean:
OCAMLC = ocamlc
OCAMLOPT = ocamlopt
OCAMLLIB = ../../lib/ocaml
INCLUDES= -I $(OCAMLLIB) -I +lablgtk2
INCLUDES= -I $(OCAMLLIB) -I ../multimon -I +lablgtk2
LIBPPRZCMA=$(OCAMLLIB)/lib-pprz.cma
$(VAR)/boa.conf :$(CONF)/boa.conf
@@ -45,29 +44,18 @@ $(VAR)/boa.conf :$(CONF)/boa.conf
chmod a+x boa
messages.opt : messages.ml
$(OCAMLOPT) $(INCLUDES) -o $@ str.cmxa unix.cmxa xml-light.cmxa glibivy-ocaml.cmxa -I +lablgtk2 lablgtk.cmxa gtkInit.cmx lib-pprz.cmxa $^
strip $@
messages : messages.cmo
@echo OL $@
$(Q)$(OCAMLC) -custom $(INCLUDES) -o $@ lablgtk.cma glibivy-ocaml.cma lib-pprz.cma gtkInit.cmo $^
stereo_demod : ../multimon/multimon.cma stereo_demod.ml ../../lib/ocaml/lib-pprz.cma
$(OCAMLC) $(INCLUDES) -I ../multimon -o $@ lablgtk.cma glibivy-ocaml.cma lib-pprz.cma multimon.cma $^
@cat ../../../pprz_src_test.sh > $@
@echo 'exec lablgtk2 -I $$PAPARAZZI_SRC/sw/lib/ocaml -I $$PAPARAZZI_SRC/sw/ground_segment/multimon glibivy-ocaml.cma lib-pprz.cma -I $$PAPARAZZI_SRC/sw/ground_segment/tmtc $$PAPARAZZI_SRC/sw/ground_segment/multimon/multimon.cma $$PAPARAZZI_SRC/sw/ground_segment/tmtc/stereo_demod.ml $$*' >> $@
@chmod a+x $@
server : aircraft.cmo wind.cmo airprox.cmo server.cmo
@echo OL $@
$(Q)$(OCAMLC) -custom $(INCLUDES) -o $@ lablgtk.cma glibivy-ocaml.cma lib-pprz.cma $^
link : modem.cmo link.cmo
link : modem.cmo link.cmo
@echo OL $@
$(Q)$(OCAMLC) -custom $(INCLUDES) -o $@ lablgtk.cma glibivy-ocaml.cma lib-pprz.cma $^
$(Q)$(OCAMLC) -custom $(INCLUDES) -o $@ lablgtk.cma glibivy-ocaml.cma lib-pprz.cma multimon.cma $^
%.cmo : %.ml $(LIBPPRZCMA)
@@ -78,11 +66,6 @@ link : modem.cmo link.cmo
@echo OC $<
$(Q)$(OCAMLC) $(INCLUDES) $<
airprox.cmi aircraft.cmo : aircraft.cmi
airprox.cmo : airprox.cmi
wavecard_c : wavecard_c.c wavecard_utils_c.c wavecard_foo_c.c
gcc -Wall -o $@ $^ `pkg-config --cflags glib-2.0` `pkg-config --libs glib-2.0`
#
# Dependencies
+2 -1
View File
@@ -156,11 +156,12 @@ class flight_plan = fun ?edit geomap color fp_dtd xml ->
end)
(XmlEdit.children xml_wpts) in
(** Expands the blocks *)
let _ =
XmlEdit.expand_node xml_tree_view xml_root;
let blocks = XmlEdit.child xml_root "blocks" in
XmlEdit.expand_node xml_tree_view blocks in
object
method georef = ref_wgs84
method window = xml_window
+11 -20
View File
@@ -391,18 +391,19 @@ let rec print_stage = fun index_of_waypoints sectors x ->
let grid = parsed_attrib x "grid"
and sector_name = ExtXml.attrib x "sector" in
let s = try List.assoc sector_name sectors with Not_found -> failwith (sprintf "Error, sector %s unknown" sector_name) in
let x1 = ref max_float and x2 = ref min_float
and y1 = ref max_float and y2 = ref min_float in
let x1 = ref max_float and x2 = ref (-.max_float)
and y1 = ref max_float and y2 = ref (-.max_float) in
List.iter (fun {G2D.x2D=x; G2D.y2D=y} ->
x1 := min !x1 x; y1 := min !y1 y;
x2 := max !x2 x; y2 := max !y2 y)
s;
stage ();
lprintf "survey_init(%f, %f, %s);\n" !y1 !y2 grid;
lprintf "survey_init(%.1f, %.1f, %s);\n" !y1 !y2 grid;
lprintf "NextStage();\n";
left ();
stage ();
let inside_sector = inside_function sector_name in
lprintf "Survey(%s,%f,%f,%f,%f);\n" inside_sector !x1 !x2 !y1 !y2;
lprintf "Survey(%s,%.1f,%.1f,%.1f,%.1f);\n" inside_sector !x1 !x2 !y1 !y2;
lprintf "return;\n"
| _s -> failwith "Unreachable"
end;
@@ -613,13 +614,13 @@ let print_inside_polygon = fun pts ->
if xg > xd then begin
lprintf "return FALSE;\n"
end else begin
lprintf "float dy = _y - %f;\n" yl;
lprintf "return (%f+dy*%f <= _x && _x <= %f+dy*%f);\n" xg ag xd ad
lprintf "float dy = _y - %.1f;\n" yl;
lprintf "return (%.1f+dy*%.1f <= _x && _x <= %.1f+dy*%f);\n" xg ag xd ad
end
else
let ij2 = (i+j) / 2 in
let yl = layers.(ij2).G2D.top in
lprintf "if (_y <= %f) {\n" yl;
lprintf "if (_y <= %.1f) {\n" yl;
right (); f i ij2; left ();
lprintf "} else {\n";
right (); f (ij2+1) j; left ();
@@ -733,7 +734,7 @@ let _ =
let i = ref (-1) in
List.map (fun w -> incr i; (name_of w, !i)) waypoints in
let sectors_filename = Filename.concat dir "sectors.xml" in
let sectors_filename = Filename.concat dir "sectors.xml" in (** FIXME **)
let sectors_xml = Xml.parse_file sectors_filename in
let sectors = List.map (parse_sector rel_utm_of_wgs84) (Xml.children sectors_xml) in
List.iter print_inside_sector sectors;
@@ -753,23 +754,13 @@ let _ =
print_dl_settings dl_settings;
(***
begin
try
let airspace = ExtXml.attrib xml "airspace" in
begin
match Str.split (Str.regexp "\\.") airspace with
[base; sector_name] ->
let file = dir ^ "/" ^ base ^".xml" in
let sectors_xml = Xml.parse_file file in
let sector = ExtXml.child sectors_xml "sector" ~select:(fun x -> ExtXml.attrib x "name" = sector_name) in
print_inside_sector rel_utm_of_wgs84 (ExtXml.child sector "0")
| _ -> failwith "airspace"
end
let airspace = Xml.attrib xml "airspace" in
lprintf "#define InAirspace(_x, _y) %s(_x, _y)\n" (inside_function airspace)
with
_ -> ()
end;
***)
Xml2h.finish h_name
end