Page 1 of 1

How to capture Frsky max altitude during a flight?

Posted: Sat Jul 08, 2017 3:50 am
by spagoziak
Hi folks!

I'm getting into discus launched gliders and I've acquired a Frsky variometer for use in reporting my height and vertical airspeed. The telemetry works great--I have the current values displayed perfectly.

My puzzle is trying to figure out how to get er9x to record the highest altitude value observed until cleared. I've read the manual and it seems that the 'Latch' logical switch mode is the right choice. I noticed that the custom telemetry display will show global variables... and I can assign a global variable to accept the values of a pair of logical switches. Seems like I"m nearly there, but the GV field in the custom display screen remains 0. I suspect I don't quite understand how latch switches look.

Here's the logical switch pair that i hacked together...

The thought is that the latch logical switch will be triggered any time altitude is greater than 600 feet. I live at 900 feet, so it should always be on.
Logical switch 2 is a latch that sets its point when L1 is triggered, and clears when the throttle momentary switch is flicked (which right when I launch it). None of this happens, of course. How close am I?

Code: Select all

LSw   Funct     V1      V2
L1    v>val     Alt     600(feet)
L2    Latch     L1      THR

Re: How to capture Frsky max altitude during a flight?

Posted: Mon Jul 10, 2017 9:53 pm
by MikeB
A bit of a fiddle, but here is one method you may use. It uses a "high" channel to "store" the max altitude. Channels actually take on values between -1024 and +1024 (unless you enable extended limits).
So, first use a Scaler (SC1)to convert the Altitude value to be in the range -1024 to +1024. Note the altitude may well be stored in metres with a resolution of 0.1m, so 400 feet is likely to be 1219 representing 121.9m.
Now set up a logical switch:
L1: v1>v2 SC1 CH16
Now set up some mixes on channel 16:
CH16: +100% CH16
R +100% SC1 switch(L1)
R -100% HALF switch(RUD)
Finally you need another Scaler to convert channel 16 back to altitude (metres or feet).

The first mixer line makes channel 16 hold its value.
The second line (a replace multiplex), changes channel 16 to the value from Scaler SC1 if SC1 is larger (controlled by switch L1).
The third line (also a replace multiplex), uses a physical switch (RUD in this case) to "reset" channel 16 back to minimum for the next flight.

Mike.

Re: How to capture Frsky max altitude during a flight?

Posted: Wed Jul 12, 2017 7:22 pm
by spagoziak
Wow, thanks!

I'll start fussing with this tonight. Much appreciated, this is pretty tricky stuff.

spag

Re: How to capture Frsky max altitude during a flight?

Posted: Sat Jul 15, 2017 10:18 pm
by spagoziak
Mike,

I gave this a go, but could not get the alt to stick--it only reports alongside the Alt value in the custom display field (in the telemetry window).

Piping the values through the scalar worked just fine--it seems like L1 isn't being triggered. The value for CH16 on its own at +100% would be 1500, right? Maybe if I lower CH16's threshold value so L1 can trigger....

Re: How to capture Frsky max altitude during a flight?

Posted: Sat Jul 15, 2017 10:36 pm
by MikeB
I tested the logic by using the Thr stick as the source for the first scaler:
SC1 Source Thr
and set the second scaler to show CH16:
SC2 Source CH16
I displayed SC1 and SC2 on a custom telemetry screen.
As I advance the throttle, both folow it, but if I then reduce the throttle, while SC1 follows the Thr back down, SC2 remains at the max value.
With the Thr stick right down, toggling the RUD switch on and off, resets SC2 (so CH16) back to -1024.

Make sure you have both the second and third mixes set as REPLACE mixes.

Mike.

Re: How to capture Frsky max altitude during a flight?

Posted: Tue Jun 15, 2021 8:58 am
by 123jhe
Hi. I tried the method to record and display the max altitude and it works - exept the scaling.

I get meters in the Alt sensor value. But the channel value is 0.2% when the max altitude should be 2 meters. So I probably need the scalers MikeB mentioned. But I don't know how to implement a scaler.

Could anyone explain how to scale the sensor value before putting it in/out the channel?
Thank you!

Re: How to capture Frsky max altitude during a flight?

Posted: Tue Jun 15, 2021 10:22 am
by MikeB
I'm not sure why I didn't mention this before. Go to the telemetry screens, move left or right until you get to screen with the 6, cell voltages at the bottom. In the middle of the screen there is a line starting "Alt=", and on the right is a "Max" value. This is the maximum altitude seen since the altitude value was set to zero. If you set the zero altitude, this should also set back to zero.

Is that good enough for you or do you still need to use scalers?

Mike

Re: How to capture Frsky max altitude during a flight?

Posted: Wed Jun 16, 2021 8:31 am
by 123jhe
Hi Mike

Thank you. This really helped. I've been trying for max alt since some weeks now. Problem solved :D

But I got another issue with this: The widget 'value' seems to have a bug. When I set color to black, the display shows the value in dark gray instead of black.

This is the Telemetry screen: https://www.dropbox.com/s/17mgj6mr6kxlz ... 1.bmp?dl=0
Image

This is the setting of the Alt value: https://www.dropbox.com/s/w799uak5n9mxl ... 8.bmp?dl=0
Image

Re: How to capture Frsky max altitude during a flight?

Posted: Wed Jun 16, 2021 9:17 am
by MikeB
This is an er9x thread, yet you seem to be looking at openTx on a colour screen radio.

Mike