How I set up iNav Flight

I wanted to document the process that I use to set up iNav Flight on a new flight controller, and what I'll do when I update to a newer version. I also plan to include a database of working iNav dumps for my models, so that it's easier for me if I need to re-flash, and other people may find them useful. This process is for fixed wing models, I don't use iNav for multirotors. To follow this guide, you'll need to download the latest copy of the iNav Configurator and a USB cable to connect your flight controller to your computer.

This article is currently based on iNav 2.0.0 using iNav Configurator 2.0.0, the images were grabbed from iNav Configurator 2.0.0-rc3

This document is currently a work in progress and not complete. I recommend checking with the iNav WiKi to check for missed steps. I will not be held responsible for any issues that occur.

Contents

  1. Setting up a fresh install of iNav
  2. Getting the correct target
  3. Flashing the firmware
  4. Updating iNav
  5. Downgrading iNav
  6. Initial iNav configuration
  7. Soldering to the flight controller
  8. Getting the transmitter talking to iNav
  9. Testing the control surfaces
  10. Testing our new setup at the field

Setting up a fresh install of iNav

Getting the correct target

The first thing you need to do before setting up iNav is to find out the correct target for your flight controller. You may find this on the product description page for your flight controller, or you can take a peek at what's already on there. To do this, open the iNav Configurator and plug in your flight controller. Click the connect button. If the flight controller already has iNav flashed to it, you'll get the full array of tabs down the side, in which case, click on the CLI tab. If iNav is not already installed, you should be taken straight to the CLI tab. Enter:

version

in to the CLI and press enter. You will be presented with the current firmware version and target of the flight controller, for example.

# version # INAV/MATEKF405 1.9.1 Apr 21 2018 / 13:25:29 (03a5c1922)

We are interested in the first part of the 2nd line where is shows the FIRMWARE/TARGET. In this case the firmware installed is INAV (could read BETAFLIGHT or whatever else is installed) and the target is MATEKF405. We now know that we need to install iNav for the target MATEKF405. As a word of warning, some BetaFlight targets may be more specialised or named slightly differently than with iNav, for example I had an Omnibus F4 V3 which on BetaFlight used the target OMNIBUSF4SD but on iNav used the target OMNIBUSF4V3.

Flashing the iNav firmware

New iNav installation

Image showing the iNav firmware flasher screen.

Click the disconnect button at the top of the screen and click on Firmware Flasher in the side bar. Next select the target from the top drop-down box, followed by the version that you would like to install. If I want to ensure that it is a 100% clean install, I turn on Full chip erase. Next click Load Firmware [Online] to download the firmware from the internet. Once downloaded, click the Flash Firmware button to write iNav on to your flight controller.

Updating iNav

There are a couple of things I should mention with regards to updating, some depend on how big an update is being performed. There are some stages that I gloss over, but they are covered in more detail later on this page. The first thing I always do before performing an update, no matter how big, is connect to iNav, go to the CLI tab, and enter either, for a minor upgrade:

diff

or for a major upgrade:

dump

Scroll right to the top and copy from the # version all the way to the bottom. Paste this in a new text document and save it in an appropriate folder and give it a name so that you know what it is and which model it is for, for example: iNav Backups/iNav 1.9.1 - Nano Goblin.txt.

Having a backup of your settings is so useful, it allows you to roll back to any previous version you've used. If you don't do this and it's discovered that iNav 2.0.0 has a bug, without the backup, it would be hard to go back to previous settings when downgrading back to 1.9.1. Another example of backups being useful would be if your flight controller dies, you can just set it up a new flight controller, perform the calibration, and write your backed up settings dump to it.

Minor iNav updates

Minor version updates, for example 1.9.0 to 1.9.1, I just do the same as a new installation, making sure that Full chip erase is not selected. The only difference is that after downloading the firmware from the internet, I will read the release notes to see if anything has changed that may effect the settings on the board. For example, in a past release, the developers changed the multiplier on the current sensor by a magnitude of 10, so previous settings of 12 would now be 120, this allowed these devices to be tuned more accurately. Any changes that may effect my settings, I make note of and correct after flashing the firmware.

