[Top][All Lists]

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

Re: [Paparazzi-devel] altitude problem in standby

From: Ben Laurie
Subject: Re: [Paparazzi-devel] altitude problem in standby
Date: Sun, 8 Sep 2013 16:40:23 +0100

On 8 September 2013 16:31, Felix Ruess <address@hidden> wrote:
Hi Ben,

IMHO the important question is how do you want the system to behave?

The idea behind this feature was to be able to quickly change the current altitude without modifying several waypoints.
In most cases you don't want to change the altitude of all waypoints (e.g. you don't want to change altitude of specific ones used in e.g. the survey, landing, standby, etc)

It would be trivial to create a function to update all waypoint altitudes relative to some reference.
(similar to what is done when using the GeoInit to update waypoint altitude according to the difference of actual current ground altitude and flight plan ground alt)
But in which cases is this really what you want?

So the real question is in which cases do you want to be able to quickly change the flight altitude (which waypoints, flight plan blocks/patterns, etc. should it affect?
And when should it go "back" to the actual altitude of a waypoint?

The assumption currently made are:
- you normally want to change the altitude of the current "mission element" (which usually encompasses several waypoints) and that all these waypoints have the same altitude.
- if you want to move on to another "mission element" (e.g. another survey, land, etc..), you want to revert back to the actual altiude specified in the waypoints if it differs from the waypoint altitude of the last one
- if you explicitly change the altitude of the current waypoint, you want to set this as new flight altitude

I think in most cases this works as desired. Meaning it lets you quickly shift the altitude of your current mission element without having to edit each waypoint that belongs to that element and also without changing the altitude of other important waypoints like the ones used for landing, etc.

Of course this assumes that waypoints you don't want to be affected by this altitude shift have a slightly different altitude in the first place.

Feedback/suggestions about the current assumptions or on how the system should behave instead are welcome.
If we come up with a different desired behavior, then we can talk about implementation...

To be honest, the current behaviour hasn't surprised me yet, but then, I'm still not really sure what I'm doing, I was just a little surprised by the apparently ad hoc nature of this feature.

Cheers, Felix

On Sun, Sep 8, 2013 at 4:47 PM, Ben Laurie <address@hidden> wrote:

On 8 September 2013 14:50, Felix Ruess <address@hidden> wrote:

this feature is certainly very useful in a lot of circumstances... unfortunately it has some unexpected side effects like the one you mentioned if you not aware of how exactly it works.
Just wanted to also point out that this not only used when changing the flight altitude via a settings slider, but also when using the altitude shift (up/down arrows of an aircraft strip in the GCS).

Btw, in the rotorcraft firmware we have the same feature, but the threshold for the altitude difference is set lower (0.2m instead of 1m).
How about settings this to e.g. 0.1m for both firmwares?

I am curious why it isn't a first-class feature rather than something that seems like a bit of a kludge. In particular, why not make it possible to set altitudes relative to some reference, and then just change the reference?

We should probably also pay closer attention to when the nav_altitude is actually (re)set.
Like resetting it after a landing or setting it to the current altitude when using climb modes...

Cheers, Felix

On Fri, Sep 6, 2013 at 9:49 PM, Refik Sever <address@hidden> wrote:

Hi Gautier,


Thank you for your explanations. It is good to hear that it is a desired feature. Maybe it will be good to put a warning for beginners, not to increase the height too much in Standby.


As you recommend, we will use Standby with a different altitude from every waypoint, and will not use it in regular flight.


Best regards,



From: paparazzi-devel-bounces+refiksever=address@hidden [mailto:paparazzi-devel-bounces+refiksever=address@hidden] On Behalf Of Gautier Hattenberger
Sent: Friday, September 6, 2013 10:35 PM
To: address@hidden
Subject: Re: [Paparazzi-devel] altitude problem in standby



It is not an issue, but rather a (very old) feature of Paparazzi.

The flight altitude is updated when switching to a new waypoint only the the altitude difference between the two waypoints is greater than 1 meter (relevant code is in subsystems/nav.c:393).
Here is the idea:
When you have a flight plan with most of the waypoints at the same altitude (it is the case in basic.xml), you want to be able to control the flight altitude in all blocks without changing the waypoints altitude all the time. It is possible by changing the "flight altitude" parameter in the settings without touching WP alt. As a result, when you switch to an other block or flight pattern, the flight altitude will remain unchanged since the WPs alt are the same. If you have a flight pattern that need to be done a specific altitude, you just need to specify this altitude in the flight plan (and make it different from the other of more then 1 meter). It is the case for the landing procedure that starts at a lower altitude.

I really don't want to change this behavior since it is really useful in the end when you know how it works. But you can have some good practice to overcome your problem:
The standby point should be used as a waiting/return to base point and nothing else, especially not as part of the mission goal. If you need to go high or far away, make special waypoints for this at an altitude different from the standby point so that in case of deroute the target altitude will be correct.

I hope it helps you to make efficient and safe flight plans.


Le 06/09/2013 17:15, Refik Sever a écrit :



Felix, I think that you can solve this issue :)


