Friday, 3 July 2020

Invalid lines in OpenTX Telemetry log files


This message is very irritating when you're wanting to view a telemetry log file in OpenTX Companion.


Fortunately the fix is not too difficult.
The problem most likely is that the log file contains a column of values that are not relevant for your chosen radio.

For example, with my Taranis X9 Lite and Archer M+ receiver connected to a Matek F405 Wing board and all telemetry being logged, the file includes a column of nonsense values for SF. However there is no switch F on the X9-Lite.

OpenTX log files are in csv format, or comma separated values, and can be opened in any spreadsheet
program such as Excel in Windows or Numbers in Mac OS.

Open the log file in a spreadsheet program and look for the offending column and delete it. 


Then resave or export the file as CSV again.

Then the log file should open correctly using OpenTX Companion, and you should be able to display the GPS track in Google Earth.



SUBSCRIBE iNav Rover Mission
SUBSCRIBE iNav Rover Mission


Wednesday, 24 June 2020

iNav Waypoint Mission Notes


Using Mission Control in the iNav configurator

First waypoint needs to be closer than 100m to the arming or home position. 

This default distance of 100m (10000cm) can be changed in the CLI.

set nav_wp_safe_distance = 10000 (0 - 65000)

Can't arm if it's too far away. May be a safety feature so you dont load the wrong mission.





Default Alt and Speed for all waypoints can be preset using the little gear icon. 

Note that Waypoint Speed is not used for fixed wing and rover missions (only used for multi rotors)

Fixed Wing and Rover both use Cruise Throttle to set the speed for missions. Cruise Throttle must be set high enough for safe RTH and Pos Hold flying.

Waypoint height is in cm (above the home altitude)
5000cm = 50m


If you dont tick "RTH at end of the mission" the plane will loiter at the last waypoint using Pos Hold and Alt Hold.

Rovers need RTH and Landing ticked to stop when home position is reached.

Saving the mission

Save file (Saves the mission on to your computer or phone for later use)

Save Mission to FC (Temporarily saves mission to the FC. Mission is deleted when the FC is powered down)

Save Eeprom Mission (Saved to the FC until it is overwritten by the next Save Eeprom mission command)

Activating the mission

Before arming:
Stick command - Pitch UP and Roll RIGHT to make the mission available for this flight.

In the air:
Turn WP switch on while flying to activate the mission.
Turn WP switch off to end the mission and return to normal iNav control

Satellite view instead of drawn maps

Click on the little gear icon in iNav Configurator, top right, to change map providers.

Choose Bing Maps and enter your personal API key, then restart iNav Configurator and that's all.

OK, how do you get an API key? Quite easy really.

Just enter iNav as the application, nothing else required.






Friday, 12 June 2020

Calculate maximum flight time

If you know your average cruise current you can estimate maximum flight time from any battery.


Assuming you only want to use 80% of the battery capacity the equation is:

Battery mAH divided by Cruise Current Amps multiplied by 0.048 = Flight Time Minutes

Example using 2200mAH Lipo and 3Amp cruise current 

2200mAH / 3A X 0.048 = 35min

Note that battery cell count is not required for the calculation

Saturday, 2 May 2020

iNav Basics - FAQs, Firmware and Configuration

FAQs and common problems 

Which firmware target to flash?
Printed on the bottom of most Matek boards or on the product page

Servo throws are too small in stabilised modes?
Increase FF values in PID Tuning page

Not holding altitude in Angle Mode?
Increase Pitch Degrees in Configuration Page

Flying too slow in Altitude Hold and RTH modes?
Increase Cruise Throttle value in Advanced Tuning page

Will failsafe work if signal is lost?
Turn off the transmitter and check that the little parachute turns red in the iNav configurator

GPS not working?
Switch Rx and Tx connections

Servo reversed?
Select reverse for that servo in the iNav configurator Outputs page

Stabilisation reversed?
Invert the Channel in your transmitter.
Check that the board is facing the right way. Arrow pointing forward.

How to use Autotrim?
Fly in Manual Mode, activate Autotrim and fly level for 2 seconds, keep autotrim on, land and disarm. Repeat whenever you need to retrim.

How to use Autotune?
Fly in Acro Mode, activate Autotune and fly around for a few minutes making full deflection roll and pitch changes. Turn Autotune off in the air. Land and disarm. Save the new PIFFs by pulling both sticks down and out.

