nav althold inav что это
Nav althold inav что это
The navigation system in INAV is responsible for assisting the pilot allowing altitude and position hold, return-to-home and waypoint flight.
CLI parameters affecting ALTHOLD mode:
PIDs affecting altitude hold: ALT & VEL PID meaning:
Throttle tilt compensation
Throttle tilt compensation attempts to maintain constant vertical thrust when copter is tilted giving additional throttle if tilt angle (pitch/roll) is not zero. Controlled by throttle_tilt_comp_str CLI variable.
Position hold requires GPS, accelerometer and compass sensors. Flight modes that require a compass (POSHOLD, RTH) are locked until compass is properly calibrated. When activated, this mode will attempt to keep copter where it is (based on GPS coordinates). From inav 2.0, POSHOLD is a full 3D position hold. Heading hold in this mode is assumed and activated automatically.
CLI parameters affecting POSHOLD mode:
PIDs affecting position hold: POS, POSR PID meaning:
If barometer is NOT present, RTH will fly directly to home, altitude control here is up to pilot.
If barometer is present, RTH will maintain altitude during the return. When home is reached, a copter will attempt automated landing. An airplane will either loiter around the home position, or attempt an automated landing, depending on your settings. When deciding what altitude to maintain, RTH has 6 different modes of operation (controlled by nav_rth_alt_mode and nav_rth_altitude cli variables):
CLI command wp to manage waypoints
— Latitude (WGS84), in degrees * 1E7 (for example 123456789 means 12.3456789).
— For a RTH waypoint, p1 > 0 enables landing. For a normal waypoint it is the speed to this waypoint (cm/s), it is taken into account only for multicopters and when > 50 and
— For a POSHOLD TIME it is the speed to this waypoint (cm/s), it is taken into account only for multicopters and when > 50 and
— Reserved for future use. If p2 is provided, then p3 is also required.
— Last waypoint must have set flag to 165 (0xA5), otherwise 0.
Note that the wp CLI command shows waypoint list indices, while the MW-XML definition used by mwp, ezgui and the configurator use WP numbers.
Nav althold inav что это
This page will list and explain all the different navigational flight modes of iNav:
For safety reasons, iNAV’s navigation modes can be activated only if
This applies to enabling the navigation modes in the Configurator as well as at the flying field.
(For bench tests without(!) propellers you may change “set nav_extra_arming_safety = ON” to “OFF” in CLI.)
Note: All iNAV parameters for distance, velocity, and acceleration are input in cm, cm/s and cm/s^2.
Let’s have a look at each mode of operation in detail.
When activated, the aircraft maintains its actual altitude unless changed by manual throttle input. Throttle input indicate climb or sink up to a predetermined maximum rate (see CLI variables). Using ALTHOLD with a multicopter, you need a barometer.
SONAR: Altitude hold code will use sonar automatically on low altitudes (
a) Using ALTHOLD with a multicopter (mc):
Climb rate in ALTHOLD mode:
«set nav_max_climb_rate = 500» and «set nav_manual_climb_rate = 200» define the maximum climb and decent rate in autonomous/manual flight modes.
The neutral position of the throttle stick to hold current altitude is defined by
In the moment you engage ALTHOLD iNAV always sends “nav_mc_hover_thr” to the motors as the starting value of the altitude control loop. You should configure this to your copter’s hover setting, if your copter doesn’t hover close to the default value of 1500us. Otherwise your copter will begin ALTHOLD with a jump or drop.
Example: Let’s assume «nav_mc_hover_thr” is already set correctly to your copter’s hover throttle and “set nav_use_midthr_for_althold =OFF”. Let’s say you have your throttle stick at 30%, and you enter ALTHOLD, your copter will maintain hover at this 30%. If increase throttle up to 40% it will start to climb. (Even if your copter needs 60% throttle to actually climb up in normal flight without ALTHOLD.)
«set alt_hold_deadband = 50»: You have to change throttle command (e.g. move throttle stick) by at least this amount to make the copter climb or decent and change target altitude for ALTHOLD.
If ALTHOLD is activated at zero throttle iNAV will account for deadband and move the neutral «zero climb rate» position a little bit up to make sure you are able to descend.
PIDs for altitude hold:
Inability to maintain altitude can be caused by a number of reasons:
ALT+VEL PID Tuning
Lets make a small experiment: Make sure baro is well isolated. You may also want to reduce baro weight: «set iNAV_w_z_baro_p = 0.5» and «set nav_alt_p = 0» and try flying. This way the controller will attempt to keep zero climb rate without any reference to altitude. The quad should slowly drift either up or down. If it would be jumping up and down, your «nav_vel_*» gains are too high.
As a second step you can try zeroing out «nav_vel_p» and «nav_vel_i» and «set nav_vel_d = 100». Now the quad should be drifting up/down even slower. Raise «nav_vel_d» to the edge of oscillations.
Now raise «nav_vel_p» to the edge of oscillations. Now ALTHOLD should be almost perfect.
And finally «set nav_mc_hover_thr» slightly (50-100) higher/lower than your actual hover throttle and tune «nav_vel_i» until the quad is able to compensate.
Keep in mind that no tuning can fix bad baro isolation issue.
If quad is buzzing while ALTHOLD is activated try lowering «nav_vel_p» a bit.
What is the trick with «nav_vel_i»?
«nav_vel_i» is used to compensate for «nav_mc_hover_thr» (hover throttle) being set to a slightly incorrect value. You can’t set hover throttle to an exact value, there is always influence from thermals, battery charge level etc. Too much «nav_vel_i» will lead to vertical oscillations, too low «nav_vel_i» will cause drops or jumps when ALTHOLD is enabled, very low «nav_vel_i» can result in total inability to maintain altitude.
To deal with oscillations you can try lowering your «nav_alt_p», «nav_vel_p», «nav_max_climb_rate», and «nav_manual_climb_rate».
Climb rate is calculated form the readings of the accelerometers, barometer and – if available – from GPS (“set inav_use_gps_velned = ON”). How strongly the averages of these noisy signals are taken into account in the estimation of altitude change by iNAV is controlled by
// TODO: explain remaining relevant settings
b) Using ALTHOLD with an airplane (fixed wing, fw):
As for multicopters, iNAV is not intended to use ALTHOLD controller in anything but ANGLE mode.
iNAV controls pitch angle and throttle. It assumes that altitude is held (roughly) when pitch angle is zero. If plane has to climb, iNAV will also increase throttle. If plane has to dive iNAV will reduce throttle and glide. The strength of this mixing is controlled by “nav_fw_pitch2thr”.
Set board alignment in such a way that your plane is flying level both in «PASSTHROUGH» and in «ANGLE», when you don’t touch the sticks.
iNAV’s parameters for fixed wing:
For multirotor it will hold horizontal (2D) position, throttle still controls up and down movements (z-axis). You can use your roll and pitch stick to move around. The position hold will be resumed when you center the roll/pitch stick again.
For Fixedwing it will try and loiter in circle defined by the nav_fw_loiter_radius variable.
Please note that you have to use this with ALTHOLD to get a full 3D position hold!
POSHOLD = 2D position hold
POSHOLD + ALTHOLD = 3D position hold
POSHOLD + ALTHOLD + MAG = 3D position hold and magnetic heading lock
POSHOLD + ALTHOLD + Heading Lock = 3D position hold and heading lock
(ANGLE mode is automatically selected in all of the above.)
Hints for safe operation:
RTH will attempt to bring copter/plane to launch position. Launch position is defined as a point where aircraft was ARMed. RTH Will control both position and altitude. You will have to manually control altitude if your aircraft does not have an altitude sensor (barometer). In the case of fixed wing, altitude comes from the GPS, so you dont need a barometer in your FC (CC3D for example).
With default settings RTH will land immediately if you are close than 5 meters from launch position. If further away it will make sure to have at least 10 meters of altitude, then start going home at 3m/s, and land. It will disarm itself if so configured, otherwise you will have to manually disarm once on the ground.
There are many different modes for Altitude, see further down on this page
Activated by RTH flight mode.
Autonomous waypoints are used to let the quad/plane autonomous fly a predefined mission. The mission is defined with waypoints, which have the information about latitude, longitude, height and speed between the waypoints. GUIs such as EZ-GUI and mwp can be used to set the waypoints and upload the mission. Cleanflight or iNav configurator are still not capable of creating waypoint missions.
Uploaded missions are saved in the FC until a reboot or a new uploaded mission erases the old one.
Once the waypoint mode is activated (NAV WP has to be set previously in the mode tabs to a specific switch/value), the quad/plane will start to fly the waypoint mission based upon the waypoints in numerical order. Waypoint missions can be restarted by switching NAV WP off/on, interruption during the mission is also possible with switching NAV WP off.
Currently up to 30 waypoints can be set on F1 boards, and 60 on F3 and better.
This mode is a work in progress, it does however work well. There is an additional [[wiki page further describing way point missions, tools and telemetry options|iNavFlight Missions]].
// TODO: Explain better. // TODO: explain what happens when you are in WP mode and GPS fails.
This mode is just an permission for GCS to change position hold coordinates and the altitude. So its not an flight mode itself, and needs to be combined with other flightmodes.
In order to let the GCS have full control over the aircraft the following modes must be activated: NAV POSHOLD NAV ALTHOLD MAG TOGETHER with GCS_NAV
This can be combined in whichever way you want to permit example manuall yawing or altitude controll.
Keep in mind that if NAV POSHOLD is not combined with this mode you must combine ANGLE as the other modes are best combined with ANGLE mode.
// TODO: explain what happens when you are in GSC NAV mode and GPS fails.
right (roll/pitch) stick
Mode switch diagram
A diagram to indicate flight modes relation to navigation modes and illustrate sensor requirements:
RTH Altitude control modes
RTH sequence can control altitude in several different ways, controlled by nav_rth_alt_mode and nav_rth_altitude parameters.
Maintain current altitude (NAV_RTH_NO_ALT)
nav_rth_altitude is ignored
Maintain current altitude + predefined safety margin (NAV_RTH_EXTRA_ALT)
nav_rth_altitude defines extra altitude margin
Predefined altitude (NAV_RTH_CONST_ALT)
nav_rth_altitude defines exact RTH altitude above launch point.
If the multi-rotor is below nav_rth_altitude it will enter position hold and climb to desired altitude prior to flying back home. If the machine is above the desired altitude, it will turn and fly home and descend on the way.
Maximum altitude since launch (NAV_RTH_MAX_ALT)
nav_rth_altitude is ignored
At least predefined altitude above launch point (NAV_RTH_AT_LEAST_ALT)
nav_rth_altitude defines exact RTH altitude above launch point
INAV Modes Guide: Learn the secrets of modes
Putting a flight controller in your plane is not only a safety net; it also allows your planes to do things that weren’t possible just a few years ago. Words cannot describe the feeling the first time you flip a switch and your plane then comes back to you. What once was pure science fiction is now a very affordable reality. And this is all just the start of what’s to come. To perform these feats, we use INAV modes to define how what happens to the model. This article provides you with details of the INAV modes and also guidance to which modes you may want to use.
by, Marc Hoffman
Editing and color commentary by Steve Schlesinger and Marco Lau
One criticism of INAV is that it’s perhaps too powerful. It’s capable of so many things, and yet what you don’t know can hurt you. When you installed your flight controller you wanted to use all 16 channels and install all the INAV modes all at once. It certainly easier to do this than to go back over and over again and update INAV. But keep in mind that some of these modes surrender some if not all control of the plane. Thus, you can very realistically watch your plane fly away never to return.
With this guide you should get and overall understanding of what the INAV modes are capable of doing. It’s best to explore them one at a time. There may be certain modes you’ll never use, such as CAMSTAB. So be selective in what you wish to include. And no, you undoubtedly don’t need to use every switch on your radio to enjoy INAV.
INAV in a fixed wing plane brings a multitude of possibilities. Firstly It starts with simple in-flight stabilisation, which keeps your plane flying like it is on rails. The flight controller deals with wind gusts in real time to further enhance the flying experience. After that we have the fully autonomous flight INAV modes. This could be a simple return to home; furthermore these could allow your plane to fly complete missions over big distances, like a real military drone. It is amazing how far such simple technology in this hobby has been developed. But all these features need some knowledge to be able to use correctly.
In this guide, we will explore in detail the different INAV modes and features of INAV and explain how to correctly set them up and how they work. Firstly, we will explain, how every INAV mode works by itself. Then, in the second part, we will explain their dependencies and preconditions.
Flight Modes
The following INAV modes are flight modes. Flight modes do not fly the plane for you. They are generally used to assist you piloting the plane.
Manual
Manual, formerly known as Pass through, the pilot has direct control over the servos. You can fly, as if the model basically just has a receiver, without any input from the flight controller. The servo mixing, especially for Flying Wings or V-Tail planes, is done by INAV. No mixing on the transmitter is necessary. When setting up a new plane, you should be manually trim using the Manual mode. Then physically adjust the control surfaces so that the don’t need the radio trim.
The MANUAL control mode is very helpful during the initial tuning phase of the plane. Particularly in the case that anything is wrong with your setup, sensor failures, bad PIFF values, unstable flight behaviour. This will allow you to bring the model home, albeit without stabilisation. Some people even prefer to fly in manual, because it feels more natural.
ACRO or Rate Mode
This is the default mode of INAV. Specifically, Acro is active if you do not have other flight modes selected. This is similar to Acro mode on multicopters. So INAV will always try to keep the current attitude of the plane when the pilot has no stick input. As in most flight modes, the flight controller takes over the complete control of the servos. So the input of the pilot requests how fast the plane has to spin around the specific axis. This is known as rate control. The FC limits the speed of the spin according to the rate limits set in the software. There will be more on setting the rates in the Tuning Guide.
ANGLE
In angle mode, the control method changes from rate control to angle control. Therefore, with no stick input, the plane will always fly level. With a stick input for roll or pitch, the flight controller will change the angle as a result of the stick movement. However, at maximum stick movement, the plane will pitch or roll only as far as set in the firmware. There is no automatic control of altitude and throttle, so the Pilot still needs to be in control of that. The yaw axis is still in a rate-controlled mode and only stabilised.
HORIZON
Horizon mode is very similar to Angle mode. The difference is that when the sticks reach a set stick input threshold; horizon will automatically transition to rate control. This allows the pilot to do rolls and loops. But the plane will return to angle control once the stick is below this threshold.
Navigation Modes
Navigation mode also include some autonomy in the flight. This is where the flight controller takes over more of the plane’s operations. This is also where you will start needing more equipment, as some of these INAV modes need a GPS module to work. Navigation modes are all based on the Angle flight mode. So it is a good idea to make sure that your plane flies well in Angle before relying on navigation modes.
NAV COURSE HOLD
In Cruise mode, the plane will explicitly, autonomously keep its heading on a straight path. The pilot does not have direct control over yaw or roll. But the pilot can change the flight course direction via the roll or yaw sticks, yaw is smoother. However this means that the roll or yaw input will have very limited authority. Throttle override by the pilot is optional, see below in the Configuring the INAV modes section. Additionally, this mode needs a working GPS module.
INAV will do all the needed attitude changes by itself to keep the chosen course. INAV also controls the throttle automatically and is dependent on the pitch angle. You need to set the cruise throttle correctly for this mode to work well.
This mode does not maintain the altitude, the plane is flying at. So, pitch is still controlled by angle mode. That means that if when flying hands off in angle mode, the model gains altitude, it will also do this in cruise mode. This is why it is important to have Angle mode flying correctly.
In iNav 2.6 and below, this mode was called NAV CRUISE.
NAV CRUISE
In NAV CRUISE, both the heading and altitude are maintained by the flight controller. In summary, in this mode no yaw, limited roll and altitude control via pitch input. It is NAV COURSE HOLD with altitude hold too.
In iNav 2.6 and below, this mode was called 3D CRUISE. I needed to be activated by enabling NAV CRUISE and ALT HOLD at the same time.
NAV POSHOLD
With this mode, otherwise known as loiter, you can effectively park the plane in the air. It will save the coordinates and altitude as a centre point and then try to fly a constant circle around that point. Also, with the yaw stick, the pilot can change the circle direction, if this feature is activated. With the pitch stick, the altitude can also be changed. There is no further control possible, while in this mode. POS HOLD needs a GPS module and barometer to work. Without barometer the altitude specifically will be very unreliable. Here are the useful CLI commands.
NAV RTH
Return To Home can be one of the most important modes you will ever use. Of course, this needs GPS and Barometer to work. As soon as the pilot arms the plane, it will save its home GPS position on the Flight Controller. If you ever get in trouble by flying too far away, lose sight, or just want to come back from a long-range flight; you can enable RTH and the plane will then autonomously fly back home. You can control the altitude of the return with the pitch stick and also do direction corrections in a limited heading angle. There is also a RTH mode in case of a remote connection loss but this one, behaves slightly different. More on that later. RTH is highly configurable. To get an idea of the options, take a look at the WiKi page.
NAV WP
In WAYPOINT mode it is possible to let the UAV fly almost completely unattended missions. The pilot can use different applications (INAV Configurator on Windows, MultiWii planner on Linux, INAV Mission Planner on Android, INAV Flight on iOS) to plan missions with waypoints. You set these out on a map with specific coordinates and altitude, and then upload them to the Flight Controller. Then you can let the FC automatically fly this mission, as long as you keep in range of your remote. There is also an option to continue missions on Rx loss since INAV 2.3 but this has to be used with caution! This is an advanced mode, you will want to master the other modes before attempting to work with NAV WP. Your planes should be well trimmed, tuned, and calibrated.
Additional Modes or Modifiers
After explaining, what every main modes do. We will now look at the additional modes or modifiers, that cannot be used standalone. But can add additional functionalities to the modes above
Вопросы по iNav
Опции темы
Подскажите, как GPS подключали? К 3 и 4 каналу (5 и 6 пины) порта приёмника?
Скорее всего да. На Rev4 и Rev5 там Serial2, думаю Rev6 такая же
10 метров. iNav «думает» в сантиметрах
Загрузил релиз iNav-1.0.1
Из-за ущербной работы удержания высоты/позиции у Клинфлайта я всю эту кашу год назад и заварил
Да, трудно конкурировать в цене с NAZE32, а если ей еще и возможности APM-а добавить.
Константин, у меня контроллер SPRacingF3 клон c Banggoodа. Установил Вашу прошивку, но вот беда, у меня контроллер повернут на 90 град. для удобства доступа к USB. Так вот при изменении значения положения контроллера по оси YAW ничего не происходит. Т.е. поворачиваю коптер носом вниз, а показывает что наклон вправо. И еще что-то не могу его заармить ни стиками ни тумблером. При этом на Betaflight и Cleanflight все отлично работает. Лыжи не едут или я. чего-то не понимаю?
Ну да, на 3-4 канал, УАРТ2. GPS NAZA, делал все по инструкции
Да, чтобы освободить место. Вернуть?
А как я понимаю сейчас у iNAV в принципе убрана поддержка светодиодов для всех контроллеров или в SP F3 диоды всётаки будут работать?
В SP F3 поддержка лед-ленты есть, там места хватает. Думаю в следующий релиз для НАЗЕ тоже впихну.
Я так понимаю каждый светодиод занимает место? Может оставить необходимый минимум 4-8? А то 32 выглядит избыточно.
Можно попробовать, хотя основное место занимает код обновления, а не сами данные светодиодов.
В бетафлае же ещё как то освободили за счёт общего набора тумблеров на все слоты
Да, можно еще много чего выпилить
У меня вверх ногами, можно без CLI, я так сделал как на картинке.
В идеале, если известно точное направление на географический север, то можно развернуть коптер носом на север и подобрать Declination таким образом, чтобы Курс (Heading) был ноль.
Хотя, в принципе, для отклонения
Какие защиты от дурака нужны? Давайте реализуем!
Компас нужно калибровать в каждом новом месте, перед взлетом? Спасибо.
Не обязательно. Калибровка выставляет «нули» магнитометра и только. На измерение направления магнитного поля это не влияет.
Думаю, пора заводить вики на русском языке
А вот тут поподробнее. Что за режим, как включить, какая логика работы? iNav-у бы такой функционал пригодился
Интересная идея, мне такое в голову не приходило. Что-то вроде фейлсейф по потребленной батарее. Сенсор тока есть, емкость батареи есть, вроде все просто. Надо будет сделать.
а минусовые высоты поддерживаются? а то вдруг с холма\горы вниз запускать нада буит
Интересная идея, мне такое в голову не приходило. Что-то вроде фейлсейф по потребленной батарее. Сенсор тока есть, емкость батареи есть, вроде все просто. Надо будет сделать.
Подскажите не знающему о том какие контроллеры сейчас представлены на рынке.
Какой купить для iNav, наиболее подходящий для установки на крыло?