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
Nav launch manual throttle option #8134
Nav launch manual throttle option #8134
Conversation
@breadoven Something you may not be aware of... Is the way normal launch and auto launch deal with I-term accumulation, and I-term error windup. Auto launch presently prevents the I-term from growing, until after the model is thrown, and launch throttle is activated, through detection.
|
The launch code resets error accumulators until motor spin up after detection so this isn't active if you start the launch after this as this option does. However, this is no different to shaking to initiate the motor before throwing (not something you're supposed to do I guess but many seem to use this method). So I don't see this option as being any different to the shake and throw method, it just cuts out the shaking bit to get the motor running instead allowing you to do it in more controlled way using the throttle directly. In either case you need to be aware of the wind up issue and throw immediately the motor is running to avoid problems. You can't wait too long anyway once the throttle is raised using this option or the shake and throw method because the launch end timer will have started potentially cutting the launch short if you wait too long to throw. Did make me wonder if using the recent code to detect if a fixed wing is flying could help here, reset error accumulators until flight is detected (usually very quick unless you launch into a howling gale but in that case you probably wouldn't want to use Nav launch anyway). I'll consider adding something to reset the error accumulators if this option is used and the throttle is low. Shouldn't be needed though should it since anti wind-up is active with throttle low anyway ? I have noticed that even if you use detection to start the launch after you've thrown that the plane will often take some time to correct any roll introduced by the throw. Stabilisation seems a but sluggish until it gets going. |
I think I missed a case.... Concerning But when Airmode is permanently enabled. It effects all the Angle based modes. By not resetting i-term or error if the throttle is lowered. Question - But if it doesn't have Air mode permanently enabled, then it will certainly activate the i-term as soon as the throttle is raised. |
I'll just test it and see if anything bad happens especially if you don't throw immediately after raising the throttle. As I said before this is just replicating the shake and throw method but using the throttle stick to directly control the motor. With the throttle stick low it should behave the same as prior to detection, error accumulators and tpa are reset (PR needs updating to include this) as is the launch end timer. Raising the throttle essentially acts like the detection phase, it stops resetting the error accumulators and starts the launch end timer. I guess the main problem with this is it isn't fool proof, you do need to launch as soon as you raise the throttle so maybe this needs emphasising in the "documentation". You have the same problem if you use the shake and throw method, you can't sit there with the motor running because apart from anything else the launch end timer will time out and the launch finish before you've thrown and also there's the wind up issue. But why wouldn't you launch immediately ? Did occur to me that the launch with throttle low change I've been using for a long time now would have |
Flight tested with a change that resets error accumulators and TPAFilter up until flight is detected. Launching worked as expected, climb out behaved no differently to a normal launch using launch detection. Start of flight is detected in around 200-300 ms from release even launching into a bit of a headwind so this is similar to using launch detection which starts the motor in a similar time frame depending on settings used. Flight detection has also been added to start the end of launch timer rather than just relying on the throttle stick position. So using flight detection avoids any issues with ITerm wind up and the launch ending earlier than expected. It does however require a GPS lock to work. This option will still work without a GPS but you can't hang around with the throttle raised waiting to launch, you need to launch as soon as the motor is running. The setting description has been updated to reflect this. Still needs a bit more testing but otherwise seems to work OK and a better option than the shake to start method IMO. |
I know this is a wild edge case.. but I thought it might be worth mentioning. But in the case that launch was not detected (GPS plug detached from the force of the throw).. It would appear that the launch cannot be overridden/aborted by the roll stick alone, unless the throttle stick is lowered.. Which may leave the pilot without control if urgently required. Or even a temporary fly away, because the launch timer would not have been activated either? |
If Have you tested this change @Jetrell ? |
@breadoven I ran about 10 launches with the latest commit... Having
There is one thing I'd like to bring up, concerning both auto launch methods... Its the limited stick abort deadband that both the elevator and aileron sticks have from center. |
I think increasing the deadband is a good idea. Why not 50uS? That's still only 5% movement. So 2.5% in each direction. Still tiny. |
I actually already made a change some time back that makes the stick movement dead band customizable specifically for the launch reason. I've knocked the stick on throwing a few times causing the launch to abort ... annoying. I currently have it set at 250us just for launch. It remains the same at 10us otherwise. I'll do a PR if this sounds better than just increasing it in all cases. |
@breadoven could you please resolve conflicts? |
All fixed. |
Adds an option to use Nav Launch with fully manually controlled throttle. For those that prefer to launch with the motor already running before launch this seems a better option than having to shake the model to start the motor or using high idle throttle settings which cause problems if the launch isn't detected. On arming the throttle just needs to be raised to the required power and the plane thrown with INAV controlling only the climb out attitude. The throttle can be controlled by the stick during the launch.
The launch initiates at the "launch in progress" phase since all the previous phases, motor idle control and launch detection are redundant. The launch ends as usual except the throttle holds the stick setting. Launch can be aborted in the usual way by moving the sticks. Also launch timeout starts from the moment the throttle is raised. If the throttle is lowered again the launch timers are reset so the launch only ever starts from the moment the throttle is raised.
Still needs flight testing but bench testing works as expected.