Stick Commands don't work?
May be prevented by a Throttle Cut switch or lack of Yaw channel on a flying wing.
Elevator, Aileron, Throttle and Rudder channels must be active but the board disarmed.

Introduction to iNavFlight for fixed wing

iNavFlight is Open Source firmware for flight control boards, which enables GPS navigation for planes and flying wings, as well as multi rotors.

It is an independent project developed by hobbyists and hosted on Github. The developers are not paid, they do this purely as a hobby. So that means any changes happen because a developer feels like it, or enough users have asked and a developer agrees or has the time to write the code.


iNav is quite amazing, powerful, confusing, messy and hard to understand initially, but really worth making the effort to learn.


Before connecting a flight control board 

First concept to understand is that iNav cannot work well with a plane that is out of trim.
Centre of Gravity, Aileron and Elevator throws, and trims must be sorted first without using the transmitter trims and rates. Adjust the pushrod lengths and connection holes as much as possible so the plane is easily controllable and correctly trimmed for level flight.


iNav Configurator 

This is the computer program used to load and configure iNav firmware on your flight control board.

Go to iNav configurator releases on Github, scroll down to the Assets list to see the latest release. Download and install the version that suits your computer system.

Note that this is not the iNav Firmware just the iNav Configurator.


USB drivers

Before you can connect a flight control board (FCB) to your computer you may need to install the correct USB drivers.

Links to the required drivers can be found on the iNAV Configurator front page.

Download and install the relevant USB driver for your computer.



Open iNav configurator and connect your board via USB. Be careful with the delicate USB socket on your board. I usually add extra support with some epoxy glue around the base of the socket.

Select the correct port for your board. It should show up in the list  when the board is plugged in. This shows the port used on my iMac.

Now click Connect.



If the iNav firmware version and iNav configurator version are compatible then this is what you will see.

Otherwise you will get a message about what needs to be updated. You may need to update to a more recent iNav configurator or flash the board with more recent firmware.



Flashing new firmware to the flight control board

To flash new firmware the board needs to be in DFU mode. Matek boards, and most others, have a boot button. Hold down the boot button and reconnect the USB cable then release the boot button. DFU should show in the port window. 

Or just type DFU in the CLI while plugged in.

Now click on Firmware Flasher.

Select the correct target for your board. The target may be written on the bottom of your board or on the product page.

Dont just guess, the target names are not always obvious. For example the Matek F405-Wing board needs the MATEKF405SE target.

Select the firmware version from the list

Click Load Firmware (Online).
Or Load Firmware (Offline) if you have the firmware file saved locally.

Click Flash Firmware
If all is working you will see the progress bar start moving. Once it's done the board will be updated and ready to configure.

If not you may need to try a more recent computer or ask for help on the iNav forums. I cant flash firmware with my 9yo MacBook but my 3yo iMac works fine.

Model setup in your transmitter

Another very important concept to understand is that you don't use any mixing in your transmitter, all the mixing work is handled by iNav and the flight control board. All you need is 100% weight on the first 4 channels for the sticks, and whatever mode switches you need. This model setup can be used for all iNav craft including airplanes, flying wings and multi rotors.

Here is my setup
Ch1 100 Ail
Ch2 100 Ele
Ch3 100 Thr
Ch4 100 Rud
Ch5 to Ch9 Mode switches
Ch11 RSSI

iNav Wiki on GitHub - Must read

This is where all the setup guides and tips are. It is the starting point for understanding how to setup iNav.

If you start asking basic questions on any iNav forum you will most likely be told to go back and read the iNav Wiki

Do yourself a favour and read the Fixed Wing Guide thoroughly, re-read relevant sections, and keep coming back. All the answers are here, including recommendations for flight control boards and GPS units.

Here are the sections you should study closely

Fixed Wing Guide Bookmark this page, you will come back here regularly

iNav Flight Modes This page describes all the non GPS modes.

iNav Navigation Modes These are all the GPS enabled navigation modes

Setting up Failsafe for RTH This shows how to setup the most important feature of iNav - Return to Home when RC signal is lost.

iNav CLI variables This shows all the internal workings of iNav. Something to study when you are more advanced in your iNav journey.

Also check out these excellent guides from the iNav Fixed Wing Facebook Group (scroll down to the pdfs)

https://github.com/iNavFlight/inav/blob/master/docs


Flight Control Board setup in iNav Configurator - Finally!

