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: Steven Wawryk
Subject: Re: [Paparazzi-devel] fly in the loop
Date: Mon, 03 Aug 2009 20:13:15 +0930
User-agent: Thunderbird 2.0.0.22 (X11/20090608)

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




reply via email to

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