inav icon indicating copy to clipboard operation
inav copied to clipboard

Simplify launch mode

Open brat002 opened this issue 9 years ago • 46 comments

Some time ago I've asked about an implementation of "simple launch assistant". After hard troubles with my planes and my friend's planes I am asking to do that again.

How this should work:

  1. Enable launch mode
  2. Arm the plane
  3. Motor starts to rotate with desired thrust. Elevons is up to maintain predefined angle 5-30.
  4. Throw the plane.
  5. After reach predefined altitude plane should switch to main flying mode.

Please. Current implementation is not clear and not safe. Each launch has LOT of actions to do something incorrect and to bend your new plane about the earth or damage equipment.

brat002 avatar Oct 03 '17 21:10 brat002

i'm in for for this. I quit using launchmode because my wing hits the dirt more then it flies. No i just use a mixer on my transmitter so it gives a bit of up elevator and i throw the wing on full throttle.

michaelvanderhoek avatar Oct 04 '17 09:10 michaelvanderhoek

What we need is better documentation. Current launch mode can be configured to act like you describe minus the target altitude (which I’d find dangerous). Also, the default values for the auto launch setting need to be safe for all types of planes, which makes them not optimal for flying wings thrown by the side. What I do in my wings is set the idle THR while launch mode is enabled to 1200-1300, so the motor is already spinning before throwing it, and I lower the waiting times since my hand is never close to the prop. Note that this would be unsafe for airplanes thrown by the bottom with a pusher prop, that why we don’t want to make it the default.

fiam avatar Oct 04 '17 09:10 fiam

Not default certain, but as option - for flying wings this will be much more convenient than current implementation.

brat002 avatar Oct 04 '17 10:10 brat002

This the configuration I have in my S800 with some comments (default settings omitted). Give it a try and let us know.

# Forward velocity the plane needs to reach for the launch sequence to be detected in cm/s.
# 3 m/s seems like a good compromise between false triggers and the force required to throw
# the plane. You can go lower if your hands are never close to the prop. Note that by default
# applying more than 2G of acceleration in the forward direction will trigger launch too
# (nav_fw_launch_accel).
set nav_fw_launch_velocity = 300
# How long (ms) horizontal velocity needs to be over nav_fw_launch_velocity until the launch
# system detects the plane has been launched. You can go lower if your hands are never close to the prop.
set nav_fw_launch_detect_time = 30
# I think the default is 1700 here? Depending on your power train you might want a different value.
set nav_fw_launch_thr = 1800
# THR when idle set to 1200 so the motor starts spinning before being thrown. Makes it
# almost impossible to miss a throw.
set nav_fw_launch_idle_thr = 1200
# Time (ms) since launch is detected until motor is started. If your hands are never close to the prop
# You can make this as low as you want.
set nav_fw_launch_motor_delay = 50
# Time (ms) since launch sequence starts until motor reaches nav_fw_launch_thr. You probably don't
# want to go lower than 100 since sudden motor speed changes cause stress in the ESC and motor
set nav_fw_launch_spinup_time = 100
# 10 seconds timeout. Default is 5. After this interval, the auto launch system will release control
# even if you haven't touched the sticks.
set nav_fw_launch_timeout = 10000
# Climb angle using during launch. This is 18 by default, but it highly depends on the plane. You
# can go higher if you want.
set nav_fw_launch_climb_angle = 23

fiam avatar Oct 04 '17 10:10 fiam

set nav_fw_launch_timeout = 10000 <- most of my concern is about that option. You don't know if iNav still handles the plane in launch mode or not. If you throw the plane on 11th second - it will fly to the ground. With default 5s timeout - plane will throw in the ground almost every time.

Please return us normal way to launch plane without all of this excess magic. Current implementation is for catapults. How much people are using catapult to launch their plane with iNav?

brat002 avatar Oct 04 '17 10:10 brat002

nav_fw_launch_timeout is for telling iNAV after how much time stopping climbing. Not how much after the launch option is disabled on the ground.

giacomo892 avatar Oct 04 '17 10:10 giacomo892

I don't know why, but after short climb the plane strongly dives to the earth.

brat002 avatar Oct 04 '17 10:10 brat002

The sole purpose of launch mode is to prevent PID controller from winding up when plane is not flying.

When you pull the pitch stick on the ground with motor running PID controller won't be able to satisfy climb angle bevause FC has no control. However, since FC is unaware that the plane is not flying it will try as hard as possible by saturating the servos. Then, when you finally throw the plane you may end up with weird behavior.

