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: