I found the problem. It seems that nav_desired_gaz should be
specified at least once taking into account logics of the flight
plan. For example, if gaz is specified only once in the init block,
the program may skip it due to (launch && z>ALT) already true and
this variable will be left at 0, like in my case when it is being
launched in manual.
As a solution for silly people like me, we could modify nav.c:359 from
uint16_t nav_desired_gaz;
To
uint16_t nav_desired_gaz=TRIM_UPPRZ((FAILSAFE_DEFAULT_GAZ)*MAX_PPRZ);
Or add
nav_desired_gaz=TRIM_UPPRZ((FAILSAFE_DEFAULT_GAZ)*MAX_PPRZ);
To nav_init(void)
Best regards,
Roman
-----Original Message-----
From:
address@hidden
[mailto:address@hidden
rg] On Behalf Of Pascal
Sent: Wednesday, August 30, 2006 2:56 PM
To: address@hidden
Subject: Re: [Paparazzi-devel] Throttle dies in auto2
Hi Roman, Hi Anton,
the default is "no slew" (pid.c:131, CLIMB_MAX_DIFF_GAZ=1).
What is expected (from what I reread in the code):
- MANUAL: no control on the throttle, you get what you set
on the stick
- AUTO1, AUTO2: slew is active: you cannot immediately go from
throttle=0 to throttle=100%. The variation in time is limited by
CLIMB_MAX_DIFF_GAZ
MANUAL -> AUTO1|AUTO2 :
Before the switch
- desired_gaz is set (main_ap.c:258)
- pid_slew() is run (main_ap.c:462)
so the controller follows (with a delay) your manual
throttle command
(of course this desired_gaz value is unused by the fbw
process in this mode) After the switch: desired_gaz smoothly
evolves from the current value
to the one computed by the controller (AUTO2) or set by the
stick (AUTO1)
So I can't explain the problem you observe ... And I can't
reproduce it
with the simulator :-(
About the CLIMB_MODE_PITCH: desired_gaz is set to
nav_desired_gaz which
is set by the navigation task, i.e. the flight plan.
So we will have to boot a plane to figure out the problem. I
think we
almost never flew in MANUAL since the slew control was implemented ...
Last remark: do we really want the slew in AUTO1 ?
--Pascalr
address@hidden wrote:
> Roman,
> Ive seen this before. What climb mode are you using? If you arent
> specifying
> then Im pretty sure that part functions. However There is
a throttle
> slewing
> built in, Pascal would have to tell you whether its default
on or not,
> as I
> dont have code infront of me.
>
> Anton
>
>
> Quoting Roman Krashanitsa <address@hidden>:
>
>> Guys, I have this weird behavior while flying in manual/auto1 and
>> then switching to auto2. First the throttle dies to 0, then slowly
>> goes up to the required value. Im I doing something wrong?
>>
>> I suspect that this is related to the initial value of
>> nav_desired_gaz variable in nav.c when
climb_mode==CLIMB_MODE_PITCH
>> All other cases use controlled_gaz.
>>
>>
>>
>>
>> _______________________________________________
>> 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