The key feature of launch mode is detection of the launch. Without it this mode is no different from a pitch mix on your TX. Therefore I don't see a point in adding requested behavior to the code.

digitalentity avatar Oct 04 '17 10:10 digitalentity

@brat002 do you have strong dive down when using launch mode or when using manual launch?

digitalentity avatar Oct 04 '17 10:10 digitalentity

In addition to my comment above:

I do, however, think that we should make launch detection user-selectable option to allow user chose from THROW, SWING or GPS speed.

digitalentity avatar Oct 04 '17 10:10 digitalentity

@digitalentity ... that would help a lot while thinking of greater planes! I can't swing a full loaded heavy Skywalker X6 :) ... thats more a THROWing there and hope the prop wont shredd the hand !

Pairan avatar Oct 04 '17 11:10 Pairan

@brat002 do you have strong dive down when using launch mode or when using manual launch? Both. My previous plane was completely destroyed due that, but my friend's plane almost does same every launch. Just luck to restore control above half meter above earth.

I do, however, think that we should make launch detection user-selectable option to allow user chose from THROW, SWING or GPS speed. Or NONE. In this case plane should be ready to stabilise and climb just after enabling launch mode. Value of throttle should be an user select for each launch.

I will cry of happiness if this would appear.

brat002 avatar Oct 04 '17 12:10 brat002

Ok, let's make it happen in 1.8 then :smile: I would appreciate if you guys would help testing this

digitalentity avatar Oct 04 '17 12:10 digitalentity

Sure!

brat002 avatar Oct 04 '17 12:10 brat002

The S800 Sky Shadow will surely try all methods ;)

Pairan avatar Oct 04 '17 12:10 Pairan

Why would you want to choose between different launch detections? What if you want to to trigger on which ever scenario is met first?

Maybe a simpler GUI for selecting the different parameters with explanations is all we need?

Current implementation is very powerful and allows the user to set it up exactly as he wants.

oleost avatar Oct 04 '17 13:10 oleost

Current implementation is very powerful and allows the user to set it up exactly as he wants.

That might be true, but people need to get "educated/guided" here, as many seem to toss their craft and hope for the best! ( "iNav will do this for me" ... NOT! :D ...)

I got it working on mine but of course ended up in fails sometimes ...

Perhaps something like presets for the parameters (like in the type of craft presets) could help here and leave it open to the users while still being able to tweak on everything?!

Optimized basics for a swing, a overhead toss, basic throw (uh nasty with wrong params btw) or something like that. Allthough this could be hard to create matching profiles but I assume it to be even harder to hard code those movements/values.

How about that @oleost @digitalentity ?

Pairan avatar Oct 05 '17 08:10 Pairan

IMHO the people should just read the documentation before using iNav, but that seems to be the hardest part for most of them. If we make more options to choose, most people will be more confused than now. How could Launch Mode be more simple than now?

Schalonsus avatar Oct 05 '17 09:10 Schalonsus

Just try to keep this mode as simple as possible. Current implementation is really not simple to use. Many options - many mistakes, hard to test and use it.

2017-10-05 12:01 GMT+03:00 Schalonsus [email protected]:

IMHO the people should just read the documentation before using iNav, but that seems to be the hardest part for most of them. If we make more options too choose, most people will be more confused than now

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/iNavFlight/inav/issues/2251#issuecomment-334404330, or mute the thread https://github.com/notifications/unsubscribe-auth/ADyecO5IdheCCaX0gS_bk3mzXUC0AprJks5spJrRgaJpZM4Psycw .

brat002 avatar Oct 05 '17 09:10 brat002

Current implementation launch mode is as simple as it could possibly be. Defaults are safe and reliable for small planes (up to 80-100cm wingspan). Generally you need to set up only a few parameters:

  1. Launch throttle value that is used to climb (nav_fw_launch_thr)
  2. For bigger planes you might want to lower the acceleration threshold (nav_fw_launch_accel).
  3. For classic planes you may want to keep props spinning at some throttle value while waiting for launch (nav_fw_launch_idle_thr)
  4. You may also want to adjust delay between throw and motor startup (nav_fw_launch_motor_delay).

If you want to do it simpler - configure pitch mix on your TX and don't use launch mode.

digitalentity avatar Oct 05 '17 09:10 digitalentity