paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] no-fly zones


From: Pascal
Subject: Re: [Paparazzi-devel] no-fly zones
Date: Wed, 13 Jul 2005 23:53:31 +0200
User-agent: Debian Thunderbird 1.0.2 (X11/20050602)

louis dugrain wrote:

Hi,

I think it is not easy to do that, depending on what you specify : only one
simple area or some complicated area. I think the best way is to put points in a
direct order and only with convex area
You are right, it is simpler in a convex area. For Elmau ,it is the case (anyway, most of the time you can consider the convex hull of the allowed area).

and then use vector product. Seems to
need lots of calculation.
The naive algorithm (parity of the nulber of intersections with edges) is linear with the number of points. In in convex case, it is much more simple (Nisma's code and http://www.ics.uci.edu/~eppstein/161/960307.html for example): consider the east most and left most points and the north and south "chains" between these two points. From your current point, you need to know if a ray to north (or south) crosses zero (your are out), one (you are in) or the two chains (you are out). To check it you can parse the points of the chain with a dichotomy (if the points of the chains are sorted from west to east). Your search is then in O(log n), n being the the number of vertices of the vertex. Well, there is only 6 points in the Elmau case; the dichotomy is maybe not needed.

What do we want to do if we go out of the polygone ? Shut off the engine is certainly not not enough; we want also to go back inside the allowed area.

Let's implement it: we could have "border" waypoints (marked with a prefix for example) and a test "InsideBorders()" which could be used in an exception in a flight plan; it could deroute to a "home" point. Do we want this behaviour also in auto1 and manual mode ? In this case, we only have to modify nav.c:compute_dist2_to_home().

--Pascal

What do you think, Pascal and Antoine ?

--
Louis

Martin Mueller a écrit :

Hi,

it seems that the currently used "distance from home" calculation is not
sufficient for the upcoming contests. They require a security feature
that at least turns off the engine if some area marked through a number
of points connected by a line is left by the aircraft. Did anybody ever
employ such a mechanism?

Martin

_______________________________________________
Paparazzi-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/paparazzi-devel








reply via email to

[Prev in Thread] Current Thread [Next in Thread]