Major iNav updates

With major version updates, I do things differently. Usually major version updates change the way things work, and older settings may cause issues. After saving my settings, I do a new installation of iNav with Full chip erase enabled. I'll then connect in to iNav and perform the sensor calibration, Save and reboot, followed by applying the preset for my model, and Save and reboot. Next, I will enter the CLI tab and get a dump of the new iNav installation. We now need to use a notepad/word processing application that can compare two file. On Windows, I use the free program Notepad++ and a plug-in called Compare. Load the backup of the previous version's dump into the text editor, now create a new document and copy in the new dump from iNav. Compare the 2 dumps and the differences should be highlighted. Go through the differences between the two dumps and make a decision on whether or not to copy the old value from your previous installation to the new. You can use the release notes for help, but in all cases, I would not copy values related to the PIFF/PID settings. If you want to use your old values, insert the value into the new dump file. I understand that this may not be the clearest of explanations, however, Joshua Bardwell has a video on how to upgrade BetaFlight, and it's the same process. Once you've made your changes to the new dump, copy that back in to the iNav CLI and save the changes. You should very much treat this as a new install, and test everything thoroughly.

Downgrading iNav

To downgrade to a previous version of iNav, flash the firmware as if it's a new install with Full chip erase enabled. Perform the calibration and write previously backed up settings dump for that version to the flight controller. If you don't have a settings dump for that version, you will need to do a dump and compare between the closest backup you have and the freshly installed iNav dump, in the same way as a major version update above.

Initial iNav configuration

Calibrate the accelerometer

Image showing the iNav calibration screen.

The first thing I do in the initial config is to calibrate the accelerometer. To do this, connect to the board and click on the Calibration tab. To calibrate the board, you must first set it level, top side up and click the Calibrate Accelerometer button. The first time you do this, it may not actually take a reading, but post a brief explanation of what to do. Click that box away, make sure the board is level and click Calibrate Accelerometer again. This time it will record the position. Looking at the screen, you can see images of the board/aircraft in multiple orientations. You need to position the board in these orientations one at a time, and click the Calibrate Accelerometer button in each orientation. Other than the first position, it doesn't matter which order you perform the rest of the calibrations. Once complete, click Save and reboot, something you'll find you do quite a lot with iNav.

Setting the mixer

Image showing the iNav mixer screen.

The next step is new with iNav V2.0.0 and it's to set the mixer for the model. This is much improved and simplified over the previous system. Head in to the Mixer tab and first select the type of model in the platform type box. Next you will be able to chose the mixer preset that best suits your model. These presets make setting up the model so much easier compared to the older versions of iNav where you'd manually have to mess about with mixes in the CLI; 99% of the time, the preset will work with what you have, and it makes it easier to tweak and add things to the mix via the configurator. NOTE: Servo reversing is still done in the servo tab. Once you've selected your preset, click Load and apply, then Save and reboot.

Setting a preset

Image showing the iNav presets screen. Image showing the iNav presets warning screen.

The next step is to set a preset for your aircraft. For fixed wing this is usually going to be either Airplane General for planes or Flying Wing Z84 for flying wings or planks. These presets will set appropriate starter PIDs, gyro filtering, and other settings for these types of aircraft. Select the appropriate preset and click the Apply button. You will see a warning of how selecting the preset will overwrite some settings and how you should still tweak the settings for your specific aircraft. Click Save and reboot to apply the settings.

Running a CLI script to set common properties

Image showing the iNav CLI screen.

The last thing I do in the initial configuration is to run a script in the CLI window to set common settings. Going through the iNav Wiki, you'll read about things to set in the CLI for fixed wing aircraft, my script encompasses all this plus settings for auto launch, features, failsafe, GPS, OSD layout, return to home, and throttle. I've included my script below, with the exception of the OSD settings. I highly recommend setting up the OSD how you like it, use get OSD in the CLI to copy the settings and paste them in your own script. You will need to add set to the start of each line, so that it looks like the script below. # indicates a comment, so those lines aren't read by the CLI. After entering the script into the CLI, you must type save and hit enter to save the changes.

