I've been using the built-in variometer function included with both my FrSky X9D+ transmitter and my new Jumper T16 transmitter for more that four years. Both transmitters use OpenTX as an operating system. An RC friend just purchased a FlySky altimeter sensor to retrofit a couple of fixed wing gliders. He was impressed with the tonal information (beeps) that I was getting from my transmitter and wanted to replicate the experience with his planes. All of his fleet use FlySky receivers, so he bought a couple of FlySky ibus altitude sensors. It turns out that the FlySky sensors only produce an output of altitude without any indication of vertical speed (Vspd) that is automatically provided by a FrSky altimeter sensor.
The lack of a vertical speed indication, a variometer, doesn't allow the user to estimate whether the model is increasing in altitude or decreasing in altitude without glancing down at the transmitter screen. This is not desired since the rate of change in altitude must be calculated in one's head and it requires the modeler to look away from the model to the transmitter screen, which could cause him/her to lose control.
So I volunteered to write a LUA script to imitate what I was getting from the built-in variometer function in my radios using FrSky receivers and sensors. I figured that there are other FlySky users that might benefit from having a variometer function.
The 3rd-pass script is working well. It generates a short higher frequency beep when the model is increasing its altitude and a longer, lower frequency, beep when the model is decreasing in altitude. The first attempt was useable for me, using a FrSky altitude sensor, but did not work very well for my friend with his FlySky sensor. My FrSky altitude sensor did not generate a lot of random noise, whereas his sensor generated a bunch of random readings that tended to cause the script to beep constantly, for no reason.
We discovered that the FlySky sensor was effectively uncalibrated. My friend had two sensors. Sensor 1 generated 30 feet of altitude difference when the model was elevated only 3-4 feet. Sensor 2 only generated 2.5 feet of altitude change when the model was raised 7 feet. We overcame this calamity by adjusting the ratio entry in the telemetry parameter screen of the transmitter ( 0.3 for sensor 1 and 2.7 for sensor 2). That is a lot of variability!!! I can't really recommend that anybody purchase a FlySky altitude sensor after this experience.
But the sensor readings are producing approximately the correct output now, after some calibration.
Using the Script:
The script must be located in the /SCRIPTS/MIXES directory on the transmitter's SD card.
You should have the lua option checked (and the transmitter's firmware updated to at least OpenTX 2.2) to use this script. When you power the transmitter it will compile the script into a binary executable called vrio.luac, which runs faster and consumes less memory.
Then go to the model menus use the page button until you get to the CUSTOM SCRIPTS page. It should now look like this:
Select the vrio script and press the enter button to see this screen:
Here you can make parameter changes to the way the script operates.
- The Switch parameter specifies which switch to use to turn on/off the variometer beep sounds. The switch is hard-coded to turn on the beep sounds when in the "back" position.
- ClimbMax sets the max limit for climb in feet/sec. Above this limit the beep sounds no longer increase in frequency. The range is limited to between 10 feet/s and 50 feet/s.
- SinkMax sets the max limit for sink in feet/s. Below this limit the beep sounds no longer decrease in frequency. The range is limited to between -10 feet/s and -50 feet/s.
- ClimbMin and SinkMin set the range of the dead zone where no sound is generated because the model is presumed to be not gaining or losing much altitude. ClimbMin range is between 0 feet/s and 10 feet/s. SinkMin...