Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed control and RTH/FAILSAFE improvements #1401

Merged
merged 4 commits into from
Mar 30, 2017

Conversation

digitalentity
Copy link
Member

  • Split auto/manual speed and climb rate limitation
  • Remove 2D RTH
  • RTH sensor loss refactoring

@digitalentity digitalentity added this to the 1.7 milestone Mar 13, 2017
@oleost
Copy link
Contributor

oleost commented Mar 13, 2017

What does remove RTH 2d mean?

@digitalentity
Copy link
Member Author

Originally it was possible to activate RTH mode if you don't have an altitude sensor - it will just fly home at current throttle without maintaining altitude. I'm taking this away now - it's potentially unsafe and actually useless feature.

@sppnk
Copy link
Contributor

sppnk commented Mar 13, 2017

By 'not having altitude sensor' is included GPS altitude?

@digitalentity
Copy link
Member Author

@sppnk "not having altitude sensor" is machine-specific. For quads it's not having barometer sensor. For planes it's not having barometer and not having a GPS fix.

@sppnk
Copy link
Contributor

sppnk commented Mar 13, 2017

ok, good to know.

@oleost
Copy link
Contributor

oleost commented Mar 13, 2017

@digitalentity Hmm, maybe the current implmentation was useless.

But even a multirotor would probably get home nicely without barometer and only relying on GPS altitude?

@digitalentity
Copy link
Member Author

@oleost it might. But I feel that having a barometer is benificial for an airplane as well.

@oleost
Copy link
Contributor

oleost commented Mar 14, 2017

@digitalentity Yes.

@digitalentity digitalentity changed the title Speed control and RTH improvements Speed control and RTH/FAILSAFE improvements Mar 15, 2017
@Linjieqiang
Copy link
Contributor

Looks great.The code will be cleaner than before.

@digitalentity
Copy link
Member Author

It would be good if somebody can test this code - I'm sick at the moment and unable to fly my birds.

@oleost
Copy link
Contributor

oleost commented Mar 28, 2017

#1475

@Linjieqiang
Copy link
Contributor

Linjieqiang commented Mar 30, 2017

Last day I tested it with my wingwing.It looks great but I wonder why my pitch channel didn't work when changing althold mode?Maybe I will test this branch again today.

@digitalentity digitalentity merged commit 44cfad4 into development Mar 30, 2017
@digitalentity digitalentity deleted the nav-cleanups-fixes branch March 30, 2017 08:38
@Linjieqiang
Copy link
Contributor

Nice today..It didn't have any problem about this operation.

@giacomo892
Copy link
Collaborator

Seems like in 1.7 there the "bug" still here @digitalentity despite it has being fixed as this PR and #798

LOG00290.TXT

Using:

set nav_auto_speed = 800
set nav_manual_speed = 1000

I get steady 8m/s in PH CRUISE instead of expected 10m/s as you can see from the logs.

I'm pretty sure I was full pitch when I was a 8m/s and there was no strong wing.

@digitalentity
Copy link
Member Author

@giacomo892 I believe @DzikuVx tested it successfully.

@giacomo892
Copy link
Collaborator

@digitalentity you can check for more logs if you need in #1675

@DzikuVx
Copy link
Member

DzikuVx commented May 15, 2017

@digitalentity No I did not

@digitalentity
Copy link
Member Author

@giacomo892 in your log I see velocity target reaching 9m/s and actual velocity reaching 9m/s as well. Certainly not 8m/s.

Are you sure you have set nav_manual_speed = 1000 ?

@giacomo892
Copy link
Collaborator

giacomo892 commented May 16, 2017

@digitalentity Maybe it is rounded and there could be some wind. With MWP I mostly see it as 8m/s and some spikes to 9 as you say.

this is the diff I saved on file:

set nav_use_midthr_for_althold = ON
set nav_user_control_mode = CRUISE
set nav_auto_speed = 800
set nav_auto_climb_rate = 350
set nav_manual_speed = 1000
set nav_manual_climb_rate = 400
set nav_mc_hover_thr = 1510

Yes, the diff show it, but to be 1000% sure I'll check it again on friday.

@digitalentity
Copy link
Member Author

@giacomo892 I've just found a bug that prevents manual control from reaching the nav_manual_speed. Speed controller itself is not limited, it's a bug that prevents us from requesting the nav_manual_speed value. With default settings it limits max setpoint to precisely 90% which gives 9m/s max speed at nav_manual_speed = 1000

@giacomo892
Copy link
Collaborator

It's nice when I can help spotting bugs. Thanks for your investigation and when you have time please visit #1675 ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants