paparazzi-devel
[Top][All Lists]
Advanced

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

Re: [Paparazzi-devel] InsideGreen() or non-circular mission boundary?


From: Felix Ruess
Subject: Re: [Paparazzi-devel] InsideGreen() or non-circular mission boundary?
Date: Tue, 4 Mar 2014 23:29:08 +0100

Simon,

what paparazzi_version are you using? Could you try with latest master?
If you are using v5.0 stable it might be issue 602, which should be fixed in master.

I also created a new v5.0_fix_inside branch, with that fix backported. If you are on v5.0 stable, could you please test if that resolves your issue, then I will merge it in v5.0.

Cheers, Felix


On Tue, Mar 4, 2014 at 11:14 PM, Gautier Hattenberger <address@hidden> wrote:
Hi,

I don't have much time right now, but your flight plan actually works as expected for me ...

Gautier

Le 04/03/2014 22:38, Simon Liebold a écrit :
Hello,

So, I changed the order of the polygon corners (now clockwise) and simplified the flight plan a bit. Still, it did not change the outcome.

What puzzles me is that it keeps jumping to the "Center" Block(8) directly after I started the simulator (see attached screenshot) while the simulated airframe is still stationary on HOME. Again, manually switching to any other block will result it jumping back to Block(8) a split-second later.

Now I looked at the generated code (flight_plan.h) trying to understand what is happening with the inputs (x=0.4375; y=0.5):

static inline bool_t InsideGreen(float _x, float _y) { \
  if (_y <= 312.6) {
    if (_y <= -179.7) {
      if (_y <= -569.2) {
        return FALSE;
      } else {
        float dy = _y - -179.7;
        return (-845.1+dy*-3.047754<= _x && _x <= 474.0+dy*0.338852);
      }
    } else {
      float dy = _y - 312.6;
      return (-593.3+dy*0.511548<= _x && _x <= 640.8+dy*0.338852); // It should return this line.
    }
  } else {
    if (_y <= 608.3) {
      float dy = _y - 608.3;
      return (-442.0+dy*0.511548<= _x && _x <= -442.0+dy*-3.661819);
    } else {
      return FALSE;
    }
  }
}

And I don't see why it would not return the line in the middle but jumps to one of the "return FALSE". I have to say, I am not a C expert (yet)...


Simon

Am 04.03.2014 12:26, schrieb Simon Liebold:
Hi Christophe,

Tip: make sure to define your polygons clockwise.



You were right. I had defined it counter-clockwise. But I just briefly tested it is still giving the same results. I will investigate this later when I have more time.

Thanks so far for the hints.

Simon


On Tue, Mar 4, 2014 at 9:04 AM, Simon Liebold <address@hidden> wrote:
Hi Gautier,

thanks for offering help. I did not know that it auto-generates these functions. Interesting.

I tried to use the exception with and without the hight limitation. Still it will jump to "Center" immediately after starting up. If, during simulation, I manually switch to any other block it will jump right back to "Center". It looks as if
!(InsideGreen(GetPosX(),GetPosY()))
is TRUE all the time (not InsideGreen).

I am attaching my flight plan. Maybe you can find my mistake.

Simon



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


--
Simon Liebold | address@hidden | Key ID: 0xB59D1EC6 | CAcert Assurer
Cell +49 151 550 671 53 | Fon +49 69 173 265 300 | sip:address@hidden


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


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



reply via email to

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