|
From: | Refik Sever |
Subject: | Re: [Paparazzi-devel] strange behaviour in lisa m |
Date: | Wed, 11 Sep 2013 01:49:27 +0300 |
Hi, >Cristophe: >These exceptions are NOT good. You may only call land 1 time while the exception will continuously call it at 4Hz. Option 1: Add a variable : if not yet derouted to land, deroute to land, or add the deroute on low bat in >other flightplan blocks. It will then correctly deroute from the other block instead of constantly reinitializing but never executing landing. <exception cond="auto2_land && (datalink_time > 180 || (electrical.bat_low && !electrical.bat_critical))" deroute="Standby"/> <exception cond="electrical.bat_critical && auto2_land" deroute="Land Right AF-TD"/> We used auto2_land variable, which is TRUE at the beginning and it becomes FALSE when it first goes to Land. Therefore, we expect to go to Land bock for only once. @Felix: Our battery voltage varies a lot with throttle. It detects critical voltage and goes to Land, but when it decreases the throttle, the voltage increases and it goes to Standby from Land block. Thats why we put a variable named "auto2_land". We want that, if it goes to Land, it will never go to Standby again. We will put the second exception to inside of Standby as you recommend. Best regards, Refik From: address@hidden [mailto:address@hidden On Behalf Of Felix Ruess Sorry, didn't really pay attention when providing the examples... and just wanted to show how you can check for the battery status. Should have made it clear that e.g. the deroute to land on bat critical only makes sense as an exception inside the standby block... So as a rule to follow, don't use a global exception if you want to deroute to a block that you want to leave again (e.g land). That only makes sense for blocks that never end on their own (e.g. Standby, MOB, oval, eight) On Wed, Sep 11, 2013 at 12:03 AM, Christophe De Wagter <address@hidden> wrote: These exceptions are NOT good. You may only call land 1 time while the exception will continuously call it at 4Hz. Option 1: Add a variable : if not yet derouted to land, deroute to land, or add the deroute on low bat in other flightplan blocks. It will then correctly deroute from the other block instead of constantly reinitializing but never executing landing. On Sep 9, 2013 11:20 PM, "Refik Sever" <address@hidden> wrote: Hi Felix, We moved to the stable branch. I have added these exceptions to the flight_plan as you recommend: <exception cond="auto2_land && (datalink_time > 180 || (electrical.bat_low && !electrical.bat_critical))" deroute="Standby"/> <exception cond="electrical.bat_critical && auto2_land" deroute="Land Right AF-TD"/> auto2_land variable is TRUE at the beginning, and it becomes FALSE when it goes to "Land Right AF-TD". If we don't use this variable, it continuously switches between Standby and Land blocks. Today, although we used this variable, it continuosly switched between Standby and Land. Do you have an idea about it? The bad thing is, in Standby it wanted to turn left, but in Land it wanted to turn right. Because of continuously switching between these blocks, it went in a straight line. We were lucky that the RC worked at that distance. Using exceptions is not very simple I think. Do we forget something? I dont understand how it went to standby, although auto2_land was FALSE. By the way, the strange behaviour while uploading the code to Lisa M was due to the ETS airspeed sensor. We did not turn off the power of it during boot. Regards, Refik From: paparazzi-devel-bounces+refiksever=address@hidden [mailto:paparazzi-devel-bounces+refiksever=address@hidden] On Behalf Of Felix Ruess No, we don't add new features to the stable branches, only bugfixes. On Sun, Sep 8, 2013 at 11:20 PM, Refik Sever <address@hidden> wrote: Hi Felix, Thank you for your recommendations. We upload the code using USB cable. We turn off the 12V battery, and the autopilot takes its voltage from USB. Therefore, some of the peripherals (Airspeed sensor etc) are off during upload. Then, we remove the USB cable and turn on the battery. We always make a power cycle after upload. Sometimes, it does not behave normal, and we need to upload it again. "in order to make checks for low or critical batter voltage easier and more robust we added this to the electrical subsystem in master." Did you also add it to stable branch? Best regards, Refik From: paparazzi-devel-bounces+refiksever=address@hidden [mailto:paparazzi-devel-bounces+refiksever=address@hidden] On Behalf Of Felix Ruess Hi Refik, in order to make checks for low or critical batter voltage easier and more robust we added this to the electrical subsystem in master. It will automatically set the electrical.bat_low and electrical.bat_critical flags when the voltage drops below BAT_LOW or BAT_CRITIC for a certain amount of time to avoid setting this on very short voltage drops. You can use it in your flight plans for example as follows: <exception cond="electrical.bat_low && !electrical.bat_critical" deroute="Standby"/> <exception cond="electrical.bat_critical" deroute="land"/> About the behavior right after upload new code to the autopilot: depending on how you upload the code (jtag, usb, etc..) it sometimes seems to not correctly reset everything (probably related to external peripherals?). To be safe you can power cycle once to make sure everything starts up as intended. @Piotr: do you know why this sometimes happens? Cheers, Felix On Sun, Sep 8, 2013 at 9:27 PM, Refik Sever <address@hidden> wrote: Dear all,
|
[Prev in Thread] | Current Thread | [Next in Thread] |