F3K program for Taranis QX7 and X9D with scripts for score keeping and graphing - RC Groups
Thread Tools
Jan 09, 2016, 12:33 PM
Jesper Frickmann
jfrickmann's Avatar
Discussion

F3K program for Taranis QX7 and X9D with scripts for score keeping and graphing


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

Overview
This program provides the following features:
  • Timing and score keeping for all of the official FAI F3K tasks.
  • Scores can be saved to the SD card and viewed later. That way, you can fly a self-timed contest and record scores on paper afterwards.
  • Graphing of telemetry log data. You can view e.g. receiver battery volts, RSSI signal strength and, if you have an altimeter, altitude and vertical speed.
  • Controls and mixes: flaps, camber control, ailerons, aileron differential, aileron-to-rudder, snap flaps, flap-to-elevator, and flight modes.
  • Zoom flight mode is entered after the Launch mode, to facilitate a straight climb-out.
  • Flaps are disabled at launch, and remain disabled until the throttle stick is pushed forward, for quick turnaround.
  • Optimal usage of the flaperon servo range by having full flaps be 100% servo down, and aileron up without flaps and camber be 100% servo up.
  • Full aileron control at any flap position by reducing flaps, if needed to allow for the desired aileron response.
  • Camber preset for each flight mode is adjusted with the throttle trim button.
  • Mixes for snap flap, flap-to-elevator, aileron differential, and aileron-to-rudder can easily be adjusted with trim buttons.
  • Flaperon travel can be adjusted on five-point curves, and the curves can be easily adjusted with the aileron trim button at each of the five points, to get perfect alignment of the flaperons.
  • Channels can easily be moved around, and servo directions, centering, and end points set with the channel configurator.
If you want to try it out, please see the Installation instructions.

Model setup
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, and telemetry has been set up, 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 four 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 flaperon servos between the left and right sides. Use the throttle stick to move between the five points, and aileron trim to align the flaperons at each point.


The third menu is for setting air brake and aileron travels. Use throttle trim to adjust the flaperons to the position of maximum reflex. For most models, maximum reflex is where the flaperons are flush with the trailing edge of the wing. Flaps can travel from this position to 100% down. Ailerons use up the remaining servo movement.


The fourth and last menu is for adjusting various mixes.


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

Flying
Hold the launch switch F when you throw the plane, to activate the Launch flight mode, Flaps are hereby disabled, and the radio yells “Flaps up” if the throttle stick is not pushed forward. Re-enable flaps, and make the radio shut up, by moving the throttle stick all the way forward again. This feature helps you come in for a quick relaunch without having to worry about flaps being down during the launch.
After the launch switch is released, the Zoom flight mode takes over. The plane should be trimmed for a nice straight climb-out in this mode. When you move the right stick to push over for level flight, then Zoom mode is ended, and the selected gliding flight mode is activated.
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.

Altimeter
If you have an altimeter sensor connected to your receiver, then the program can report your launch height and the current altitude. The altimeter is reset every time you pull the launch switch. The launch altitude is reported 3 sec. after leaving Zoom mode, 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. Therefore, switch A should be centered during contests.

Timing and score keeping
The Cheat Sheet can be printed out to help remembering how to navigate the menus.

Timing and score keeping is available for all of the 11 official F3K tasks, a “Quick Relaunch” task, and a “Just Fly” task. Long press PAGE to enter the telemetry screens. Timing and score keeping is on the first telemetry screen.
Select the task with or rotary. Press ENTER to start the window timer. When the window is running, then the flight timer is controlled by the launch switch. There are two different modes for the flight timer:
  • In normal mode, you pull and release the launch switch to start the flight timer, and pull and release again to stop the timer.
  • In QR (Quick Relaunch) mode, the flight timer is stopped and started immediately again every time you pull and release the launch switch. You toggle QR by pressing + or Rotary right while the window timer is running.
There is a 5 sec. "grace period" after the flight timer is started. So if you pull and release the launch switch by mistake, then just pull and release again immediately to cancel. If you land off the field, and need to score a zero, then do a long press on the MENU button instead of pulling the launch switch, to stop the timer.
When the EoW (End of Window) option is selected, then the flight timer freezes as the task window ends. That way, you do not overfly the task window, and you can decide whether to keep the score by pulling the launch switch, or score a zero by long pressing the MENU button, after you have landed. EoW is toggled by pressing - or Rotary left when the window timer is running.
In the Poker task, use the two rotary knobs S1 and S2 to set minutes and seconds, respectively. When your first attempt has been started, then you must make your called time before moving on!


The Quick Relaunch task is meant to practice fast turnaround. The QR option is selected by default, and you set the target time with S1 and S2 as for Poker.
The window timer is stopped automatically when a task is complete, but you can also stop and restart the window timer by pressing ENTER when the flight timer is not running. To reset the scores, change task when the window timer is stopped. If you have made scores, then you will be prompted to save to the SD card before changing task.
To view the scores that have been saved to the SD card, go to the second telemetry screen by pressing PAGE. Use or Rotary to browse the saved scores. If you see the text “Log getting too large” flashing, then it is time to delete all, or some, of your log file located in /LOGS/JF F3K Scores.csv, before you run out of memory.


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.
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 please check that the FM sensor is working correctly, and that its data is being recorded.




Last edited by jfrickmann; Apr 18, 2018 at 08:29 PM. Reason: The next generation is here!
Sign up now
to remove ads between posts
Jan 09, 2016, 02:33 PM
Have Fun and Just Fly!
l shems's Avatar
Well done! I will probably borrow your score saving code. Can we make it a joint separate lua file? Nice to stay interoperable.