Though this main document has been written using iNav 2.0.0, whenever I update my script because of a version change, I will add a selectable script below. Choose the version best suited from the list.

iNav Version
# Features feature PWM_OUTPUT_ENABLE #Enable motors and PWM output. feature OSD #Enable the OSD. feature AIRMODE #Permanently enable airmode. # Base settings set min_throttle = 1035 #Minimum throttle. You will need to change this when you calibrate your ESC and find the minimum smooth spinning value for your motor. set max_throttle = 2000 #Maximum throttle. set min_command = 1000 #Minimum command for throttle. If less than min_throttle, the motors won't spin, which is a very good thing! set gps_sbas_mode = EGNOS #I set to EGNOS (Europe) for faster lock, but either set to your region or auto. set gps_ublox_use_galileo = ON #Only use if your GPS module supports Galileo satellites. # Fixed Wing set max_angle_inclination_rll = 600 #Set the max roll angle of the sticks to 60 degrees. set max_angle_inclination_pit = 600 #Set the max pitch angle of the sticks to 60 degrees. set small_angle = 180 #This setting enables arming with the aircraft in any position. #Return to Home set nav_rth_allow_landing = NEVER #Never land when home point reached, the aircraft will loiter above. set nav_rth_climb_first = OFF #Turn towards home before climbing to the set altitude. set nav_rth_alt_mode = AT_LEAST #Minimum height for return to home. set nav_rth_altitude = 9100 #RTH altitude of 91 metres (300ft). set nav_rth_home_altitude = 6096 #Alitude to go to once home is reached, 60 metres (200ft). set inav_reset_home = FIRST_ARM #Reset the home point when the model is armed for the first time with each plug in. Default is EACH_ARM, but if you accidentally disarm in flight, when you re-arm the home point will be saved there. # General assisted navigation settings. set nav_fw_cruise_thr = 1400 #Will vary dependant on your aircraft, but 1400 is a decent starting point. set nav_fw_min_thr = 1200 #Minimum throttle value assisted modes can use. set nav_fw_max_thr = 1900 #Maximum throttle value assisted modes can use. set nav_fw_bank_angle = 35 #Maximum bank angle in Angle based modes. set nav_fw_loiter_radius = 5000 #100 metre circle in the sky. set roll_rate = 36 #360 degrees a second roll rate. A good starting point for wings, use 18 (180 degrees) for planes. set pitch_rate = 18 #180 degrees a second roll rate. A good starting point for wings, use 9 (90 degrees) for planes. #Failsafe set failsafe_recovery_delay = 10 #Allow 1 second to pass before using failsafe. set failsafe_throttle_low_delay = 0 #Never call for failsafe based on the throttle being low, allows for gliding. set failsafe_procedure = RTH #Return to home if failsafe is triggered. # Auto Launch set nav_fw_launch_velocity = 200 #Forward velocity the plane needs to reach for the launch sequence to be detected in cm/s. set nav_fw_launch_accel = 1700 #Used to detect launch via acceleration when you throw your Fixed-wing. set nav_fw_launch_max_angle = 180 #Allows the craft to launch at any angle. set nav_fw_launch_detect_time = 30 #Time iNav detects the plane has been launched before activating the launch sequence. set nav_fw_launch_motor_delay = 300 #The time (ms) since launch is activated until the 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_spinup_time = 100 #The time (ms) since the motor starts until it reaches nav_fw_launch_thr. 100 should be the minimum value to protect ESCs and motors. set nav_fw_launch_idle_thr = 1000 #Idle throttle of 1000 will mean the prop won't spin until the launch has been detected and the motor delay passed. set nav_fw_launch_thr = 1900 #This is the climb throttle setting and will change depending on the aircraft and how steeply you want to climb. set nav_fw_launch_climb_angle = 22 #The angle at which the aircraft climbs out in degrees. You will need to set this with your launch_thr value to get the optimum climb. set nav_fw_launch_timeout = 10000 #10 seconds, the time that auto launch will stay active, climbing the aircraft, before defaulting back to the currently selected mode. set nav_fw_launch_min_time = 0 #Allow launch mode to execute at least this time (ms) and ignore stick movements. Default is 0. set nav_fw_launch_max_altitude = 0 #Altitude(cm) at which LAUNCH mode will be turned off and regular flight mode will take over. Default is 0. Copy CLI code Hide Comments

