Taranis: Glider Simulator is ready! - RC Groups
Thread Tools
This thread is privately moderated by Miami Mike, who may elect to delete unwanted replies.
Feb 15, 2017, 03:39 PM
Registered Taranis User
Miami Mike's Avatar
Alert

Taranis: Glider Simulator is ready!


Presenting Miami Mike's F3J/TD Glider Simulator for the FrSky Taranis X9D



Instructions for downloading, installing, and running glidsim.lua
  1. Click here or the link below to download glidsim.txt.
  2. Rename the file to "glidsim.lua".
  3. Store it in your OpenTX Companion SDCARD folder and on your radio's SD card, under /SCRIPTS/TELEMETRY.
  4. Open an eepe file containing an F3J/TD glider setup, and open the glider for editing.
  5. Select the Telemetry tab, scroll to the bottom, and select an unused Telemetry screen tab.
  6. For Custom Screen Type select Script, then glidsim.
  7. Select Simulate at the bottom of the page.
  8. Select the Taranis Simulator tab.
  9. On the Taranis simulator, long-press the PAGE button to get to the Glider Simulator page.
  10. To set flap offset, move the radio controls to their flap-neutral positions and press PLUS (+).
  11. To switch between cross-tail and v-tail, Press MINUS (-).
  12. To exit the simulator, long-press EXIT.
  13. After setting up all of your gliders for glidsim.lua, be sure to save the modified eepe file.
  14. When running the simulator on your radio, move the controls to their flap-neutral positions before switching on, clearing a switch warning, or selecting a model. Flap neutral will be set automatically when a model has finished loading.

Please post questions, comments, suggestions, bug reports, and general discussion of the glider simulator in the comment section below.


Latest blog entry: Taranis: LiPo Fuel Gauge!
Sign up now
to remove ads between posts
Feb 15, 2017, 04:33 PM
Scale Aircraft = Scale Crators
mikejr83's Avatar
Very cool Mike!

During our summer break from contests I'm going to revisit my setup and this will be great!
Latest blog entry: Finished My Sbach 342!
Feb 15, 2017, 07:55 PM
Registered User
mikeshellim's Avatar
Very nice work Mike! I have it up and running in Companion 2.1 with E-Soar Plus loaded... It'll be very useful for visualising the effects as new features are added.

I've personalised it by enabling your code for CH7 (motor) and also have also added Timer1 in place of CH8.

lcd.drawText(1, 41, "T1", Normal)
lcd.drawTimer(24,41, model.getTimer(0).value, Normal)


Running it as a telemetry script in Companion is cool, no need to open the script each time (though probably a good idea to disable the script while flying). Also being able to view the motor output (Ch7) is very useful.

Thank you for sharing this with the community!
Feb 15, 2017, 11:36 PM
Registered Taranis User
Miami Mike's Avatar
Quote:
Originally Posted by mikeshellim
Running it as a telemetry script in Companion is cool, no need to open the script each time (though probably a good idea to disable the script while flying).
I don't think there's any reason to worry about the script while you're flying, especially if it's not visible on the screen. In that case only function bg_func() is periodically called, presumably to record telemetry data in the background, and in glidsim.lua that function is empty because there's nothing for it to do.

And there's no reason to have the screen visible while you're flying anyway, because it can't provide you with any useful information.

Finally, it's safe to have telemetry scripts running while you're flying because they have the lowest priority. They're automatically stopped and disabled if they misbehave (too long runtime, error in code, low memory).

So there doesn't seem to be any point in disabling the script for any reason. Just leave it active and switch to it with the PAGE button whenever you want to look at it.
Latest blog entry: Taranis: LiPo Fuel Gauge!
Mar 04, 2017, 02:56 PM
Registered User
boomerwing's Avatar

A question about Flaps offset


This is a fun application, Mike and a neat way to play with glider setups and Lua too. I have it working on OTX 2.1.9 Companion with a generic glider setup, ail, flaps, elevator, rudder, and some crow, but I don't understand the offset seen in the flaps of Ch3 and Ch4. I have the flaps controlled by the Left Slider. Where does the offset come from? When I think that the flaps should be viewed at 0 deflection they are up a few points.
boomerwing
Mar 04, 2017, 04:47 PM
Registered Taranis User
Miami Mike's Avatar
On Companion simulator, move the left slider and the flap stick to their top positions and then click the PLUS(+) button to reinitialize the flap offset to 0%.

Then, if that's the flap offset you plan to keep, you can edit the script to initialize at that value by changing this:

Code:
local function init_func()
	Flap_Offset = Get_Data("ch3")
end
to this:

Code:
local function init_func()
	Flap_Offset = 0
end
But that's generally not a good value for a flap offset because flaps usually go down a lot farther than they go up. You'd be wasting almost half of the flap servo travel if you set up a plane that way. A value somewhere above +50% would be more reasonable.

You should try Mike Shellim's setup.
Last edited by Miami Mike; Mar 04, 2017 at 04:52 PM.
Mar 04, 2017, 05:13 PM
Registered User
boomerwing's Avatar
Thank you, Mike for the prompt response. I will play with your suggestions.
boomerwing