Power of choice to the open source users!
Jan 09, 2016, 06:15 PM
Closed Account
Jesper - cheese cake too !
Last edited by zephirus; Jan 09, 2016 at 06:27 PM.
Jan 10, 2016, 07:55 AM
Jesper Frickmann
jfrickmann's Avatar
Quote:
Originally Posted by l shems
Well done! I will probably borrow your score saving code. Can we make it a joint separate lua file? Nice to stay interoperable.

Power of choice to the open source users!
You are of course very welcome to use the code in your project. I think that it should be easy to adapt , but I do not know what is missing in 2.0.x vs. 2.1.7. Do you have any plans to migrate your project to 2.1.x?
The reason why the program requires 2.1.7, is that the score saving and browsing code uses the string library, and the timer start/stop uses model.getFlightMode. The latter is of course easy to change, but it will be quite complicated to save and browse scores without the string library.
Last edited by jfrickmann; Jan 10, 2016 at 11:12 AM.
Jan 10, 2016, 05:35 PM
Have Fun and Just Fly!
l shems's Avatar
Quote:
Originally Posted by jfrickmann
You are of course very welcome to use the code in your project. I think that it should be easy to adapt , but I do not know what is missing in 2.0.x vs. 2.1.7. Do you have any plans to migrate your project to 2.1.x?
The reason why the program requires 2.1.7, is that the score saving and browsing code uses the string library, and the timer start/stop uses model.getFlightMode. The latter is of course easy to change, but it will be quite complicated to save and browse scores without the string library.
You can't even write a score in the first place in the previus versions.

I've ported my code to 2.1, remaining backwards compatible to 2.0.

I intend to use your code as an example. I think the setup shpuld be different: One file per day, just as telemtry.

Then simply look for the available score files and present the results.

Then you don't run into file length problems.

Greetings.
Jan 10, 2016, 07:54 PM
Jesper Frickmann
jfrickmann's Avatar
I considered that. But then you will not be able to look up a score from yesterday. And I do not think that there is a Lua method to browse for files on the SD card.
Jan 11, 2016, 12:19 AM
Have Fun and Just Fly!
l shems's Avatar
Keep a logfile for all created files, or check in a loop.

I do the same for creating menus, with the limitation of risking an error when trying to load a nonexisting file in opentx 2.0. In 2.1 its easy, since you can check if a file exists.
Jan 11, 2016, 06:25 AM
Jesper Frickmann
jfrickmann's Avatar
I shems, I prefer to kep things reasonably simple. Therefore, I will just keep the score file the way it is for now.
I just uploaded a new version of the file with some minor change to the infor displayed at the top of the screens (Rx voltage and time).
Jan 11, 2016, 06:39 AM
Registered User
Jesper,

Thank you very much, this come at the right time for me.
Very good work.

I like to check if you have similar scripts like DLG graph, better still one that can read the telemetry log to display on taranis screen either live or from the logs.

http://rcsettings.com/index.php/view...g-flight-graph

Thanks in advance

Jonathan
Jan 12, 2016, 07:52 PM
Jesper Frickmann
jfrickmann's Avatar
I just realized that Companion blows up if the log file is not already present on the SD card. I have uploaded a fix for that.

Jonathan, I do not have any scripts for logging altitude - but I agree that filago's script looks pretty nice.
Jan 13, 2016, 05:32 AM
Kyle Clayton
Wave Glider's Avatar
Nicely done Jesper! I haven't touched my radio in a month now, maybe good incentive for me to update it and try this program.
Jan 13, 2016, 09:49 AM
Jesper Frickmann
jfrickmann's Avatar
Hi Kyle

Give it a spin and let me know what you think

Before upgrading to 2.1, please read the first post here: http://www.openrcforums.com/forum/vi...hp?f=45&t=7239
Jan 23, 2016, 10:16 PM
Registered User
Jesper,

Can you help me understand why in lauch and zoom mode, i have limited ability to use the elevator subtrim to trim it down. I have to have a high subtrim max up to trim it down. So this restricted me in ability to fine adjust launch and zoom mode properly.

what am I doing wrong ?

Thanks in advance,

Jonathan
Jan 24, 2016, 08:26 AM
Jesper Frickmann
jfrickmann's Avatar
Hi Jonathan,

I assume that you are talking about the setup for your Fireblade, since it is selected in your file.
By subtrim, I assume that you are referring to the subtrim being set on the OUTPUTS page? These do not apply to any particular flight mode, so I do not understand how they can be used to set Launch and Zoom?
I do not understand what you mean when you say "a high subtrim max up to trim it down" - please explain further
I notice that you have limited the elevator throw to go from -50 to +100 in OUTPUTS. This obviously limits the max. deflection.
I use the regular trims to set offsets for the various flight modes. So to give it some up elevator during Launch , I hold the launch switch while giving it some up trim. I notice that your trim is neutral for Launch.
I also see that you have full up elevator trim during Zoom. This is odd, as I normally give it neutral to a little down during Zoom to make the plane track straight after I release the launch switch.

I hope that some of this was helpful. Please keep asking until we get it sorted out

Jesper
Jan 24, 2016, 04:21 PM
Registered User
Ops I was not being very clear.

Yup the Fireblade setup....
when I go to Launch and Zoom mode, the elevator have a lot of up on my DLG. I had to use the elevator trim to push it down and running out of trim level for further adjustment. See pictures... The interesting thing is it is not affecting my cx2 setup...i tired to compare but could not figure out the difference.


Quick Reply
Message:

Thread Tools