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
Closed
Nexus1212 opened this issue
Mar 30, 2017
· 15 comments
Comments
Hello,
I use the Inav Version 1.6.1 with a SPRacingF3 and a NZ mini GPS.
In the pre arm setup «navigation is safe» is always red. In the tab GPS is for few seconds my GPS position, then I get a error message.
My problem is I can not arm the fixed wing, if I use a the mode RTH.
In thread #1276 the same issuewas discribed, but it was closed without solution.
It is NOT safe to arm the machine in RTH, PH or WP. This is intentional.
RTH is not aktive, if i arm the aircraft. It is only the option available, to activiate RTH via transmitter. I arm in mode Passtrough or acro.
Safety will block arming in any of the following conditions:
- You configured WP/PH/RTH or Failsafe RTH and you don’t have a good accuracy GPS fix
- You try to arm into RTH/PH/WP
- You have waypoint mission in memory and your first waypoint is too far from your current position
Given it’s a small NZ mini GPS my guess is that accuracy is not good. You need at least 6 sats and position accuracy better than 9 meters (usually HDOP of 5-6 or lower).
Thank you for your response!
I had only 5 sats vor gps fix. Do you mean, with 5 sats inav gets no valid GPS fix?
No 5 sats is not enough for good navigation. Even 6 sats is marginal. I consider at least 7-8 satellites acceptable for flight.
I think we can close this now?
Yes, thank you very much! Do you have a cheap recommendation for a gps?
Ok, I will buy it I hope the shipment to Germany will not take so long.
Thank you
@sppnk what voltage do you supply to that GPS? 5 or 3.3V? I am considering buying a few
Great, thanks for the info. Going to buy a few
Safety will block arming in any of the following conditions:
1. You configured WP/PH/RTH or Failsafe RTH and you don't have a good accuracy GPS fix 2. You try to arm into RTH/PH/WP 3. You have waypoint mission in memory and your first waypoint is too far from your current position
Given it’s a small NZ mini GPS my guess is that accuracy is not good. You need at least 6 sats and position accuracy better than 9 meters (usually HDOP of 5-6 or lower).
- How do I NOT arm into WP/PH/RTH if they are part of the modes setup?
- how far is too far?
could we get error messages in the cli to indicate which condition triggers the unsafe?
thanks.
I’m sat here with my quad connected to INav, and INav showing a ‘Navigation is safe’ error — so unable to arm it.
9 sats, HDOP 2.4 (it’s indoors), Mode is Horizon. INav FC is 2.0.1
This tends to happen often, but I can never get any info as to what the problem is!
Seconding @Normoa … if navigation is not safe, please explain why it is not safe. Some debug assistance would be great UX.
устал паутинить…
Велика вероятность что ваше устройство будет работать долго и счастливо на 5в уровнях.
Вы хотите сказать,что uart “raspberry pi zero” толерантен к 5 вольтам?
Вы хотите сказать,что uart “raspberry pi zero” толерантен к 5 вольтам?
Я хочу лишь сазать, что почти всегда оно работает без выпускания волшебного дыма. И в том числе в похожем на ваш конфиге, в качестве передачи параметров для формирования осд на земле.
Но риск конечно в этом есть.
Резистивный делитель попробовал,не работает.
Тупее его ничего нет, он не может не работать. Проверьте осциллографом уровни.
Господа, у меня вопрос.
Когда я ставлю failsafe в режим rth, то у меня в арминг чек листе горит красным navigation is safe. Выключаю rth , армится без проблем.
Потом если в модах стоит удержание высоты и розиции по gps — тоже красным navigation is safe.
Подскажите из-за сего может горять эта навигация или что у меня не так?
Спасибо.
У меня та же проблема! Как решили вопрос?
Конфигулятор INAV ,(полетник -Matek F405-ctr, GPS -M8N 8N GPS/BN-880 мини GPS встроенный компас) горит чек navigation is safe и конечно не дает армится , GPS работает 6-7 спутников , если во вкладке Failsave снять галку RTH (возврат домой) и во вкладке Modes
удалить настройки каналов на NAV POSHOLD NAV ALTHOLD , то после перегрузки все работает navigation is safe зеленый как елка! Армится и моторы гудуть! Вопрос? что делаю не так и решить проблему?
даже set nav_extra_arming_safety = OFF не решает вопрос
команда Status
Команда STATUS в CLI дает следующие данные
Entering CLI Mode, type ‘exit’ to return, or ‘help’
# status
System Uptime: 22 seconds
Current Time: 2020-03-08T15:38:04.460+00:00
Voltage: 0.00V (1S battery — NOT PRESENT)
CPU Clock=168MHz, GYRO=MPU6000, ACC=MPU6000, BARO=BMP280, MAG=HMC5883
STM32 system clocks:
SYSCLK = 168 MHz
HCLK = 168 MHz
PCLK1 = 42 MHz
PCLK2 = 84 MHz
Sensor status: GYRO=OK, ACC=OK, MAG=OK, BARO=OK, RANGEFINDER=NONE, OPFLOW=NONE, GPS=OK
SD card: Manufacturer 0x2, 3813376kB, 02/2012, v1.0, ‘SA04G’
Filesystem: Ready
Stack size: 6144, Stack address: 0x10010000, Heap available: 1828
I2C Errors: 0, config size: 5753, max available config: 131072
ADC channel usage:
BATTERY : configured = ADC 1, used = ADC 1
RSSI : configured = ADC 3, used = none
CURRENT : configured = ADC 2, used = ADC 2
AIRSPEED : configured = none, used = none
System load: 6, cycle time: 508, PID rate: 1968, RX rate: 49, System rate: 9
Arming disabled flags: NAV RX CLI
Попробуй 8 спутников впоймать у меня в квартире тоже там красный крестик горит.
В настройках жпс поставь ублокс 8 (по-моему) у меня bn-880 пока шлем одеваю ловит 8 спутников а через пару минут около 20.
6 спутников по идее достаточно для арминга у меня 7 и 3D горит в скрин
шоте, думаю не в этом дело.Спасибо за любую помощь.
даже set nav_extra_arming_safety = OFF не решает вопрос
6 спутников по идее достаточно
Не по идее, а минимальное кол-во настраивается в конфиге на вкладке адвансед тюнинг
Вы хотите сказать,что uart “raspberry pi zero” толерантен к 5 вольтам?
про зероху не скажу, но pi3b у меня воткнута прямо в контроллер и безо всяких понижаек уровня.
6 спутников по идее достаточно для арминга у меня 7 и 3D горит в скрин
шоте, думаю не в этом дело.Спасибо за любую помощь.даже set nav_extra_arming_safety = OFF не решает вопрос
arming_safety = OFF не решает вопросов, а просто разрешает армиться без фикса в НЕНАВИГАЦИОННЫХ режимах.
и кстати, включение этого обхода имеет свои недостатки.
давеча так вот по-быстрому запустил все, автовозлет, потом RTH а он вниз идет. Потому что Landing.
потому что забыл подождать пока спутники поймает.
далее отключаю RTH и промазал — включил акро а не стаб.
Тушка уже метрах в 300, пока сообразил почему оно так, приземлился с фрагментацией тушки в дым.
“а не был бы таким умным, все бы было хорошо”
даже set nav_extra_arming_safety = OFF не решает вопрос
Решает, не забыли выполнить save?
И второе нельзя армится в NAV режимах.
И второе нельзя армится в NAV режимах
В Энджл тоже нельзя, только в ручных?
В Энджл тоже нельзя, только в ручных?
А angle как раз можно и нужно.
Это не нав режим. Нельзя только в тех которые автоматические (ртн, удержание позиции, полет по точкам и т.д.)
Решает, не забыли выполнить save?
И второе нельзя армится в NAV режимах.
save? конечно, спасибо что спросили,
нельзя армится в NAV режимах ,это тож понятно тумблеры вниз))
Спасибо
У меня та же проблема! Как решили вопрос? Конфигулятор INAV ,(полетник -Matek F405-ctr, GPS -M8N 8N GPS/BN-880 мини GPS встроенный компас) горит чек navigation is safe и конечно не дает армится , GPS работает 6-7 спутников , если во вкладке Failsave снять галку RTH (возврат домой) и во вкладке Modes удалить настройки каналов на NAV POSHOLD NAV ALTHOLD , то после перегрузки все работает navigation is safe зеленый как елка! Армится и моторы
Вопрос типо решен, НО. Даже не знаю, при 7 спутнакх и 3D в комнате возле окна ,ни как не удавалось заармится горела ошибка navigation is safe , вынес тело на бакон ,3 мин 6 спутников, ИИИ navigation is safe зеленый ! тублер на старт! И тело загудело)). Остался вопрос , почему кол-во спутников в комнате 7 и кол-во спутников на балконе 6шт т,е, меньше позволило заармить тело? Возможно есть еще какой то параметр о котором нам(мне ) не известно??
Если я создаю ПРОФИЛЬ 2-3 какие пункты настроек сохраняются, а какие нужно настраивать вновь?
Вопрос типо решен, НО. Даже не знаю, при 7 спутнакх и 3D в комнате возле окна ,ни как не удавалось заармится горела ошибка navigation is safe , вынес тело на бакон ,3 мин 6 спутников, ИИИ navigation is safe зеленый ! тублер на старт! И тело загудело)). Остался вопрос , почему кол-во спутников в комнате 7 и кол-во спутников на балконе 6шт т,е, меньше позволило заармить тело? Возможно есть еще какой то параметр о котором нам(мне ) не известно??
В спутниковой системе навигации есть такое понятие, как “Достоверные данные”. Если приемник и знает, где находятся спутники в данный момент, то это не означает, что он получает с них полноценную информацию.
Народ привет, нужно ли black box в inav держать постоянно включенным? Насколько сильно запись длительных логов загружает полетник ?
Братцы, завтра первый облет нового самолета и нужен совет. На руках отхожу с тушкой метров на 20 отрубаю РУ срабатывает FS и высвечивается значок RTN , мотор идет в набор с этим вопросов нет, а вот при включении возврата в менеджере функция активируется , а на ОСД индикации нет. Может нужна высота или другие какие условия?
Как решили вопрос?
Облетать не удалось, жду погоды, а те сомнения которые я описал развеятся после того как самолет отлетит от точки дом и эти фукции начнут работать, я очень сильно на это надеюсь😁
Нужна помощь.
имеется матек F-405. две камеры на борту и электронный переключатель между ними управляемый по PWM. можно ли вывести PWM сигнал с полетника с настроенным каналом ддля работы данного переключателя. Разбираюсь слабо, поэтому просто напишите в кокой контакт на плате воткнуть сигнальный провод от переключателя и что настроить в программе INAV.
Всем откликнувшимся заранее спасибо.
В миксере добавляем сервовыход и указывает какой канал должен выводится с пульта. Потом паямеся проводом к нужному выходу сервы на плате. Может еще во вкладке эдвенс надо включать сервовыходы, но не уверен. Еще надо учеть что нумерация сервов в конфигураторе и на самой плате отличаются на единицу.
В миксере добавляем сервовыход и указывает какой канал должен выводится с пульта. Потом паямеся проводом к нужному выходу сервы на плате. Может еще во вкладке эдвенс надо включать сервовыходы, но не уверен. Еще надо учеть что нумерация сервов в конфигураторе и на самой плате отличаются на единицу.
Вот спасибо милый человек. Только ответил как для опытного. А я пока профан. Я думаю что разберусь со всем кроме куда паять провод на плате. Как подписан выход для сервы на плате?
I’m not new to multi-rotors, but I tend to not fiddle around with them when they’re working, so quickly forget the ins and outs of configuration and setup. This time I’m configuring an FrSky SPRacing F3 EVO board in a hexcopter using iNav. Everything is fine in configurator except that I’ve still got a red ‘Navigation is safe’ icon in the Configurator Setup page. All symbols at the top of the page are blue except for the red failsafe parachute. My failsafe settings (which I’ve never altered from default in the past) are Failsafe Kill switch not activated, and the ‘Land’ box is checked under the ‘Procedure’ heading, with throttle value for landing = 1000 and delay for turning off motors = 200. In configurator the receiver responds correctly, the motors respond correctly, and I’ve got a solid GPS fix. Accelerometer and compass calibrations were carried out successfully. And the model is level. So any ideas what might be causing the Navigation is NOT safe notification please? When I disconnect from my PC, and power the unit up with the flight battery, the beeper keeps going at about 2 beeps per second, and there’s no response to throttle input. |
|
Sign up now to remove ads between posts |
Are you getting a GPS fix on enough satelites? If GPS is not locked, then you can’t arm. |
|
Thanks, that might be the issue. I’m indoors so I’m only getting 4 sats, though it does say I’ve got a 3D fix, and it shows my location correctly on the map. I seem to recall that there’s a setting for minimum number of sats, so I’ll check that out tomorrow, and reduce it for testing purposes. |
|
Nope, that’s not the cause I’ve set the minimum number of sats to 5 (the lowest it will go) and I’ve got 7 sats this afternoon, but the red X is still there. But it did then allow me to arm the hex and run the motors under Tx control, so something’s changed because yesterday there was no response when I tried to use the Tx. I also notice, when I’m connecting my hex to iNav Configurator, that I get a message that I need to update my firmware before I can use the Advanced tab. Which firmware? I’m using Configurator 2.2.1 and iNav 2.2.1 at the moment. |
|
|
FWIW, I’ve dumped iNav. The firmware is «ok» for what it is (a rewrite of CleanFlight), but the Navigation side really needs some work. I have no idea what frame you are using, but if its larger than 450mm, I’d go with a Pixhawk running ArduCopter. |
Yes, you mentioned Pixhawk running Arducopter in another thread of mine a while back, but I’ve got unused boards in my workshop that I want to use, rather than buying new ones and learning a new programming language It’s a 550 hexcopter. I’m using an FrSky SPRacing F3 EVO board because I already have it and because it can handle 6 motor channels. I’ve had the same electronics in a 450 quadcopter for a few years now, and have no issues with iNav for the kind of gentle flying I do — line-of-site flying in Angle mode, Position Hold, and Return to Home all work reliably for me so far. The only physical difference between this hex and the quad is that the hex is using a Naza GPS/compass which sends all data down the Rx and Tx lines, instead of separate lines for the compass. I’m still not sure what the red X is about. The other day I managed to get the motors responding to transmitter control, but the motors started slowly as soon as I armed it, even though I’ve checked the ‘Don’t spin motors when armed’ box. I haven’t looked into that issue yet, and haven’t tried a hover due to other distractions. If there’s nothing obvious I might go back to whatever iNav version I have in the quad that’s flying good. |
|
|
OK, get that. How about posting a screen shot that shows that red ‘X’.. |
OK, I’ll post shots of some of the relevant screens, but it will be a couple of days before I can do that. |
|
|
With radio and quad powered and connected to configurator, go to the CLI, type status and hit enter. You will see a list of arming flags that can give you some info as to what’s going on. I’ve been using iNav for 2 years + and have used an F3 Evo board because I had it around. Not so good. Matek boards have worked perfectly and are the only ones recommended. |
Thanks flyandride. I’ll check out the status tomorrow. |
|
|
The only thing I can see is you have ZERO volts for battery voltage which is triggering fail safe. On the Mixer tab you may want to click Load and Apply to make sure the Hex mixer is actually enabled. |
Thanks for looking Oldgazer. In some other screen I’d actually switched off the ‘monitor battery voltage’ option because I always fly by my timer, so presumably 0v shouldn’t trigger any problem. Or should I be seeing «N/A» against the battery voltage if monitoring it is disabled? |
|
|
Quote:
Originally Posted by abenn Thanks for looking Oldgazer. In some other screen I’d actually switched off the ‘monitor battery voltage’ option because I always fly by my timer, so presumably 0v shouldn’t trigger any problem. Or should I be seeing «N/A» against the battery voltage if monitoring it is disabled? I have no clue. I NEVER turn off battery monitoring. Try turning it on and see what happens…. |
I should have done this earlier: I’ve just gone through the setup for my quad which is using iNav successfully, and I see that all the relevant settings are the same as for this hex. Battery voltage and amps monitoring are both turned off on both machines, and the battery voltage is showing 0v on the quad, just like on the hex, so that in itself is not an issue. There’s only one difference in the status printout which might be significant: In the final line for the hex it says «Arming disabled flags: 0x140800», but for my quad the same line says «Arming disabled flags NAV RX CLI». Does that mean anything? |
|
Navigation
The navigation system in INAV is responsible for assisting the pilot allowing altitude and position hold, return-to-home and waypoint flight.
NAV ALTHOLD mode — altitude hold
Altitude hold requires a valid source of altitude — barometer, GPS or rangefinder. The best source is chosen automatically. GPS is available as an altitude source for airplanes only.
In this mode THROTTLE stick controls climb rate (vertical velocity). When pilot moves stick up — quad goes up, pilot moves stick down — quad descends, you keep stick at neutral position — quad hovers.
CLI parameters affecting ALTHOLD mode:
- nav_use_midthr_for_althold — when set to «0», firmware will remember where your throttle stick was when ALTHOLD was activated — this will be considered neutral position. When set to «1» — 50% throttle will be considered neutral position.
Related PIDs
PIDs affecting altitude hold: ALT & VEL
PID meaning:
- ALT — translates altitude error to desired climb rate and acceleration. Tune P for altitude-to-velocity regulator and I for velocity-to-acceleration regulator
- VEL — translated Z-acceleration error to throttle adjustment
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.
NAV POSHOLD mode — position hold
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:
- nav_user_control_mode — can be set to «0» (GPS_ATTI) or «1» (GPS_CRUISE), controls how firmware will respond to roll/pitch stick movement. When in GPS_ATTI mode, right stick controls attitude, when it is released, new position is recorded and held. When in GPS_CRUISE mode right stick controls velocity and firmware calculates required attitude on its own.
Related PIDs
PIDs affecting position hold: POS, POSR
PID meaning:
- POS — translated position error to desired velocity, uses P term only
- POSR — translates velocity error to desired acceleration
NAV RTH — return to home mode
Home for RTH is the position where vehicle was first armed. This position may be offset by the CLI settings nav_rth_home_offset_distance
and nav_rth_home_offset_direction
. This position may also be overridden with Safehomes. RTH requires accelerometer, compass and GPS sensors.
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):
- 0 (NAV_RTH_NO_ALT) — keep current altitude during whole RTH sequence (nav_rth_altitude is ignored)
- 1 (NAV_RTH_EXTRA_ALT) — climb to current altitude plus extra margin prior to heading home (nav_rth_altitude defines the extra altitude (cm))
- 2 (NAV_RTH_CONST_ALT) — climb/descend to predefined altitude before heading home (nav_rth_altitude defined altitude above launch point (cm))
- 3 (NAV_RTH_MAX_ALT) — track maximum altitude of the whole flight, climb to that altitude prior to the return (nav_rth_altitude is ignored)
- 4 (NAV_RTH_AT_LEAST_ALT) — same as 2 (NAV_RTH_CONST_ALT), but only climb, do not descend
- 5 (NAV_RTH_AT_LEAST_ALT_LINEAR_DESCENT) — Same as 4 (NAV_RTH_AT_LEAST_ALT). But, if above the RTH Altitude, the aircraft will gradually descend to the RTH Altitude. The target is to reach the RTH Altitude as it arrives at the home point. This is to save energy during the RTH.
NAV WP — Waypoint mode
NAV WP allows the craft to autonomously navigate a set route defined by waypoints that are loaded into the FC as a predefined mission.
CLI command wp
to manage waypoints
wp
— List all waypoints.
wp load
— Load list of waypoints from EEPROM to FC.
wp <n> <action> <lat> <lon> <alt> <p1> <p2> <p3> <flag>
— Set parameters of waypoint with index <n>
. Note that prior to INAV 2.5, the p2
and p3
parameters were not required. From 2.5, INAV will accept either version but always saves and lists the later full version.
Parameters:
-
<action>
— The action to be taken at the WP. The following are enumerations are available in INAV 2.6 and later:- 0 — Unused / Unassigned
- 1 — WAYPOINT
- 3 — POSHOLD_TIME
- 4 — RTH
- 5 — SET_POI
- 6 — JUMP
- 7 — SET_HEAD
- 8 — LAND
-
<lat>
— Latitude (WGS84), in degrees * 1E7 (for example 123456789 means 12.3456789). -
<lon>
— Longitude. -
<alt>
— Altitude in cm. Seep3
bit 0 for datum definition. -
<p1>
— 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 < nav_auto_speed. For POSHOLD TIME waypoint it is time to loiter in seconds. For JUMP it is the target WP index (not number). For SET_HEAD, it is the desired heading (0-359) or -1 to cancel a previous SET_HEAD or SET_POI. -
<p2>
— 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 < nav_auto_speed. For JUMP it is the number of iterations of the JUMP. -
<p3>
— A bitfield with four bits reserved for user specified actions. It is anticipated that these actions will be exposed through the logic conditions.- Bit 0 — Altitude (
alt
) : Relative (to home altitude) (0) or Absolute (AMSL) (1). - Bit 1 — WP Action 1
- Bit 2 — WP Action 2
- Bit 3 — WP Action 3
- Bit 4 — WP Action 4
- Bits 5 — 15 : undefined / reserved.
Note:
- If
p2
is specified, thenp3
is also required. p3
is only defined for navigable WP types (WAYPOINT, POSHOLD_TIME, LAND). The affect of specifying a non-zerop3
for other WP types is undefined.
- Bit 0 — Altitude (
-
<flag>
— Last waypoint must haveflag
set to 165 (0xA5).
wp save
— Checks list of waypoints and save from FC to EEPROM (warning: it also saves all unsaved CLI settings like normal save
).
wp reset
— Resets the list, sets the number of waypoints to 0 and marks the list as invalid (but doesn’t delete the waypoint definitions).
wp
example
# wp load
# wp
# wp 11 valid
wp 0 1 543533193 -45179273 3500 0 0 0 0
wp 1 1 543535723 -45193913 3500 0 0 0 0
wp 2 1 543544541 -45196617 5000 0 0 0 0
wp 3 1 543546578 -45186895 5000 0 0 0 0
wp 4 6 0 0 0 1 2 0 0
wp 5 1 543546688 -45176009 3500 0 0 0 0
wp 6 1 543541225 -45172673 3500 0 0 0 0
wp 7 6 0 0 0 0 1 0 0
wp 8 3 543531383 -45190405 3500 45 0 0 0
wp 9 1 543548470 -45182104 3500 0 0 0 0
wp 10 8 543540521 -45178091 6000 0 0 0 165
wp 11 0 0 0 0 0 0 0 0
...
wp 59 0 0 0 0 0 0 0 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.
Multi-missions
Multi-missions allows up to 9 missions to be stored in the FC at the same time. It is possible to load them into the FC using the CLI. This is acheived by entering single missions into the CLI followed by wp save
after the final mission has been entered (the single missions can be entered one after the other or as a single block entry, it doesn’t matter). All missions will then be saved as a Multi Mission in the FC. Saved multi missions display consecutive WP indices from 0 to the last WP in the last mission when displayed using the wp
command.
E.g. to enter 3 missions in the CLI enter each mission as a single mission (start WP index for each mission must be 0).
wp 0 1 545722109 -32869291 5000 0 0 0 0
wp 1 1 545708178 -32642698 5000 0 0 0 0
wp 2 1 545698227 -32385206 5000 0 0 0 165
...
wp 0 1 545599696 -32958555 5000 0 0 0 0
wp 1 1 545537978 -32958555 5000 0 0 0 0
wp 2 1 545547933 -32864141 5000 0 0 0 0
wp 3 1 545597705 -32695913 5000 0 0 0 0
wp 4 1 545552910 -32598066 5000 0 0 0 0
wp 5 6 0 0 0 0 0 0 165
...
wp 0 1 545714148 -32501936 5000 0 0 0 165
# wp save
Multi Mission after saving:
# wp
# wp 10 valid
wp 0 1 545722109 -32869291 5000 0 0 0 0
wp 1 1 545708178 -32642698 5000 0 0 0 0
wp 2 1 545698227 -32385206 5000 0 0 0 165
wp 3 1 545599696 -32958555 5000 0 0 0 0
wp 4 1 545537978 -32958555 5000 0 0 0 0
wp 5 1 545547933 -32864141 5000 0 0 0 0
wp 6 1 545597705 -32695913 5000 0 0 0 0
wp 7 1 545552910 -32598066 5000 0 0 0 0
wp 8 6 0 0 0 0 0 0 165
wp 9 1 545714148 -32501936 5000 0 0 0 165
wp 10 0 0 0 0 0 0 0 0
wp 11 0 0 0 0 0 0 0 0
wp 12 0 0 0 0 0 0 0 0
...
wp 59 0 0 0 0 0 0 0 0
Changing Mission-Index in flight
The MISSION CHANGE mode allows to switch between multiple stored missions in flight. With mode active the required mission index can be selected by cycling through missions using the WP mode switch. Selected mission is loaded when mission change mode is switched off. Mission index can also be changed through addition of a new Mission Index adjustment function which should be useful for DJI users unable to use the normal OSD mission related fields.
Navigation
The navigation system in INAV is responsible for assisting the pilot allowing altitude and position hold, return-to-home and waypoint flight.
NAV ALTHOLD mode — altitude hold
Altitude hold requires a valid source of altitude — barometer, GPS or rangefinder. The best source is chosen automatically. GPS is available as an altitude source for airplanes only.
In this mode THROTTLE stick controls climb rate (vertical velocity). When pilot moves stick up — quad goes up, pilot moves stick down — quad descends, you keep stick at neutral position — quad hovers.
CLI parameters affecting ALTHOLD mode:
- nav_use_midthr_for_althold — when set to «0», firmware will remember where your throttle stick was when ALTHOLD was activated — this will be considered neutral position. When set to «1» — 50% throttle will be considered neutral position.
Related PIDs
PIDs affecting altitude hold: ALT & VEL
PID meaning:
- ALT — translates altitude error to desired climb rate and acceleration. Tune P for altitude-to-velocity regulator and I for velocity-to-acceleration regulator
- VEL — translated Z-acceleration error to throttle adjustment
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.
NAV POSHOLD mode — position hold
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:
- nav_user_control_mode — can be set to «0» (GPS_ATTI) or «1» (GPS_CRUISE), controls how firmware will respond to roll/pitch stick movement. When in GPS_ATTI mode, right stick controls attitude, when it is released, new position is recorded and held. When in GPS_CRUISE mode right stick controls velocity and firmware calculates required attitude on its own.
Related PIDs
PIDs affecting position hold: POS, POSR
PID meaning:
- POS — translated position error to desired velocity, uses P term only
- POSR — translates velocity error to desired acceleration
NAV RTH — return to home mode
Home for RTH is the position where vehicle was first armed. This position may be offset by the CLI settings nav_rth_home_offset_distance
and nav_rth_home_offset_direction
. This position may also be overridden with Safehomes. RTH requires accelerometer, compass and GPS sensors.
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):
- 0 (NAV_RTH_NO_ALT) — keep current altitude during whole RTH sequence (nav_rth_altitude is ignored)
- 1 (NAV_RTH_EXTRA_ALT) — climb to current altitude plus extra margin prior to heading home (nav_rth_altitude defines the extra altitude (cm))
- 2 (NAV_RTH_CONST_ALT) — climb/descend to predefined altitude before heading home (nav_rth_altitude defined altitude above launch point (cm))
- 3 (NAV_RTH_MAX_ALT) — track maximum altitude of the whole flight, climb to that altitude prior to the return (nav_rth_altitude is ignored)
- 4 (NAV_RTH_AT_LEAST_ALT) — same as 2 (NAV_RTH_CONST_ALT), but only climb, do not descend
- 5 (NAV_RTH_AT_LEAST_ALT_LINEAR_DESCENT) — Same as 4 (NAV_RTH_AT_LEAST_ALT). But, if above the RTH Altitude, the aircraft will gradually descend to the RTH Altitude. The target is to reach the RTH Altitude as it arrives at the home point. This is to save energy during the RTH.
NAV WP — Waypoint mode
NAV WP allows the craft to autonomously navigate a set route defined by waypoints that are loaded into the FC as a predefined mission.
CLI command wp
to manage waypoints
wp
— List all waypoints.
wp load
— Load list of waypoints from EEPROM to FC.
wp <n> <action> <lat> <lon> <alt> <p1> <p2> <p3> <flag>
— Set parameters of waypoint with index <n>
. Note that prior to INAV 2.5, the p2
and p3
parameters were not required. From 2.5, INAV will accept either version but always saves and lists the later full version.
Parameters:
-
<action>
— The action to be taken at the WP. The following are enumerations are available in INAV 2.6 and later:- 0 — Unused / Unassigned
- 1 — WAYPOINT
- 3 — POSHOLD_TIME
- 4 — RTH
- 5 — SET_POI
- 6 — JUMP
- 7 — SET_HEAD
- 8 — LAND
-
<lat>
— Latitude (WGS84), in degrees * 1E7 (for example 123456789 means 12.3456789). -
<lon>
— Longitude. -
<alt>
— Altitude in cm. Seep3
bit 0 for datum definition. -
<p1>
— 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 < nav_auto_speed. For POSHOLD TIME waypoint it is time to loiter in seconds. For JUMP it is the target WP index (not number). For SET_HEAD, it is the desired heading (0-359) or -1 to cancel a previous SET_HEAD or SET_POI. -
<p2>
— 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 < nav_auto_speed. For JUMP it is the number of iterations of the JUMP. -
<p3>
— A bitfield with four bits reserved for user specified actions. It is anticipated that these actions will be exposed through the logic conditions.- Bit 0 — Altitude (
alt
) : Relative (to home altitude) (0) or Absolute (AMSL) (1). - Bit 1 — WP Action 1
- Bit 2 — WP Action 2
- Bit 3 — WP Action 3
- Bit 4 — WP Action 4
- Bits 5 — 15 : undefined / reserved.
Note:
- If
p2
is specified, thenp3
is also required. p3
is only defined for navigable WP types (WAYPOINT, POSHOLD_TIME, LAND). The affect of specifying a non-zerop3
for other WP types is undefined.
- Bit 0 — Altitude (
-
<flag>
— Last waypoint must haveflag
set to 165 (0xA5).
wp save
— Checks list of waypoints and save from FC to EEPROM (warning: it also saves all unsaved CLI settings like normal save
).
wp reset
— Resets the list, sets the number of waypoints to 0 and marks the list as invalid (but doesn’t delete the waypoint definitions).
wp
example
# wp load
# wp
# wp 11 valid
wp 0 1 543533193 -45179273 3500 0 0 0 0
wp 1 1 543535723 -45193913 3500 0 0 0 0
wp 2 1 543544541 -45196617 5000 0 0 0 0
wp 3 1 543546578 -45186895 5000 0 0 0 0
wp 4 6 0 0 0 1 2 0 0
wp 5 1 543546688 -45176009 3500 0 0 0 0
wp 6 1 543541225 -45172673 3500 0 0 0 0
wp 7 6 0 0 0 0 1 0 0
wp 8 3 543531383 -45190405 3500 45 0 0 0
wp 9 1 543548470 -45182104 3500 0 0 0 0
wp 10 8 543540521 -45178091 6000 0 0 0 165
wp 11 0 0 0 0 0 0 0 0
...
wp 59 0 0 0 0 0 0 0 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.
Multi-missions
Multi-missions allows up to 9 missions to be stored in the FC at the same time. It is possible to load them into the FC using the CLI. This is acheived by entering single missions into the CLI followed by wp save
after the final mission has been entered (the single missions can be entered one after the other or as a single block entry, it doesn’t matter). All missions will then be saved as a Multi Mission in the FC. Saved multi missions display consecutive WP indices from 0 to the last WP in the last mission when displayed using the wp
command.
E.g. to enter 3 missions in the CLI enter each mission as a single mission (start WP index for each mission must be 0).
wp 0 1 545722109 -32869291 5000 0 0 0 0
wp 1 1 545708178 -32642698 5000 0 0 0 0
wp 2 1 545698227 -32385206 5000 0 0 0 165
...
wp 0 1 545599696 -32958555 5000 0 0 0 0
wp 1 1 545537978 -32958555 5000 0 0 0 0
wp 2 1 545547933 -32864141 5000 0 0 0 0
wp 3 1 545597705 -32695913 5000 0 0 0 0
wp 4 1 545552910 -32598066 5000 0 0 0 0
wp 5 6 0 0 0 0 0 0 165
...
wp 0 1 545714148 -32501936 5000 0 0 0 165
# wp save
Multi Mission after saving:
# wp
# wp 10 valid
wp 0 1 545722109 -32869291 5000 0 0 0 0
wp 1 1 545708178 -32642698 5000 0 0 0 0
wp 2 1 545698227 -32385206 5000 0 0 0 165
wp 3 1 545599696 -32958555 5000 0 0 0 0
wp 4 1 545537978 -32958555 5000 0 0 0 0
wp 5 1 545547933 -32864141 5000 0 0 0 0
wp 6 1 545597705 -32695913 5000 0 0 0 0
wp 7 1 545552910 -32598066 5000 0 0 0 0
wp 8 6 0 0 0 0 0 0 165
wp 9 1 545714148 -32501936 5000 0 0 0 165
wp 10 0 0 0 0 0 0 0 0
wp 11 0 0 0 0 0 0 0 0
wp 12 0 0 0 0 0 0 0 0
...
wp 59 0 0 0 0 0 0 0 0
Changing Mission-Index in flight
The MISSION CHANGE mode allows to switch between multiple stored missions in flight. With mode active the required mission index can be selected by cycling through missions using the WP mode switch. Selected mission is loaded when mission change mode is switched off. Mission index can also be changed through addition of a new Mission Index adjustment function which should be useful for DJI users unable to use the normal OSD mission related fields.
В этой статье я расскажу вам как установить GPS в квадрокоптер и как его настроить.
Содержание
- Модули GPS
- Как подключить GPS к контроллеру полета
- Как настроить GPS в Betaflight
- Как настроить GPS в iNAV
- Где купить
На рынке есть много различных GPS-модулей, которые можно использовать в квадрокоптерах для навигации. Одними из самых популярных GPS-модулей на сегодня являются:
- Beitian BN-180 и BN-220.
Стоят они недорого, менее 10$.
Вот как они выглядят:
Кстати, если вы видите какие-то царапины на матовом участке GPS антенны, то это не отсутствие контроля качества дефектов производственного процесса, а наоборот — результат настройки антенны во время финального тестирования. Эти типы антенн имеют номинально настроенную частоту, но подвержены влиянию конструкции, размещенных компонентов и пайки. Маленькие царапины по центру краев или углов приводит к их точной настройке на нужную частоту:
Как подключить GPS к контроллеру полета
Обычно GPS модуль подключается к полетному контроллеру с помощью интерфейса UART. Можно использовать практически любой свободный порт UART. Я не рекомендую использовать SoftSerial UART для подключения GPS модуля. Соединение очень просто, для этого вам нужно подсоединить GPS TX к FC RX и GPS RX к FC TX.
Выше и ниже примеры подсоединения GPS модуля к порту UART3 на полетном контроллере.
Как настроить GPS в Betaflight
Настройка в Betaflight простая, просто следуйте инструкции ниже.
Зайдите на вкладку Ports, выберите свободный порт UART (в моем случае это UART3) и установите в блоке Sensor Input – GPS и 57600. Вы можете выбрать любое значение в выпадающем списке скорости передачи данных, но значение «9600» приводит к наименьшей скорости передачи данных, а 115200 — к наибольшей и полетный контроллер будет тратить меньше времени на накопление данных. Если выбрать «AUTO«, то скорость передачи данных будет установлена на 57600.
На вкладке Configuration включите функцию GPS. Установите для параметров Auto Baud и Auto Config значение — ON. Выберите параметр AutoDetect на вкладке Ground Assistance Type. Существует два наиболее популярных протокола связи GPS модуля — UBLOX и NMEA. Модули Beitian используют протокол UBLOX по умолчанию. Попробуйте каждый из этих протоколов, если вы не уверены, какой из них используется в вашем GPS модуле.
Если вы все правильно подсоединили и настроили GPS в квадрокоптер, то в статус-баре конфигуратора будет отображаться значок GPS:
Если включить режим эксперта (маленький переключатель в строке состояния), то можно увидеть состояние GPS, количество и силу принятых сигналов от спутников. После определения GPS-положения (накопления координат) на карте будет отображаться ваше (квадрокоптера) текущее положение:
Как настроить GPS в iNAV
Настройка GPS в iNAV очень похожа на настройку в программе Betaflight Configurator.
На вкладке Ports выберите свободный UART-порт и в блоке Sensor выберите GPS и скорость.
Во вкладке Configuration, в блоке GPS, активируйте переключателем вкладку GPS for navigation and telemetry, затем выберите протокол UBLOX или NMEA. Затем в Ground Assistance Type выберите AutoDetect.
Если все хорошо, то в статус баре iNAV появится значок GPS, который свидетельствует о том, что все работает и GPS в квадрокоптер установлен верно:
В новых прошивках для полетного контроллера F3 (например, SpRacingF3) отсутствует поддержка GPS. За сообщение об этом спасибо читателю Руслану.
Подробнее: Betaflight прекращает разработку ПО для полетных контроллеров F3 c STM32F3
Где купить
Ниже ссылки на различные GPS-модули, которые подойдут для квадрокоптера. В продаже есть разные, в том числе с разъемами мини-джек, но вам нужны квадратные, как на фото в начале статьи.