Read through the comments of the CLI code above, as you may need to change some values for your model. These defaults are set for a flying wing, if using an airplane, you will need to change some of the settings. All the commands are commented (green) so that you can understand what they are doing. You can copy and paste this into iNav's CLI and hit return. Remember to enter save afterwards and hit return, otherwise the settings will not be written to the flight controller.

Soldering to the flight controller

It's at this point, with a new build, that I start soldering everything up. I'm not going to enter into that here in detail, as it will be different for different flight controllers. However, I'm going to give a list of the parts that you'll need to get in the air and some pointers.

Parts

The most obvious parts you'll need is the airframe and everything required to fly it as a naked model, so a motor, ESC, propeller, servos, and receiver. With the receiver make sure that it supports 1 or 2 wire protocols, for example with FrSKY you want a receiver with SBUS and S.PORT connectors; with Spektrum, I believe that satellite receivers are used which directly plug in to the flight controller, but, you need to use a full size receiver with the satellite installed to bind to the transmitter first. A receiver takes usually uses 1 UART, but due to inversion some FrSky receivers may need 2 UARTs on some flight controllers. Next you will need the parts related to getting iNav working:

That's all you need to get iNav working, though it would be a lot more fun if you could see where you're going. For that, you'll need some FPV equipment:

Flight controller orientation

When you install the flight controller in the model, pay attention to the arrow on the flight controller as this will effect our set up. Ideally try to get the arrow facing forwards, but if this is not possible you need to tell the flight controller so that it can compensate. To do this, go to the configuration page and you will need to set the Yaw degrees in the Board and Sensor Alignment section. Enter the angle of rotation, Save and reboot, then in the setup tab verify that moving the physical model makes the same movements on screen. The simplest way is to have the back of the model facing you, reset the view, and then move the model. This has to be right otherwise the stabilisation and navigation modes will not work correctly.

Getting the transmitter talking to iNav

Image showing the Taranis input screen.

The first thing that you need to do is create a model on your transmitter. Regardless of what you're flying, the model on the transmitter should be a standard classic plane configuration with no mixing on the transmitter whatsoever. This process varies for different brands of transmitter, so wont be covered here. Keep note of the channel output order as this will be needed in iNav, for example a Taranis (see image) the order will be (A)ileron, (E)levator, (T)hrottle, and (R)udder - so you'd need to remember the acronym AETR.

Image showing the Taranis failsafe setting.

Next bind your receiver to the transmitter. Again, this process varies between brands, so won't be covered here. The final step on the transmitter side is to set failsafe, once again it varies, but you want the receiver to output no commands when it loses connection with the transmitter, on Taranis this setting is called No Pulses (see image) and on Crossfire it's Cut.


The channels should be correct as we have matched the channel order to our transmitter. If a channel is reversed, you can reverse it on the transmitter until it goes in the right direction. If the values aren't exactly 1000, 1500, and 2000, you will need to adjust the channel end points in your transmitter to get these correct.

Image showing the iNav ports screen.
Ports tab
Image showing the iNav configuration screen, specifically the receivers section.
Configuration tab
Image showing the iNav receiver screen with the transmitter at minimum throws.
Receiver tab with minimum throws
Image showing the iNav receiver screen with the transmitter at maximum throws.
Receiver tab with maximum throws
Image showing the where to adjust the minimum end point on the taranis.
Taranis - min end point adjustment
Image showing the where to adjust the maximum end point on the taranis.
Taranis - max end point adjustment
Image showing the where to reverse the output on the taranis.
Taranis - reverse output

