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.
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,