Page 1 of 1

Conditional Statement

PostPosted: Sat Aug 17, 2013 3:03 pm
by spinner
Hi,

I've had a look through and these seem to be the conditional operators available.

<opcode>UNTIL_NE</opcode>
<opcode>UNTIL_GR</opcode>
<opcode>UNTIL_EQ</opcode>
<opcode>UNTIL_SM</opcode>

<opcode>IF_NE</opcode>
<opcode>IF_GR</opcode>
<opcode>IF_EQ</opcode>
<opcode>IF_SM</opcode>

What I'd like to have is a block that contains a CIRCLE at a certain height and then when the aircraft has gone down to that height and when it's at a certain bearing go into a flare so as the flare direction is into the wind.

I've tried putting in two conditional statements one after another, the next thing I could try is putting in two CIRCLE statements with the two different conditionals after each separate one. What I'm really looking for is some boolean operator so as both of these conditions could be put into one UNTIL conditional statement.

Thanks,
Tim.

Re: Conditional Statement

PostPosted: Sun Aug 18, 2013 2:57 pm
by Tom
Hi Tim,

I assume you are refering to auto-landing?
For this I introduced the variable "Absolute altitude & heading error [m * °]".
To be used as:
CIRCLE
UNTIL(Absolute altitude & heading error [m*°] < 15)
FLARE_TO


This will circle until the altitude error is "OK" and the directions towards the next waypoint is also "OK".
In the case the altitude error and heading error should be below 15. So if the altitude is still 10m too high, and the heading is only 4 degrees off, it will jump to the flare waypoint.

TOm