Hi guys... couple of comments from ctznooze - First, thank you Mark for making the video! - Second, apologies that the build option names are changing as we move forward - Please check the opening comment on the PR itself, I'll try to keep that up to date - Baro often causes a change in altitude when the quad moves quickly, does for me, and is hard to avoid; I hope to improve the way we estimate altitude to minimise this, later on - Altitude Hold can work quite well with GPS only, but needs a lot of sats for good altitude control - If the quad takes an incorrect angle, and/or fails to stop the quad when initiated, it means that the heading information is incorrect. If the quad has a Mag, it isn't quite oriented or calibrated well enough, or if it has no Mag, then the IMU code that integrates GPS heading has become disoriented by drift. - In my testing, both with and without Mag, Position Hold would level out from Acro inverted without any problem. In the video, the presence of a sideways tilt when entering Position Hold indicated something up with the IMU heading orientation. I noticed that the preceding Position Hold also had a tilt. This indicates that either the Mag wasn't right, or the Heading estimation was off, for some reason that I'm not able to explain.
@uavtech11 күн бұрын
Thanks Chris. GREAT WORK ON THIS PR!! 😃 I can keep testing. The persistant tilt while in stable POS Hold was fighting the steady wind Saturday. When I did an inverted trigger, it would hold a tilt and stay locked on it even if I moved the sticks afyer POS Hold failed. Seems like when POS Hold fails, should flip it to Angle so it does not fly off? I had to flip out of POS Hold to get have stick input do anything. You can see it in the video, the one time, if you watch the sticks vs craft.
@ctzsnooze8 күн бұрын
@@uavtech If you see 'pos hold fail', after it has worked previously, it means that a sanity check has failed. The simple sanity check is that it drifted, or flew, more than 10m away from the 'target location'. If you initiate at speed, the distance is set to something greater, like if you are doing 20m/s it's going to overshoot more, so the sanity check distance is temporarily increased. Once you get 'pos hold fail'. it will never 'recover' by itself. It will go back to whatever mode it was in, and you'll have to toggle the switch. The pilot needs to either: - cycle out of position hold, and back into it (immediately, if you like) - or just fly in whatever mode you like, get stable, go to Angle mode and check that angle mode itself is working, then try position hold again. The most common reasons for position hold failing are: - there is no Mag, and the IMU heading is being derived from GPS, and this has become disoriented somehow. In other words, the heading estimation is wrong. The quad will then tilt to to a weird angle and, instead of moving in the correct direction, it may go off on an angle or even completely the wrong way. - you have a Mag, and it's 'bad' - not oriented correctly, or the calibration is bad. - or, finally, you've had a bump and Angle Mode itself has a bad offset that it sometimes gets (for reasons we've never figured out.
@chuksrc2 күн бұрын
Been a long time coming. Thank you Mark, Chris and everyone of the betaflight community.
@rayang99294 күн бұрын
THIS IS HUUUGEEE, this is absoultely a game changer
@edenr19889 күн бұрын
Awesome overview of the features. About the issue of during flips clicking on Position hold, maybe it’s better to be able to have configurable stages. Something like go to Angle mode and only then to Position hold. It works pretty solid with GPS rescue. I did a few dives and clicking on Failsafe with a stage that moves first to Angle mode before the GPS rescue kicks in. IDK maybe it’s the same story, worth trying out. Similarly with the DJI drones - there is either a pause button or a failsafe. If the same concept would be possible in beta flight that would be awesome to be able to configure what the pause button do, when pressing it (I.e mixture of stages, angle mode -> position hold). Keep it up, great content! 👍
@gregdavidd12 күн бұрын
The one option I have always wanted with iNav is to be able to disable stick inputs so regardless where my throttle is or if I move a stick inadvertently it stays put. I have no reason to fly it while in Pos hold anyways. I think most people would use Pos hold to swat a mosquito or to spray a bear :)
@gregdavidd12 күн бұрын
Just found an answer to my own question: pos_hold_deadband=0 (instead of 5). Its great that they included this because its a lot more complicated to accomplish this in iNav.
@iFlyGood10 күн бұрын
@@gregdaviddmore gold in the comments! Thanks for sharing!
@bigdatapimp12 күн бұрын
bit of sponge over the Baro might help with the altitude dipping when moving side to side. The Sponge allows for pressure change but acts like a bit of a capacitor and smooths out the pressure changes.
@Anadrolus11 күн бұрын
Do you glue it ? How ?
@proto.type_io11 күн бұрын
Squeeze between the stack or cable tie sponge to keep it in the baro hole.@@Anadrolus
@DarpaProperty11 күн бұрын
Good idea.
@iFlyGood10 күн бұрын
This is the information that keeps me on this hobby. There's always something new to learn. I haven't tapped into optimizing the barometer but now that I stumbled upon this I might as well! Thank you for the comment.
@user-rs8zg8ey2b10 күн бұрын
Been using a small bit of foam for the last decade on arducopter
@Lex1uth3r8 күн бұрын
FINALLY! This is so awesome, just flashed my quad, can't wait to test it out! Thanks for sharing!
@Fleche_FPV12 күн бұрын
After 6 years, I feeeeeel GOOD !
@hoagietime111 күн бұрын
So happy for this, last weekend I was doing snowy mountain surfing and I would pop into angle mode and slowly climb so I could warm my fingers. Inav won't work on my speedybee fc so I'm definitely testing this out
@ctzsnooze11 күн бұрын
Some long-range guys figured that if you have a spare rotary pot on the radio, you can use your radio's mixer to provide a constant pitch forward angle, in either altitude hold, or position hold. By adjusting the pitch angle, the quad will then maintain constant velocity at constant altitude :-)
@tstrrtstrr74511 күн бұрын
Yeah this is really good for maxing long range flights. Add efficiency (mAh/km) to OSD and adjust forward speed for maximum efficiency.
@b14ckyy11 күн бұрын
In INAV that is called Cruise mode and is in there since over a year in INAV 7.
@hi_desert_rat12 күн бұрын
Looks pretty good! Wtg BF devs! Thx Mark!
@ndcapper11 күн бұрын
Great stuff devs! Looks good for v1 but I imagine the next releases will solidify its functionality
@yam1989012 күн бұрын
thank you for the update was waiting for this for a long time
@MCsCreations12 күн бұрын
It seems to work great! 😮 Thanks, Mark!!! Stay safe there with your family! 🖖😊
@JoseMaDizon12 күн бұрын
Nice!!I need this for hand landing. I find it hard to locate the drone after I raised my googles
@ctzsnooze8 күн бұрын
This is the 'author' of the code doing exactly that.
omg wow finally amazing. So can you do tricks with altitude hold? LOl so cool.
@phiveone9 күн бұрын
Just slappin' batteries around!
@TheGeordietheWitchandtheWench10 күн бұрын
Its about time!!!!! 😂
@elmarirony558011 күн бұрын
Hello, is Magnetometer strongly required for this function?
@Fly_High_FPV11 күн бұрын
No mag required
@AE0NFPV12 күн бұрын
My testing concurs with your examples. The better your HDOP the better/faster it will acquire the POSHOLD. Even with good HDOP, i had "fish-bowling" too.. all-be-it not as much when cruising very slow Activating POSHOLD from an inverted position - I think the first command sent is "ANGL mode" then the accelerometer takes over, and its just my suspicion, but i think the accelerometer activates(or inflight cal) too soon, making it think its level* thus~ giving you that "flyaway into neverland" action, after it fails this sanity check, POSHOLD ERROR appears on screen. I think the time between ANGL>ACC should be lengthened or at-least adjustable to try to solve this My only note is the throttle, first time activating, it surprised me and I had to check the patch notes again, it would be nice if there could be a message displayed on screen just to remind pilots that their throttle is about to "change to something you don't normally have" but not as word-y 😅 More testing from myself will continue when the weather gets better!
@ctzsnooze8 күн бұрын
Fish-bowling (tending to circle around a bit) means that there is a problem with *heading*, not altitude control. Heading is never super accurate in GPS-only builds. You need to fly dead straight for 100m fairly quick to calibrate the quad to the GPS heading. However if you then kind of wobble around that 'calibration' gets lost a bit, and the heading becomes inaccurate, and your position hold won't be so good. If you have a really well set up Mag, you'll get zero circling issues regardless of how you fly.
@LetsFlyRC6 күн бұрын
I flashed 4.6 to a Tmotor F7 (target) flight controller and the osd tab is missing along with all cli elements relating to osd. I tried searching for osd option during flashing (other options) and it isn't available. Any ideas why I can't see osd in the configuration tab? The checkbox to select osd is missing in the config tab
@uavtech6 күн бұрын
app.betaflight.com???
@LetsFlyRC6 күн бұрын
nevermind there is a new osd drop down during flashing that I didn't notice
@LetsFlyRC6 күн бұрын
@ yes, but, I found the problem, I didn’t notice the new osd selector during flashing
@vietmove10 күн бұрын
I have two drones with yesterday-fw4.6 flashed, different flight controller, one auto fall down if in airmode when deactiving alt&pos_hold, if in angle its fine; one cannot active alt&pos_hold if not in angle mode. Anyone know if its the problem?
@user-om9fu6iw5x12 күн бұрын
Will we finally be able to use a rangefinder with betaflight? I would love to use VL53L0X/VL53L1X or even the Micoair Mtf-01.
@uavtech11 күн бұрын
I don't think so just yet.
@sylvainb947011 күн бұрын
how did you represent stick trails on gimbal ghost app?
so if I have the pavo 20 pro with gps installed I just need to update through betaflight?
@Eugenue12 күн бұрын
Is a barometer enough to maintain altitude? Or is GPS absolutely necessary?
@uavtech12 күн бұрын
@@Eugenue baro is enough
@amarkentwell286612 күн бұрын
The more sensors it uses, the better the estimation. Barometers will drift more at lower temperature. Something that is unavoidable. This is why Pixhawk has its sensor hardware in a temperature controller environment.
@Eugenue12 күн бұрын
@@uavtech Thank you!
@CoryYearwood9 күн бұрын
Hi there, Will this work with 'MTF-01P' Lidar with Opticalflow sensor? If so what settings would I need to be added to my CLI.
@DarthPlasma11 күн бұрын
What about the transition to acro? Since the throttle is at 50%, when you switch to acro it will puch up
@uavtech9 күн бұрын
Deadband covers you. Also, you can set Ascend/Descend point (i.e.: 1350)
@WindjumbieFPV12 күн бұрын
It works well for me :)
@RiloFPV12 күн бұрын
I wanna try this
@apollodorusII12 күн бұрын
Great video. I have a Diatone Mamba AIO FC and its barometer sucks. It gives very bad readings. What external barometer do you recommend? Or what FC comes with a competent barometer built-in? Thanks
@Max_N.12 күн бұрын
dps310
@BlakasutaFPV12 күн бұрын
I cannot get alt hold and poshold on modes unless I choose 13975 on custom define.
@uavtech12 күн бұрын
choosing BF 4.6?
@jonathanoeijoeng12 күн бұрын
@@uavtech yes, BF 4.6 but when I put 13975, I can get alt hold and pos hold
@jonathanoeijoeng12 күн бұрын
btw, I was using web configurator to make sure use the most updated one
@jonathanoeijoeng12 күн бұрын
@@uavtechapparently they changed to ALTITUDE_HOLD and POSITION_HOLD in custom define
@jonathanoeijoeng12 күн бұрын
@@uavtech apparently we need to use ALTITUDE_HOLD and POSITION_HOLD in custom defines instead of choose Altitude Hold Mode in Other options and POS_HOLD_MODE in custom defines
@omrisharon11 күн бұрын
it goes down not because of a sensore issue, but due to the fact that betaflight doesn't compensate for tilt correctly. instead of measuring the throttle offset (what is the highest throttle position that gives 0 acceleration in the body z axis before we get thrust) and then divide the the throttle RC_data by the cos(tilt_angle), they do some kind of a bad approximation which doesn't really work. I made altitude hold a long time ago for betaflight 4.3 and i encounter the same issue and I solved it using this correct tilt compensation (basic trigonometry). yes, it does require to somehow calibrate the throttle offset, but it can be done in mid-flight using a fit or even a pid controller and getting its I term. how do you think DJI, Autel and Skydio managed to overcome this issure even when using the same barometers? software only.
@uavtech11 күн бұрын
Maybe. But INAV does the same thing and when you log the BARO, you can see it thinks the craft is rising when you move side-to-side. That causes the controller to reduce the motor RPM to descend when in reality the craft is not ascending in the first place. I imagine Betaflight suffers from the same issue.
@ctzsnooze11 күн бұрын
No, we have very accurate, and very fast, tilt compensation in Altitude Hold. You can check the code... see flight/autopilot.c around line 196. If you disable Baro, that drop in altitude when speeding up or slowing down, either with pitch or roll, won't happen. The main reason is either turbulent airflow around the baro, or a generalised increase in air pressure in the region of the baro due to airflow into the centre plate area with some relative obstruction to its exit. DJI etc do not put their Baro on the FC and do not expose it to incoming external airflow forces.
@omrisharon11 күн бұрын
@@ctzsnooze i see what you did there: const float hoverOffset = apConfig()->hover_throttle - PWM_RANGE_MIN; float throttleOffset = altitudeP + altitudeI - altitudeD + altitudeF + hoverOffset; const float tiltMultiplier = 1.0f / fmaxf(getCosTiltAngle(), 0.5f); // 1 = flat, 1.3 at 40 degrees, 1.56 at 50 deg, max 2.0 at 60 degrees or higher // note: the default limit of Angle Mode is 60 degrees throttleOffset *= tiltMultiplier; but again, this is not the correct way of doing that (but I am glad to see that you changed the angle mode compensation). this is because the throttle position vs accel_z_axis_body_ref looks more like a rectifier than a linear response. the hover throttle doesn't really matter here, it is how much thrust the drone can produce vs throttle position. not just that, also a single pid controller instead of a cascade pid for altitude is doomed to fail. I went through it in BF4.3, a long time ago. I already tried what you have done. i had to figure out what is the "correct" or "working" way to solve this annoying issue.
@iFlyGood10 күн бұрын
Share BF 4.3 Alt hold 😅@@omrisharon
@ctzsnooze8 күн бұрын
@omrisharon We tested out including hover throttle, vs not including hover throttle, in the tilt correction. In the end we found that it was better to include the hover throttle. Originally I only tilt-compensated the correction (not including hoverOffset), but on low authority builds in particular, that didn't work out as well as including it. The performance of tilt correction does seem perfect when GPS-only altitude inputs are applied. You can verify this by flying around in altitude hold mode and angle mode. Your other comment was that the underlying controller should be a cascaded controller, and I assume you mean an inner velocity controller, and an outer altitude controller. Indeed it is possible that this may work better. Other have said the same thing. However the inner loop then is just the derivative of the outer and there is no reason to expect it actually will work better since the coefficients simplify out to be the same. The current altitude controller is as simple as it gets, intentionally. It is not the 'final' method. The intent is that improvements can be benchmarked agains this first draft. Betaflight developers would greatly welcome any PR from you that improves performance of the altitude hold algorithm. Don't be shy :-)
@w1llyFPV12 күн бұрын
Do I need to have gps with magnetometer to be able to use position hold? All small modules of gps doesn't have it for example FlyFishRC M10 Mini gps which is very good for all small quads like Pave20 pro. Will it work as your shown? (similar like o. Avata2 😅)?
@uavtech12 күн бұрын
nope. See end of video
@ctzsnooze8 күн бұрын
If you want it to work really accurately, and from the instant you take off, then you must have a Mag. A GY-271 module is easy to add and set up. But yes it will work GPS only, but you will have to fly straight ahead for 50-100m to 'calibrate' the heading to the GPS each time you take off before you can use Position Hold.
@metaldirtnskin11 күн бұрын
I wonder if Limon has tried altitude hold on a wing yet...
@mikebergman181711 күн бұрын
correct. I AM a big boy😆
@phsycoz97211 күн бұрын
finally great
@butcher12 күн бұрын
Finally, so so sooo coool
@uavtech12 күн бұрын
NO for a panic button. See mid to end of video.
@vizionz2visualsmultimediaa15512 күн бұрын
I actually have used it for a panic mode during video loss and it saved my quad while I acquired line of sight and flew back. Not a good idea for like an e brake type action tho
@uavtech12 күн бұрын
it didn't fly off to never never land?
@vizionz2visualsmultimediaa15512 күн бұрын
@ nahh. Albeit I wasn’t flying very aggressively when I triggered it.
@vizionz2visualsmultimediaa15512 күн бұрын
@@uavtech it drifted a bit but not crazy
@Max_N.12 күн бұрын
I would like to add support for ultrasonic sensors to Betaflight.
@uavtech12 күн бұрын
go for it!! 😃
@mariobeans12 күн бұрын
nice!
@maddercat12 күн бұрын
Ultimately wouldnt it be cool if you could input a minimum altitude so if you screw up your trick it'll save you automatically? lol
@ChrisQuadFPV12 күн бұрын
You are my go to FPV guy on BF etc . Thank you great video.🧩
@SonAndDadFPV12 күн бұрын
Still needs some tweeking...
@VinydFPV12 күн бұрын
Is there a V4 for speedybee f7? Thought it only went to V3
@uavtech12 күн бұрын
@@VinydFPV it does. misspoke.
@VinydFPV12 күн бұрын
@uavtech I was gonna say this hobby evolves to quick. Can't keep up!!! 🤣🤣
@reggiebannister108012 күн бұрын
yea but inav baeta flight never ever have the rock solid reliableilty of dji i mean i want dji like reliablitiy for beta flight etc when i hit rth i want it to act and be as relabile as dji can someoen do that
@tommegg848612 күн бұрын
Not possible, if you need that feature go with dji drones
@jackoneill858512 күн бұрын
@@tommegg8486 it is posible someone needs to hack dji drones and release the firmware or something its time
@uavtech11 күн бұрын
They use GPS, BARO, SONAR, and camera sensors on different sides of the drone. Does your FPV drone have all those sensors? I think not. It is not just a firmware thing.
@jiatan_fpv11 күн бұрын
@@uavtech There are very pricy Arducopter setups with all those sensors which still perform worse than a $200 Mini. Being a billion dollar company with thousands of full time developers has some benefits ;)
@LeoLeo-pb2yq12 күн бұрын
why wont they just use the code from inav? this looks so unreliable. i would never use it on a cinelifter, jee
@uavtech12 күн бұрын
INAV is not perfect either. I will do a comparison.
@ZipovUA12 күн бұрын
@@uavtech will be very interesting to see it! and please compare with ardupilot too