As I wrote in my last email, when the data link is lost for 22s, it goes to standby. However, it does not update the altitude. If it is at 1000m and the datalink is lost, it will circle at 1000m until its power is completely discharged.


We have tried several simulations and observed the behaviour:


In the beginning of flight_plan.xml, the altitude is set as 202m. However, the STDBY waypoiny altitude is set as 200m. If the alt values are different by at least 2m, then it updates the altitude while going to standby. If they are same or the difference of them are at most 1m, then it does not update the altitude.:


<flight_plan alt="202" ground_alt="28" home_mode_height="140" lat0="36.898197" lon0="30.643143" max_dist_from_home="900" name="Basic" qfu="180" security_height="25">


<waypoint alt="200" name="STDBY" x="1.0" y="-50.0"/>



You can easily try it. Make both "alt" as 200m-200m, or 200m - 199m, it will not update the altitude while it goes to standby. If you make 200m - 202m or more, then it updates. We used this exception and decrease the voltage in simulation so it executes the exception:


<exception cond="datalink_time > 22 || (11.0 > PowerVoltage())" deroute="Standby"/>


I think that somewhere in the codes there is an "if statement" checking the difference of them.



Second problem is, if it is in Standby and if we set the altitude to 1000m and the datalink is gone, then it will not execute the exception condition and change the altitude, because it is already in Standby.


We solved this problem by adding a different block and use this block only when the  datalink is lost. Therefore, we guarantee that it updates the altitude.


I think that it must be solved in paparazzi for everybody, otherwise it will be a problem for everyone. Or at least, we can put it in example flight plans.


Best regards,




From: address@hidden [mailto:address@hidden] On Behalf Of Refik Sever
Sent: Thursday, September 5, 2013 9:10 PM
To: address@hidden
Subject: [Paparazzi-devel] altitude problem in standby


Dear all,

If the datalink is lost for 22s, we switch to Standby by using this exception.

<exception cond="datalink_time > 22" deroute="Standby"/>

Although the STDBY point has an altitude constraint, it does not update the altitude.

<waypoint alt="150" name="STDBY" x="1.0" y="-50.0"/>

If we move to standby from another block by sending a command from GCS, it updates the altitude to 150m. But, if it goes to standby with an exception condition by itself, the altitude remains same.

Nowadays we are trying to increase the altitude (above 1000m), and if the datalink will be lost at that altitude, it will be a big problem because it will remain at 1000m until the battery will be completely discharged. 

We are using stable paparazzi version (V5_0v5.0.1_stable-7-gcea1b0b-dirty).  The behaviour is same for the Master branch.

Could you please check that,


Paparazzi-devel mailing list


Paparazzi-devel mailing list

Paparazzi-devel mailing list

Paparazzi-devel mailing list

Paparazzi-devel mailing list

reply via email to

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