R/C Settings
Overview Search Downloads Submit file Up
Download details
DLG Flight Graph for OpenTX 2.0.x Version:2015-06-15
(2 votes)

This telemetry script plots each flight for review before the next launch.

  • The graph auto-scales both the time and altitude in real time as needed to fit all data.
  • The X and Y axis scales are reset for each flight.
  • There is no reasonable limit to time or altitude that will be displayed (although Y-axis scale numbers are not positioned for 4 digits (1000+ ft.)
  • At the end of the flight, the graph and flight data are "frozen" for review, until reset by putting the Tx in "launch" flight mode (Switch F away from you)
  • Launch # is taken from a global variable (GV2)
  • Start of flight (launch) is automatically triggered by altitude exceeding a threshold (e.g. 8 feet)
  • End of flight is triggered the same way (going below the same threshold)
  • Launch height is captured at the first decrease in altitude after launch.
  • If the flight altitude later exceeds the launch height, a separate maximum height is displayed.
  • There is a live altitude display, to verify that the ground altitude is ~0 before launch.
  • Plane Voltage and Timer 2 values are displayed at the bottom of the data area.
  • There is a "demo" mode available (Switch E towards you) which generates 0-400 ft altitude values with the Throttle stick for testing the program.
  • Almost every code line is commented, because I'm not really a programmer and I need comments to keep track of things :)

Please note that this script has some requirements of the OpenTx model program that it will run with, so you may need to make some changes (either to your model program or this script) to make it work.  As written, here's what the script expects:

  • The model program increments launch# and stores it in Global Variable GV2.
  • Switch F pushed away from you is launch mode.
  • Switch E pulled towards you is not already in use (the script uses this for demo mode.)
  • A1 is the voltage to display.
  • Timer 2 is the timer to display.
I am a novice in both Lua and DLG, so I'm sure this code can be improved from both aspects.  Any suggestions are welcome.
 
And one final thing:  
  • Currently the data cannot be retrieved once the graph is reset.  I have an idea to store previous graph data in order to review multiple flights after landing.  I'd be interested to know if that would be useful.



Data

Size 10.2 KB
Downloads 1918
Created 2015-06-16
Created by filago
Changed at 2016-05-28
Modified by filago

View Model Details

Download

Comments   

 
#5 Arthur 2016-10-11 14:58
I have made some improvements on this script, but I did not get any response from my earlier statement above.
-I have made the display clearer (The graph was flickering a lot)
-removed de demo mode as companion lets you simulate the telemetry
-removed the need for GV2 as launch nr as resetting this after every flight was cumbersome (still need to test this though).
-Launch switch changed to SF up (towards user). I have physical exchanged SF and SH so Left side is momentary switch. I throw DLG with the right hand).

I am no programmer at all, but still think I improved a bit... :-)

I am not sure how to share this with you all. Any ideas?
Regards,
Arthur
 
 
#4 Arthur 2016-08-30 13:12
Quoting Jonathan Yeo:
anyone got this working with 2.1.6 ? If yes, please send me the updated scripts

I've got something working but the graphics are not so good. I edited the GV2 to GV3 variable, (tried to) change Imperial to Metric and edited some parameters. I am willing to share as I am by no means a programmer... maybe we can keep this alive without making a payed solution out of this.

Let me know is your interested.

kr,
Arthur
 
 
+1 #3 Jonathan Yeo 2015-11-14 09:17
anyone got this working with 2.1.6 ? If yes, please send me the updated scripts
 
 
+1 #2 guido ter horst 2015-07-19 20:51
P.S. I see no set GV2 in your code, only get, so where does it get updated??
 
 
#1 guido ter horst 2015-07-19 20:50
How can I contact you? I have updated the script to support meters as well, and added a background function so it can be loaded and unloaded by my telemetry script manager on the transmitter (no need for pc).

Also, I read the number of flights from another place. I use trim settings of free output channels to store number statically. I need all my GV's!!

you can contact me on rcgroups as LSHEMS, and I'll forward you the code, so you can decide to upload it or not.

Guido
 

You have no rights to post comments