Re: Latest next fw. problems
« Reply #15 on: March 03, 2018, 10:14:23 am »
The change to flight/libraries/math/pid.c that I described in reply #4 should fix that perfectly like it used to be and also have the fix intended in the change that broke it.
https://forum.librepilot.org/index.php?topic=4155.msg28197#msg28197

If you like the way this worked in 16.09, that change will make it work that way, but be better in case you configure PID I term = zero for some reason.

Ah, maybe you just want a second opinion.  I can understand that.   :o
« Last Edit: March 03, 2018, 10:30:02 am by TheOtherCliff »

f5soh

  • *****
  • 4572
    • LibrePilot
Re: Latest next fw. problems
« Reply #16 on: March 03, 2018, 10:19:49 am »
Which timing for the drop part (instant, slow?)  and how many time it takes to remains to the previous altitude ?
Can you post your config file ?

karla

  • *****
  • 629
Re: Latest next fw. problems
« Reply #17 on: March 03, 2018, 10:34:24 am »
at Laurent,
not really sure I am right here, but this link may show a video and also have a log file of the drop you ask for,
so you can see it
https://forum.librepilot.org/index.php?topic=3999.msg28215#msg28215

If this is out of line, just ignore it :)


Re: Latest next fw. problems
« Reply #18 on: March 03, 2018, 11:46:31 am »
The change to flight/libraries/math/pid.c that I described in reply #4 should fix that perfectly like it used to be and also have the fix intended in the change that broke it.
https://forum.librepilot.org/index.php?topic=4155.msg28197#msg28197

If you like the way this worked in 16.09, that change will make it work that way, but be better in case you configure PID I term = zero for some reason.

Ah, maybe you just want a second opinion.  I can understand that.   :o
Yes and no, just wanna know why this was included in 16.09 and now is changed? Nobody notice this behaviour? I'm struggling for now to compile the build again and include the modified pid.c according to you (TheOtherCliff). Thanks, hope I'm not offended you.
« Last Edit: March 03, 2018, 11:51:04 am by octavvian »

Re: Latest next fw. problems
« Reply #19 on: March 03, 2018, 11:49:16 am »
Which timing for the drop part (instant, slow?)  and how many time it takes to remains to the previous altitude ?
Can you post your config file ?
~config attached

PS. the drop only occur in transition from stabilized to althold flight mode (each time when repeated)

Re: Latest next fw. problems
« Reply #20 on: March 03, 2018, 12:01:49 pm »
Yes and no, just wanna know why this was included in 16.09 and now is changed?

I think this used to work well in 16.09.  The change was made (from comments) because if you set PID I term to zero, the I term can't unwind when / if it is wound up.

No offence taken.  :)

Re: Latest next fw. problems
« Reply #21 on: March 03, 2018, 12:45:44 pm »
The "drop" is shown very nice in the vid from a topic - https://forum.librepilot.org/index.php?topic=3999.msg28230#msg28230.

==https://youtu.be/U87Xt3ug_0o== see 16 sec time frame.

Re: Latest next fw. problems
« Reply #22 on: March 09, 2018, 05:51:22 am »
Has anyone verified whether the change in post #4 fixes this issue?
https://forum.librepilot.org/index.php?topic=4155.msg28197#msg28197

Re: Latest next fw. problems
« Reply #23 on: March 09, 2018, 07:24:35 pm »
Hi, I succesfuly complied the fw. with the pid.c modified acording to your suggestions. But unfortunately didn't tested yet. I'll hope this week-end... :)

Re: Latest next fw. problems
« Reply #24 on: March 12, 2018, 07:52:47 pm »
Hi, I succesfuly complied the fw. with the pid.c modified acording to your suggestions. But unfortunately didn't tested yet. I'll hope this week-end... :)
Tried, same 0.5-0.8m drop, I switch to altvario (hold) at 45% throttle, about 1,5-2m.
Maybe could anyone try too as second opinion :(.

Re: Latest next fw. problems
« Reply #25 on: March 15, 2018, 08:30:31 am »
AH is the best test because AV must be at 50% throttle to maintain altitude.  If your quad hovers at below 40 or above 60 throttle, then you will have some vertical motion when switching into or out of AV.

I guess I need to retest this.  Right now I am running 16.09 on all my stuff.

Re: Latest next fw. problems
« Reply #26 on: March 15, 2018, 11:26:04 pm »
I just tested it with next r550-g213893e and the code fix in reply #4 fixes the issue perfectly for me.

Make sure you replace the one line with the set of several lines.  If you put the new code above the single old code line it will still break.

Then save the file.  Then build the FC firmware you need.  Then flash the new FC firmware.  Settings are the same.  No need to erase settings or change anything when you swap these firmwares.  First time each flight, make sure you hover (no climb or descend) for a few seconds before switching into AH.

Is it very windy where you are testing?  I wonder if that could have an effect.

I verified that it works correctly in 16.09
I verified that I can see the issue in r550 next.
I verified that after the fix, the issue is gone in r550 next, and it works as well as 16.09.

Tested switching from:
    Attitude, Attitude, Axislock, ManualThrust
to
    Attitude, Attitude, Axislock, AltitudeHold
in all cases.

Details:
I have adjusted my AH PID to some higher numbers, so it reacts more quickly.  I enjoy flying that way because you can slam the stick around and it automatically applies full acceleration power or full braking power.  When the issue happens it only drops 10 to 15cm, but you can see it unless it is climbing slightly when you switch into AH.
« Last Edit: March 15, 2018, 11:42:46 pm by TheOtherCliff »

Re: Latest next fw. problems
« Reply #27 on: March 16, 2018, 07:25:28 am »
Thanks for effort, Ill try to figure out.
Regarding the place or the wind, the test was done indoor. One more remark with 16.09 the copter never fall, the behavior appear when switched to next.
As a kind request, could you provide the modified pid.c file?
All the best!
« Last Edit: March 16, 2018, 07:41:40 am by octavvian »

Re: Latest next fw. problems
« Reply #28 on: March 17, 2018, 04:42:59 pm »
I read your message before you modified it, so I didn't see the request.  :)

The next I used was from December 2017.

I don't know what version of next you are running.

pid.c does not get changed much though.  The December version should work fine.  You could also use the 16.09 version of pid.c

After replacing the file you could do:
    git diff flight/libraries/math/pid.c
and it should only show the changes we are talking about.  That is a way to make sure there are no other changes in this file.

I would first replace the file then clean the current firmware like this (assumes you have Revolution FC):
    make revolution_clean
then build it like this:
    make revolution
then flash it and test it, no need to erase settings.

Here is the pid.c I used (attached).
« Last Edit: March 17, 2018, 05:26:14 pm by TheOtherCliff »

Re: Latest next fw. problems
« Reply #29 on: March 17, 2018, 09:56:08 pm »
Thanks a lot. I'll post the result after test.