paparazzi-devel
[Top][All Lists]
Advanced

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

RE: [Paparazzi-devel] fly in the loop


From: akochevar
Subject: RE: [Paparazzi-devel] fly in the loop
Date: Tue, 04 Aug 2009 11:52:31 -0700
User-agent: Web-Based Email 5.1.5

Pascal,
Just for my own curiousity.  Couldnt the answer to this original question about looping a block been solved by adding a deroute at the end of the last <go> command?
 
AJ
 
-------- Original Message --------
Subject: Re: [Paparazzi-devel] fly in the loop
From: Steven Wawryk <address@hidden>
Date: Mon, August 03, 2009 10:30 pm
To: address@hidden


Hi Pascal,

I guess I like to think of the entire <while until="..."/> statement as a
"stage". But if others like to think of each iteration as a stage, then I'd be
happy with anything that allows a readable construct. Either of your
suggestions would make me happy. Prominent warnings about the use of stage_time
in while elements are probably needed.

Steve


Pascal Brisset wrote:
> Hi,
>
> we could have a
>
> <sleep until="condition"/>
>
> instruction or a new "loop_time" variable. What do you think ?
>
> --Pascal
>
> Steven Wawryk wrote:
>> Hi Pascal,
>>
>> It's not a criticism, it's just a usage that I find more intuitive and readable.
>>
>> I agree that it makes no sense during any fixed-wing flying phase. The
>> situations I've encountered where I would have liked it are all before launch
>> when it doesn't make sense for a controller to be running.
>>
>> One example was for a delay between control surface position changes during
>> pre-launch testing where I wanted:
>>
>> <while cond="LessThan(stage_time,4)"/>
>>
>> and worked around it with:
>>
>> <attitude roll="0.0" throttle="0.0" vmode="throttle"
>> until="LessThan(4,stage_time)"/>.
>>
>> Another was to speed up GPS settling where I wanted a timed out accuracy criterion:
>>
>> <while cond="And(LessThan(1000,gps_Pacc),LessThan(stage_time,10))"/>
>>
>> and worked around with:
>>
>> <attitude roll="0.0" throttle="0.0" vmode="throttle"
>> until="Or(LessThan(gps_Pacc,1000),LessThan(10,stage_time))"/>
>>
>> I personally think that the "while" element is more readable.
>>
>> The use of empty "while" element works when used with block_time
>> (NavBlockTime()) or any other variable for that matter and there are lots of
>> examples of this in the flight_plan directory, so it can entice the naive user
>> like me to use stage_time and wonder why it hangs and never gets past that stage
>> (though the flight plan display doesn't actually show that it is hung up on that
>> stage, so it takes a bit of investigating).
>>
>> Of course, it's not a show-stopper because there is a work around.
>>
>> Steve
>>
>>
>> Pascal Brisset wrote:
>>
>>> Hi,
>>>
>>> there is a single "stage_time" variable which is reset at the beginning
>>> of every stage. Here, there is a hidden empty stage inside the while
>>> loop where the variable is reset. It is probably not enough documented.
>>>
>>> However, what do you expect of doing nothing during 2s ? Except during
>>> an initialisation phase (or a perch phase with an heli), on the ground,
>>> you probably want to continue to fly ...
>>>
>>> So the <attitude/> instruction is a good answer
>>>
>>> --Pascal
>>>
>>> Steven Wawryk wrote:
>>>
>>>> I have noticed previously that stage_time is reset to zero every iteration of a
>>>> while loop. It works fine with "until=" attributes in other elements or
>>>> "stages", but not while elements. I think this is a bug.
>>>>
>>>> Try another element that has an "until" attribute, like <attitude ... until="2
>>>> <= stage_time">
>>>>
>>>>
>>>> 郭 flying pig wrote:
>>>>
>>>>
>>>>> Hi all
>>>>>
>>>>> I have try to create a loop flight in the basic.xml (from HOME --> STDBY --->CLIMB ....repeat), i use the following
>>>>>
>>>>>
>>>>>
>>>>> <block name="loop" strip_button="lop">
>>>>> <while cond="TRUE">
>>>>> <go wp="HOME"/>
>>>>> <go wp="STDBY"/>
>>>>> <go wp="CLIMB"/>
>>>>> <while cond="2 > stage_time"/>
>>>>> </while>
>>>>> </block>
>>>>>
>>>>>
>>>>> The problem i have is that once i call the block, it will fly from HOME --->STDBY ---->CLIMB , but after that it will not do anything until i call the block again, does anyone one have any idea how to do it right?
>>>>>
>>>>> I have enclosed my basic2.xml for the flight plan.
>>>>>
>>>>>
>>>>> Thanks
>>>>>
>>>>> Chen
>>>>>
>>>>> _________________________________________________________________
>>>>> 輕鬆分享 – 利用 Windows Live 相簿分享相片
>>>>>
>>>>> http://download.live.com/toolbar
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------
>>>>>
>>>>> _______________________________________________
>>>>> Paparazzi-devel mailing list
>>>>> address@hidden
>>>>> http://lists.nongnu.org/mailman/listinfo/paparazzi-devel
>>>>>
>>>>>
>>>> _______________________________________________
>>>> Paparazzi-devel mailing list
>>>> address@hidden
>>>> http://lists.nongnu.org/mailman/listinfo/paparazzi-devel
>>>>
>>>>
>>> _______________________________________________
>>> Paparazzi-devel mailing list
>>> address@hidden
>>> http://lists.nongnu.org/mailman/listinfo/paparazzi-devel
>>>
>>
>> _______________________________________________
>> Paparazzi-devel mailing list
>> address@hidden
>> http://lists.nongnu.org/mailman/listinfo/paparazzi-devel
>>
>
>
>
> _______________________________________________
> Paparazzi-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/paparazzi-devel


_______________________________________________
Paparazzi-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/paparazzi-devel

reply via email to

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