There is a fair bit to go through here so watch this video first, then I will explain the important bits. The configurator layout may be slightly different now but all the relevant sections are there.


Important - Click Save and Reboot at the bottom of the page to store any changes.

Setup Page
Board animation moves as you move the real board.
Heading, Pitch and Roll show the current angle of the board. 

Calibration Page
Every new board and new firmware requires this accelerometer calibration routine to be completed.
Compass calibration is only for quads. Connecting a compass or magnetometer is not recommended for planes. GPS can provide direction information.

Mixer  Page  
This is where any mixing happens, never in your transmitter
Choose Airplane in the Platform Configuration
Choose the correct Mixer Preset for your plane or wing. Note that default elevon mixing is 50% aileron 50% elevator.
Add new mixer lines for other functions like camera pan, flaps etc.

Outputs Page
Turn on - Enable Motor and servo output
Turn on - Stop motors on low throttle
This is where you can reverse any servos that are moving in the wrong direction, not in the transmitter.
Range and midpoints for each servo can be adjusted here if needed.

If you need to change Aileron and Elevator Rates use the Manual rates in the PID tuning page.

Presets Page
I prefer not to use any of these presets. Some of them are wrong and most likely won't suit your setup.

Ports Page
This is where you tell the board where you will connect the receiver and GPS. Also other devices like Smart Audio VTx control, Runcam camera control etc.

Configuration Page
Most settings will be already selected according to your board. Don't change anything unless you know what you are doing.

Setting that can be changed.

Board alignment
Pitch Degrees - If the plane doesn't fly level in Angle Mode this is where you make changes. I usually need about +3.0 degrees. Note this has nothing to do with Altitude Hold which is a GPS mode. This is to get the plane flying level just using the orientation of the board.
Yaw degrees - This is where you tell iNav if you mounted the board sideways (90 degrees) or backwards (180 degrees)

Receiver Mode
Select your Receiver Mode and Serial Receiver Provider. 

GPS
Turn on GPS for Navigation and Telemetry
GPS protocol should be preset, but check your GPS product page for the correct protocol.

Other Features
"Stop Motors on low throttle" and "Enable Motor and servo outputs" will already be selected if you turned them on in the Outputs page
Analog RSSI - only enable if you are using a receiver with analog RSSI wire connection to the board  (eg L9R)
Turn OSD on - for OSD in your goggles
Permanent Airmode and Launch Mode are optional. I prefer to leave them off.

Failsafe Page
Select RTH

PID Tuning  Page 

PID Gains Tab (or PIFF Gains for fixed wing)
FeedForward or FF is the only value you need to change at this stage. P and I have much less effect on planes compared to quads. 

FF determines how much of your stick movement is forwarded on to the control surfaces when you are in any mode apart from Manual.

Increase FF if your servo throws are too small in Acro or Angle Modes. 

I like to increase (or decrease) FF until the throws in Acro Mode are about 80% of the throws in Manual Mode. That ensures you have adequate control from the sticks with some servo range left for stabilisation.

Autotune Mode can also be used to set P, I and FF values for your plane but I prefer to set them manually.

If your plane has a rudder make sure your rudder throws are quite small, I recommend no more than 10º. Reduce Yaw FF or reduce mechanical throws to ensure the plane doesn't overreact in RTH and POS Hold Modes. 

In ACRO mode Yaw is stabilised so that the rudder will resist turning if you dont actively input some rudder stick. Reduce Yaw P and I to zero if you want to back and yank for turns.

Rates and Expo Tab
You need to determine the maximum Roll rate, Pitch rate and Yaw rate for your plane (in degrees per second) and enter them here. iNav needs to know these rotation rates for accurate stabilisation calculations. 

Note that we are talking about aircraft rotation rates here, not the usual control surface rates (or weights)

Fly your plane in Manual Mode and record how long it takes to do a full roll and a full loop (at a speed that allows loops and rolls). Divide 360 by the number of seconds. If a roll takes 2 seconds then the rate is 360 / 2 = 180 degrees/sec

Roll = 180, Pitch = 120 are good rates for my Ranger 1600, but all planes are different.

Yaw rate is difficult to determine but I use about 60. Ignore Yaw values if you dont have a rudder.

Roll Expo and Pitch Expo are the same as RC Expo in the Receiver page, and relates to all modes other than Manual.

According to the iNav Fixed Wing Guide Max ROLL angle and Max PITCH angle can be increased to 60 for sharper turns in any of the Flight Modes.

Manual ROLL rate, Manual PITCH rate, Manual YAW rate - This is where you can reduce control surface throws if you can't change pushrod connections. 

Filters and Mechanics 
Can be left alone

Advanced Tuning Page
Ignore Multirotor settings

RTH and Landing Settings
Choose a RTH altitude mode, I prefer "At Least, linear descent". Full explanation in the WIKI
Change RTH altitude from 1000 (10m) to something like 5000 (50m)
Change Land after RTH to "Never"

Fixed Wing Navigation Settings
These are the settings for GPS controlled flight modes. Think of them as Autopilot settings.

Cruise Throttle 
This is the throttle setting used for Altitude Hold and RTH flights. The default setting of 1400 is just below half throttle. Increase this value if it is too slow for safe cruising speed. Decrease if it's unnecessarily fast.

It's best not to change the other values at this stage.

Receiver Page
Check that channels are working as expected in this page.
Roll, Pitch, Yaw and Throttle graphs should increase when you push your transmitter sticks up and to the right.
If they decrease you need to reverse that channel on your transmitter. This ensures any stabilisation will be in the correct direction.
Also adjust the channel end points on your transmitter so that Roll Pitch and Yaw graphs go from minimum 1000 to maximum 2000. My Taranis requires end points to be adjusted to -97 and +97.

Manual RC Expo can be reduced here if you want. Default Manual Expo is 70 which is probably more that you are used to.

Select your RSSI channel if you have RSSI configured on a channel.

Modes Page
Here is where you setup all your mode channels and switch position

Commonly used Flight modes.

Air - Not really a mode but a modifier of other modes. Keeps stabilisation working when throttle is low. Best to turn on permanently if you use Presets and your aircraft is hard to glide or land without stabilisation.

Not required if you increase FF for more control in stabilised modes.

AIR shows as the mode in your goggles OSD rather than the actual mode, which is why I turn AIR mode off. 

Angle - self levelling, automatically enabled in all the GPS modes. Useful for checking board alignment, especially pitch degrees,  because it relies on board alignment and correct trim for level flight.

Acro or Rate - This is the default mode, always active when no other mode is selected. Stabilised but not self levelling. I use this mode most of the time for general cruising around.

Manual - No stabilisation, full control. Expo 70% and Rate 100% set by default in iNav. Useful to trim the plane and take to control if the board is faulty. Note that Manual is a mode like any other and has to be assigned to a switch position. 

Servo Autotrim - Attempts to set the servo subtrims for level flight in Manual mode during the first 2 seconds after being activated. Use this instead of transmitter trims and whenever needed to retrim the plane. 

Fly in Manual Mode, activate Autotrim and fly level for 2 seconds, keep Autotrim on, land and disarm to save the new subtrims. 

Autotune - Attempts to tune the P, I values for good stabilisation and FF values to give good stick control. 

Fly in Acro Mode, activate Autotune and fly around for a few minutes making full deflection roll and pitch changes. Turn Autotune off in the air. Land and disarm. Save the new PIFFs by pulling both sticks down and out.

Nav Launch - launch assist mode which delays motor spinup until acceleration from the throw is detected, then provides stabilised 5 sec climb out, then switches to whatever other mode is selected. eg. Nav Launch and RTH are a useful combination.

My GPS modes

Altitude Hold - Maintains current altitude. Can work using GPS or barometer.

Position Hold - Circles around the position at a set radius, 50m by default. Needs to be combined with Alt Hold to maintain altitude as well as position.

Return to Home - Returns to the arm point then circles at a set height, 50m radius and 10m altitude by default. Must change this if 10m is too low in your area. I usually use 50m altitude.

Adjustments Page
Ignore this one

GPS Page
Check GPS function here. If the Total Messages number is counting up then your GPS is correctly connected. If not, make sure the GPS is getting power and try switching the GPS Tx and Rx connections. Satellite numbers will start showing up after a few minutes as long as you are outside or near a window.

OSD Page
This is where you can configure The OSD to your liking. Add, remove and position items on the screen where you want them.














CLI - Command Line Interface

Your entire setup can be seen by typing DUMP in the command entry space. 

Or type DIFF to see just what has been changed. 

You can save and share all this as a text file. Click Save to file.

All that text can be re-pasted into the "Write your command here" section for quick and easy setup of a new board.

There are many more commands and setup items available via the CLI than appear in the Configurator pages.


The Fixed Wing Wiki recommends a few extra settings that are not included in the previous pages. They need to be entered via the CLI.


Here are the extra setup commands I always add

 set max_angle_inclination_rll = 600

 set max_angle_inclination_pit = 600

(Increases the maximum pitch and roll angles to 60º for stabilised modes)


 set small_angle = 180

(Allows the board to be armed at any angle)


 set failsafe_throttle_low_delay = 0

(Prevents failsafe due to low throttle)


 set inav_reset_home = FIRST_ARM

(Keeps the first arm position as home if the board disarms)


 set nav_fw_allow_manual_thr_increase = ON

(Allows manual throttle above the cruise throttle setting) 

iNav groups and videos for more information



Saturday, 25 April 2020

Typical power to weight ratios for RC planes

Typical power to weight ratios for RC models.

11-15 watts/100g Minimum level of power for decent performance
15-20 watts/100g Trainer and slow flying scale models
20-24 watts/100g sport aerobatic and fast flying scale models
24-29 watts/100g Advanced aerobatic and high-speed models
29-33 watts/100g Lightly loaded 3D models and ducted fans
33-44 watts/100g Unlimited performance 3D models 

Thursday, 16 January 2020

Full House Glider OpenTX

Here is a full house setup for my Phoenix 2000, Taranis QX7, OpenTX 2.2.4 2019-07-12

Full span and normal ailerons
Crow braking with Elevator compensation
Full span camber adjustment

Connections
Ch1 Aileron Left
Ch2 Aileron Right
Ch3 Throttle
Ch4 Elelvator
Ch5 Rudder
Ch6 Flap Left
Ch7 Flap Right

Note that I have modded my Taranis QX7 to use the S1 knob as a left side slider, and swapped the momentary switch to the left side.

Mixes
> S1 operates Flaps down to the middle indent, then Crow braking from the middle to full down.
> Elevator compensation is set at zero weight and should be adjusted as required (My P2K pitches up with Crow activated so I needed -15% weight)
> SC up gives normal ailerons, then "not up" activates full span ailerons (and increased adverse yaw)
> SB adds full span camber in two steps
> SF up is the throttle cut

OTX model file here - https://drive.google.com/open?id=1QASpvvFY4mXdxKkhcV9NFY3wM9fXfIWo


Sunday, 22 September 2019

Best Cheap FPV gear

Here are my tips for the best cheap FPV gear.  Perfect for entry level or budget constrained pilots, but this gear will still be useful as your FPV requirements progress.

All In One camera and Video transmitter (AIO)

These camera / VTx combos are the simplest way to convert a plane to FPV. They are light and inexpensive and easy to swap from plane to plane.

The down sides are:
- The camera will not be the best quality, with lower dynamic range and large fisheye distortion.
- The range may not be as great as a more expensive Video Transmitter.
AOI VTx power output ranges from 25m to 200mW, giving range of maybe 100m up to many hundreds of meters.
- Voltage input is usually 3.5 to 5V. This means you cant run them straight from your flight battery. Best option for cleanest FPV video is to use a separate 1S battery for the FPV, or you can run it from the receiver or BEC.

Eachine TX02 200mW is my current recommendation - Eachine TX02 Banggood

FPV Goggles / screen

Recommending goggles is more difficult.

- Proper two screen goggles like Fatsharks, Skyzones and Aomway Commanders are very expensive, so I'll discount them for this discussion.
- Single screen box goggles are much cheaper but will not suit everyone. I need +1.0 close-up glasses for reading and I find that I cannot focus on the screen with most box goggles. I have modded some by glueing close-up lenses into the box enclosure.
- FPV screens by themselves can be a good solution but they are often more expensive than the box goggles.

Eachine EV800 goggles combine a detachable screen with goggles mount, so I think these are the best cheap option. The screen part can be mounted on a tripod or directly on your transmitter, and it includes the video receiver, battery and antenna. They also come with good quality antennas.



Eachine EV800 is the cheapest option with single clover leaf antenna - Eachine EV800 Banggood 











Eachine EV800D has clover leaf and patch antennas for greater range, and a DVR for recording the FPV feed - Eachine EV800D Banggood












Eachine EV800 screen on transmitter


Eachine EV800 review