Testing the control surfaces

Now that our transmitter is talking to iNav, the next step is to test the control surfaces. To do this, make sure your prop is removed and plug in a flight battery. Move each gimbal and make sure that the correct surfaces are moving in the correct direction. If a surface is not moving correctly, do not reverse that surface in the transmitter, it must all be corrected in iNav. If a control surface is moving the wrong way, head in to the Servos tab and click the reverse button on that surface and re-test. Aircraft with mixed surfaces, for example flying wings or V-tails, will always need one servo reversed on these surfaces. For example, 90% of the time, a flying wing will need servo 3 reversed. Most of the time, you will be able to get the control surfaces working correctly with servo reversing, in very few cases the mixer may need altering, however that's outside the scope of this page. Once your surfaces are working correctly, head over to the motor tab and click the enable button. Slowly increase the output to the motor until it starts to spin smoothly (you can move the sliders with the up and down arrows on the keyboard). Underneath the slider is a number, I round up to the nearest 5, then disable the motors and go to the configuration screen. On the right hand side, find the box for minimum throttle and enter the number in there. While here set minimum command to 1000 and maximum throttle to 2000, then Save and reboot and disconnect the flight battery.

Modes

For the next part of the testing, we need some flight modes. I recommend following my 5 flight modes and arming on a single channel tutorial to set up your arming and flight modes. For full disclosure, I no longer use this method as I have modified my Taranis with a 6 position rotary swich, which I use for flight modes. However, if I had a stock Taranis, I would 100% use this method.

Stabilisation

