Setting up iNav on 250 class racer
Although iNav (iNavFlight) with advanced GPS and navigation support is best suited for larger, GPS equipped drones, there is absolutely no reason not to use it on something smaller like 250 racer. Why? Well, why not? Basic flight mechanics is the same like in Cleanflight or Betaflight. FP-PID is brand new PID controller, not very popular and not very well documented, but in many ways superior to LuxFloat. The way it handles D term is just outstanding. It can be pushed very, very high without introducing noise.
OK, it has a drawback. High computational requirements and floating point logic causes users of STM32F1 based flight controllers like Naze32 or CC3D can forget about looptime 1000us. 1400us is all those boards can do. On the other hand, looptime 1000us (or even 500) is quite new thing introduced and made popular only about half year ago. And people were racing before that somehow... So, 2000 is not that bad after all. Good thing SMT32F3 board are strong enough not to have to worry about this issue. So, let's go!
iNav can be configured with Cleanflight Configuator. In almost exactly the same as regular Cleanflight/Betaflight setup. With one very important difference I will describe in next paragraphs.
First important Configurator's tab is "Ports".
My 250 quad uses 2 extra feature: Blackbox logging and OSD and has 3 hardware UART ports. So, MSP protocol is enabled on UART1 for USB access, and on UART2 for OSD. Blackbox is enabled on UART1. It can be shared with MSP: when unarmed MSP is used, after arming port is going into Blackbox mode.
Next important tab is "Configuration", specially section "Board and Sensor Alignment".
If your flight controller is rotated in any axis, software has to know about it. This is specially useful if you want to have easy access to USB port. Degree is counted clockwise. So, if board is rotated 90 degrees right, yaw rotation should be 90. If it is rotated 90 degrees left (counter clockwise), yaw rotation is 270 degrees. Unfortunately, Cleanflight Configurator is not compatible with iNav on that matter. Configurator sets degrees, iNav expects decidegrees. So, instead to using input field, CLI modes has to be used:
set align_board_yaw=9000
Just multiply board rotation by 10 and done.
Next, since we will not be using GPS, Current Meter or any advanced features, most of this tab will be unchanged comparing to defaults.
In my case the only differences are enabled PPM radio and Blackbox logging.
"Radio" tab is also more less unchanged. The only difference is RSSI value reported on channel 6 for OSD. If your radio can not inject RSSI into on of RC channels, just ignore it.
Radio tab is also useful for checking if radio trims are OK. With radio on, Roll, Pitch and Yaw should show 1500. If not, do trim corrections in transmitter so they are at 1500 (or very close)
Second incompatibility between iNav and Cleanflight Configurator is visible in "PID Tuning" tab. Configurator states that you can choose between 3 PID controllers. This is not true. There is only one, FP-PID and it's used no matter what you choose here.
Default PID gains should be flyable, but you have to tune to work well with your hardware. This is highly individual.
Setup of flight modes is also individual. My setup looks like this:
I'm using one of 3 position switches for both arming and enabling Air Mode. Switch on Low disarms, Middle arms, High arms and enables Air Mode.
Last thing is gyro filtering. iNav is much more "conservative" by default than Betaflight for example. While for bigger drones this is fine, small racers will suffer from low pass filters set too low. If you are interested in all the details of why gyro_lpf can and should be pushed up, you can read this thread. If not, and you do not have excess vibrations from motors, just move it it from default 98Hz to 188Hz:
set gyro_lpf = 188Hz
Also additional software low pass filters for gyroscope readouts and PID D-term can be increased from default values. Recently I'm using the following:
set gyro_soft_lpf_hz = 90
set dterm_lpf_hz = 42
And this is all. Flash, setup and go flying!
I'm Paweł Spychalski and I do things. Mainly software development, FPV drones and amateur cinematography. Here are my YouTube channels: