Thread Tools
Apr 06, 2018, 09:49 PM
Jesper Frickmann
jfrickmann's Avatar
Thread OP
Discussion

F5J program for Taranis QX7 and X9D with Lua scripts


SoarOTX is a package of sailplane programs for OpenTX transmitters. So far, FrSky Taranis QX7, X9D, and X9D+ transmitters are supported. The F5J program is discussed here. An F3K program is also available.

Overview
This program for electric gliders comes with powerful configuration features, making setup of a new model quick and easy. It also provides timing and score keeping, as well as graphing of telemetry data.
  • Air brake responses for flaps and ailerons can be set arbitrarily with 5-point curves, so e.g. flaps or crow can be configured.
  • Mixes for power-to-elevator, aileron differential, aileron-to-rudder, flap-to-elevator, and snap-flap.
  • Camber preset for the current flight mode is set by the throttle trim. With the motor on, camber preset is reduced with increasing power.
  • Full aileron response is available for any air brake position, as ailerons on both sides are “bumped” up or down, if necessary.
  • Controls can easily be re-assigned to meet personal preferences. By default, the throttle stick is used for both motor and air brakes, but either can be re-assigned to e.g. a slider.
  • Switches are each set up on a single logical switch line each, and can therefore easily be changed.
  • Everything, including channel assignment, servo directions, centering, end points, mixes, and 5-point curves for air brakes and servo outputs for flaps and ailerons, can be configured easily in five sub-menus, where the trim buttons are used to adjust the various parameters.
  • Timing and electronic score card for F5J contests. For launch height, you can use telemetry values (for practice and informal contests) or you can enter the value from an official unit like CamF5J or Altis. Scores are saved to the SD card, and can be recalled later.
  • Graphing of telemetry log data. You can view receiver battery volts, RSSI signal strength and, if you have an altimeter, altitude and vertical speed.
If you want to try it out, please see the Installation instructions.

Model setup
The program comes with both rudder, elevator, and left and right v-tail channels; there are not separate versions for cross- and v-tail. This is because the channel outputs can be moved around very easily with the Channel Configurator sub-menu, as described below. Just move the unused channels out of the way.

All global variables should be changed by the menus below; there is no need to change global variables directly. If you want to re-assign switches, then do so under logical switches. Please refer to “Logical switches” below, to see where to change the respective switches.

Now that the receiver is bound, telemetry has been set up, and the motor is disconnected, it is time to dive into the configuration menus. Two long presses on the PAGE button will get you to telemetry screen #4. This screen is a menu with five different sub-menus.


The first sub menu is the Channel Configurator. The small black triangles show the current servo positions. Use or Rotary to select a channel. Press ENTER to edit. Use or Rotary to select what to edit for the channel. Press ENTER again to edit (selection is blinking). The following items can be edited.
  1. Channel number. This moves the channel up or down on the list.
  2. Servo direction.
  3. The entire servo interval. This keeps the center point in the middle between min. and max. and moves all three points up or down. If necessary, the interval is scaled to avoid exceeding 125%.
  4. Servo end points. Adjusts the range while keeping the end points symmetrical around the center.
  5. Minimum point.
  6. Center point.
  7. Maximum point.

Press EXIT when you are done.


The second menu is for aligning the 5-point output curves for flap and aileron servos between the left and right sides. Use the throttle stick to move between the five points, and use rudder and aileron trims, respectively, to align flaps and ailerons at each point.


The third menu is for adjusting the air brake curves. Use the throttle stick to move between the five points, and use throttle and elevator trims, respectively, to set flaps and aileron positions at each point. First, you want to push the throttle stick all the way forward, and set the point where no air brake is applied. Both flaps and ailerons should be in the maximum reflex position here. This is usually where flaps and ailerons are flush with the trailing edge of the wing. Then, move the stick back and set the desired flap and aileron positions at each of the four other points.


The fourth menu is for setting aileron travels for ailerons and flaps, and camber travel for the ailerons. Aileron camber is the amount that the ailerons move when camber is applied by flight mode presets, snap-flaps, and camber on the slider, if it is enabled. Typically, you want to have about the same amount of camber movement for the ailerons as for the flaps.


The fifth and last menu is for adjusting various mixes.


If you want additional camber on a slider, then set it up under Input 7: Cmb, by changing the input source from MAX to the desired slider.

Flying
The motor has to be armed before starting it. Arm the motor by moving switch C up from the center position. When the motor is armed, the transmitter will warn you with a siren sound and shake. The motor is then started by pulling and releasing switch F. This also starts the timers.

When the motor is running, a power-to-elevator mix is active. More power gives more down elevator. This mix can be adjusted with the elevator trim while the motor is running.

Be careful with the power-to-elevator mix! Too much could make the model dive into the ground under full power after launching.

You can adjust camber preset with throttle trim as for other flight modes, but the camber is reduced to zero as power is increased to maximum.

The power response is defined by Curve 9: Mot. I have set it to jump from 75% up to 100% just before the throttle stick is all the way forward. I have done this to avoid “almost full” power, as this can burn out the ESC on hard pressed systems. You can, of course, edit Curve 9 to your own liking.

The motor is stopped by pulling switch F again, or it stops automatically after 30 sec. If the motor needs to be restarted, then switch C must be moved back to the center position, and then up again to arm, and then switch F must be pulled and released.

When gliding, the three flight modes Float, Cruise, and Speed can be selected with switch B. Camber and elevator can be trimmed for each flight mode individually.

The KAPOW mode for landing moves ailerons and flaps 100% up, and the elevator goes to a fixed position that can be adjusted with the elevator trim. in “classic” KAPOW, the elevator is set to full down, to “dork” the plane into the ground. I do not want to “dork” my electric gliders, so I use a neutral elevator position to get a “belly flop” instead. KAPOW is enabled by moving switch C to the down position. The radio announces “Landing mode”. KAPOW is then activated by giving more than half air brake and full down elevator.

After motor run and KAPOW, the air brake is disabled, and the radio yells “Flaps up” if the throttle stick is not all the way forward. Re-enable the air brake, and make the radio shut up, by moving the throttle stick all the way forward again.

Altimeter
If you have an altimeter sensor connected to your receiver, then the program can report your start height and the current altitude. The altimeter is reset every time you arm the motor. The start height is reported 10 sec. after motor stop, when switch A is either up or down. The variometer sound is turned on, when switch A is down. The current altitude is reported when switch H is pulled down and switch A is either up or down.

When flying contests, you are not allowed to have altitude feedback, hence, switch A should be centered during contests.

Timing and score keeping
The first telemetry screen is used for timing and score keeping. Before arming the motor, use or Rotary to set the target time between 1 and 99 minutes.

After landing, set landing points with or Rotary, and press ENTER. Then set the start height and press ENTER. You can press MENU to go back and edit the previous value. Press ENTER to save, or EXIT to start a new flight without saving.

If you have an altimeter, then the altimeter start height will be pre-filled for you, otherwise, it defaults to 100 m. That way, you can practice and fly informal contests with a FrSky altimeter instead of an “official” F5J unit. If you restarted the motor, then everything will be zeroed, and you cannot edit anything.

The second telemetry screen is a score browser, where you can recall the saved scores.


Graphing of log data
The third telemetry screen is a graph of log data. Use or Rotary to change the flight, press ENTER to change the parameter being plotted, and press MENU to view summary statistics.

Data for the current model on the same day is shown. If you want to look at yesterday's file, then you must either set back the date on your radio, or rename the file in the transmitter’s SD CARD menu.

Notice that individual flights are identified by time gaps and by the flight mode sensor “FM” being equal to 1 for Launch mode. If there is a problem with identifying the flights correctly, then check that the FM sensor is working correctly, and that its data is being recorded.




Last edited by jfrickmann; Apr 18, 2018 at 08:28 PM.
Sign up now
to remove ads between posts
Apr 06, 2018, 10:30 PM
Team Hello Kitty
SoaringDude's Avatar
Wow, what an awesome OpenTX package, very nice work. Really like your Lua script implementation. Thanks much for sharing.

Chris
Apr 07, 2018, 06:43 AM
Registered User
Wow, really cool how you used LUA. Nice job. I won't use it but I'll try it
May 28, 2018, 01:29 PM
Jesper Frickmann
jfrickmann's Avatar
Thread OP
I just added a F3J program to the package. I re-named some Lua scripts to "FXJ" as they are now shared.

I also made a small modification to L47, so the flight timer is stopped by KAPOW mode,
Jun 06, 2018, 02:33 PM
Registered User
vinster100's Avatar
Could this be adapted to a 2 wing servo (Ailerons, no flaps) vtail ship?
Jun 06, 2018, 03:01 PM
Jesper Frickmann
jfrickmann's Avatar
Thread OP
Yes, absolutely. I think that you can do it right out of the box, just don't use the flap channels.

Jesper
Jun 07, 2018, 03:36 AM
Registered User
Sensoar's Avatar
Jesper, does the program have a feature that requires throttle to zero before arming
Jun 07, 2018, 07:39 AM
Jesper Frickmann
jfrickmann's Avatar
Thread OP
Quote:
Originally Posted by Sensoar
Jesper, does the program have a feature that requires throttle to zero before arming
No. To arm, move switch C to neutral, and then up. To start the motor, pull and release F (I have moved the momentary over to F for DLG use). When the motor is on, air brake is disabled, and the throttle stick controls power. You can easily move power or air brake to a slider if you don't like the dual functionality of the throttle stick.

Jesper
Jun 09, 2018, 01:23 AM
Registered User
Sensoar's Avatar
Thanks Jesper, the dual stick is clever with the auto change over at 30 seconds when the motor times out. A couple of questions as I get familiar with the program.

I moved the throttle over to the LS so flaps and throttle are separate and I would like to use this for sport flying where I will use the motor after 30 sec. Is there an easy way to eliminate the 30 sec motor time out, and count up voice.

I noticed that L23 can be changed to a longer interval for the motor timer 2 which would work, however the count up voice continues as well. I did not see a way to mute the voice for the timer count. So basically looking for a method to have the motor be active for the full flight.
Jun 09, 2018, 06:54 AM
Jesper Frickmann
jfrickmann's Avatar
Thread OP
Quote:
Originally Posted by Sensoar
Thanks Jesper, the dual stick is clever with the auto change over at 30 seconds when the motor times out. A couple of questions as I get familiar with the program.

I moved the throttle over to the LS so flaps and throttle are separate and I would like to use this for sport flying where I will use the motor after 30 sec. Is there an easy way to eliminate the 30 sec motor time out, and count up voice.

I noticed that L23 can be changed to a longer interval for the motor timer 2 which would work, however the count up voice continues as well. I did not see a way to mute the voice for the timer count. So basically looking for a method to have the motor be active for the full flight.
To "practically" eliminate the motor time out, go to L23, and change the time limit from 00:29 to 59:59.

To eliminate the motor time count, you have to comment out line 54 of the Lua script JF5Jsk.lua in TELEMETRY. This is done by adding "--" in front of the line:

Code:
		
		if math.floor(prevMt / cnt) < math.floor(mt / cnt) then
--			playNumber(sayt, 0)
		end
Jesper
Jun 10, 2018, 02:08 PM
Registered User
Sensoar's Avatar
Thanks for the detail on how to comment out the count up timer voice. It was a good excuse to finally "look under the hood" and see how lua scripts are put together.

The timer now is muted for continuous motor availability after the 30 sec competition limit. Next question, it seems that the flight modes are not active while the motor is available. Any thought on a way to trigger the flight modes while under a power mode.
Jun 10, 2018, 02:28 PM
Jesper Frickmann
jfrickmann's Avatar
Thread OP
When the motor is running, the "Motor" flight mode is active, so you cannot have other flight modes. As for camber preset, it goes from max. camber set with the throttle trim when the motor is running at minimum power to zero camber at full power. So you can test a thermal with the motor idling and camber on, and then give it full speed with zero camber, if you want to move on. More about that here: https://github.com/jfrickmann/SoarOT...Program#flying

Jesper
Jun 10, 2018, 05:13 PM
Registered User
Sensoar's Avatar
Yes, great features. I guess that there is not a way to have speed, cruise and thermal modes when the motor is active but not running. I tend to make risky decisions that occasionally require a relight when flying so having a motor ready to go saves some excitement.

I am excellent with the "one more turn and I will find the lift" but then waiting too long and getting too low before heading back seems to be a common trait with thermal pilots
Jun 10, 2018, 05:22 PM
Jesper Frickmann
jfrickmann's Avatar
Thread OP
You can arm the motor before you get there, and then quickly start it by pulling and releasing F, if you need it. If you don't need it, you can disarm by moving C back to neutral.

But arming is meant as a safety feature, and if you fly around with it armed all the time, then it may actually be worse than no arming. E.g. if you use the flight timer, and pull F after landing to stop the timer, but end up starting the motor instead. Then your club field will get rototilled for free

Jesper
Jul 14, 2018, 01:55 PM
Jesper Frickmann
jfrickmann's Avatar
Thread OP
I have uploaded a new version of the JFchannels.lua script to GitHub, where I have set the servo limits to +/- 150% in Channel configuration. I have also reworked the code a bit to fix a few minor bugs where values could jump around in extreme cases.
Jesper


Quick Reply
Message:

Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion F3K program for Taranis QX7 and X9D with scripts for score keeping and graphing jfrickmann Hand Launch 1202 Nov 15, 2019 11:41 AM
Download An Ardupilot frsky telemetry LUA script for the Horus X10/ X12 and Taranis X9D/E/QX7 yaapu Radios 485 Nov 02, 2019 03:55 PM
Download LuaPilot Telemetry Taranis Lua Script ilihack Radios 56 Sep 06, 2018 08:39 AM
Discussion how to get nigelsheffields lua scripts for Taranis to work. nigelsheffield Radios 197 Apr 11, 2017 08:56 AM
Question Taranis: changing menu structure with LUA Script? Tr4n5p0rt3r Radios 4 May 16, 2016 02:22 PM