Now we have some flight modes, we need to test that stabilisation is working correctly. Connect the flight battery and put the model in to horizon mode (will need to be armed also if you've followed my tutorial). Bank the model to the right and the left aileron/elevon should raise to try and level the model. If you roll left, the right surface should raise. Next dip the nose down and the elevator or both elevons should raise to try to level the nose. If you point the nose up the surfaces should lower. If you have yaw control, this should be tested too by spinning the model to the right and seeing the rudder move left. This should all work perfectly as we have ensured out transmitter matches what the flight controller is expecting. The biggest cause of problems with stabilisation is incorrectly set transmitters or flight controller orientation.

Failsafe

While we are at the bench with our flight controller plugged in and our transmitter connected, take a look at the top of the iNav configurator for a set of icons, in particular the parachute icon. This is the failsafe status indicator; it will either be grey - transmitter not connected, blue - transmitter connected, or red - transmitter no longer connected, failsafe activated. Right now the parachute should be blue, switch off your transmitter and if all is setup correctly the icon should turn red, indicating that failsafe has activated. If this is not the case, you will need to double check your transmitter/receiver and how they interoperate failsafe. The iNav Wiki can point you in the right direction.

Testing our new setup at the field

At the field, there are a few checks to make before we take to the skies. I have a few checks to do on the ground, and then a testing procedure for the first few flights, to make sure that everything going forward works without a hitch.

Ground tests

Test 1 - Range test

The first test is one that should be carried out for every RC model as it can detect issues with the radio link before even leaving the ground. The for the range, you put your transmitter in range testing mode, then walk away from the model while moving the control surfaces. Each transmitter will have a different procedure and checking distance, so please read the manual of your system to get this right.

Test 2 - Failsafe

Even though we tested this on the bench, it's always good to double check it in a real world situation. Make sure you perform this test with the prop removed as the motor will spin.

All being well, the aircraft should try to climb (increase throttle and may move control surfaces). Make sure that you can regain control by switching the transmitter back on and move the pitch and/or roll stick. If this works, your failsafe is set and will perform as desired in flight.

Test 3 - Preflight checks

I do these check before every flight, so it makes sense that they should be done before our maiden flight too.

That's it for on the ground, the next step is to get that plane in the air and carry out the maiden and test flights.

Test flights

Test 1 - Getting in trim

This flight is all about manual mode and again is similar to the first flight of any RC model. As it's the maiden, you may want someone else to launch the model so that you have both hands on the sticks; but if you are on your own, try to launch with a hand on the pitch and roll stick and set the throttle with your mouth. Get the model in the air and trim using the transmitter trims until you achieve straight and level flight at cruise throttle. Once you're happy, land the model and have something available to measure the control surface deflection, I've bought myself a cheap digital angle measure for this. Measure the control surface deflections, noting them down, then reset the trims to centre on the transmitter. If you've had to use sub-trims, make sure to remove these too. Physically set the deflection of the control surfaces using the measurements that you just took. The transmitter should now have no trims set and the surfaces should fly the aircraft straight. Launch and test. If it needs adjustment, repeat this step until it's good. Once you're straight and level with no trims, continue on to the next test.

Test 2 - Putting the stabilisers on

The next thing we're going to test is the stabilised mode, and get this flying level. Take off in manual and get a few mistakes worth of altitude, and switch into a stabilised mode. I usually use horizon for this, so I'll just write horizon, meaning the stabilised mode, for the rest of this test. All being well, nothing much will happen except for a smoother flight. If something does go wrong (it's not happened to me yet) flick back in to manual mode, land the model and start finding out what's wrong (check the transmitter movements in the receiver tab are correct and the board alignment for starters). If horizon works correctly I'll set the throttle to cruise speed and take my hands off the sticks. If the plane doesn't fly level, watch for changes in roll and pitch, land and adjust the flight controller pitch and roll angles slightly (2 to 10 degrees based on the amount of movement seen) to counter this movement (If the FC is rotated 90 or 270 degrees, pitch and roll are swapped). Take off and try again, it'll either be better or worse. If worse go the other way, if better keep changing that way until you achieve level flight. Once you have hands off level flight in horizon or angle, all the other automated/stabilised flight modes will work better.

Test 3 - Maximising the flight envelope

This test, isn't really a test, but a performance enhancer, and it's all about making the most of the stabilised modes. Switching on roll and pitch angles on in OSD makes this a lot easier, but you can estimate if you've not enabled them. Make sure you are recording DVR footage, then in manual do some full deflection rolls and loops, not exceeding the limits of your airframe. The 2nd part of this is done later at home, when you find the start of the loop and roll (level flight), then go forwards 1 second measuring the loop or roll. If you have the angles on the OSD, this will be straight forward; but if not, estimate the number of rotations, for example 1.5 rolls and 0.75 of a loop, then multiply those number by 360 to give the degrees per second. My example would be 540 degrees per second in the roll axis and 270 degrees per second in the pitch axis. In iNav configurator, go to the PID Tuning page and on the right side, near the top there are boxes to enter the roll rate and pitch rate, enter your figures in these boxes and click save. Your model will now roll and loop as fast in stabilised modes as it does in manual mode.

Test 4 - Testing the automated flight modes

Once you're happy with horizon (stabilised flight), get some altitude and start testing other flight modes. Cruise should just work as we've got horizon working, but you just want to make sure the altitude stays consistent. Once cruise is confirmed working, I'll test loiter, again being ready to switch out if anything looks wrong. Finally, once I'm happy that the previous modes are working fine, I'll test return to home. I'll first test at above 300', where it should just turn to home and loiter when it gets there, slowly descending to 200'. If this works, I'll switch back to another flight mode, and fly away staying at around 200'. When I activate return to home this time, it should turn to home and climb to 300' before loitering around home and descending to 200'. If this all works, I'm confident that everything is set up correctly and working.

After that if I'm feeling saucy and it's a calm day, I may do an auto tune to improve the PIFFs. Then I just enjoy flying the damn thing. After this, other than if I've made changes, the only in the air test I do is a quick return to home trigger each flight to make sure the home point is set correctly.