Jump to content

Ither

Dataref for Waypoint Time

Recommended Posts

Posted (edited)

I'm working on fixing the EHSI on the Airfoillabs KA350 for the GTN; out of the box the IDENT and TTG don't work. I was able to fix the IDENT by pointing the dataref to the GTN so that it's working; however I'm fighting with time. Does anyone have any ideas how to convert or use this so it's in minutes/seconds? The TTG on EHSI's always show MM:SS however when looking at the dataref below I get for example 2.11637773

RXP/radios/indicators/hsi_dme_time_min_pilot

This is the section of the ACF that I need to fix -- the AFL dataref's don't work with the RXP; they like to overwrite each other.

              GROUP TTG GPS 2 2
                SHOW_EQUAL 3.000000 KA350/instruments/EHSI_Pilot/showActiveCourse
                HIDE
                GROUP_OPEN
                GROUP Number TTG NAV1 2 2
                  SHOW_GREATER 12.000000 [0]
                  HIDE
                  GROUP_OPEN
                  gen_rheostat double dot 2 2 2 2
                    POS 747.000000 704.000000
                    IMAGE EHSI_Pilot/map_mode/double_dot_white
                    DATAREF 
                    LOCKED
                    HIDE
                    LIGHT_MODE GLASS_AUTO
                    LIGHT_RHEOSTAT 22
                    KEY_FRAME 0.000000 0.000000 1.000000
                    KEY_FRAME 1.000000 1.000000
                    CLICK_RADIUS 0.000000
                    CLICK_RADIUS_DY 0.000000
                    STEP1 0.000000
                    STEP2 0.000000
                    OFFSET 0.000000
                    CURSOR DEFAULT
                    CLICK_DX 0
                    CLICK_DY 0
                    WRAP 0

                  gen_LED HH 2 2 2
                    POS 728.000000 704.000000
                    IMAGE EHSI_Pilot/map_mode/led_number_white_2
                    DATAREF KA350/instruments/EHSI_Pilot/dmeTimeHHgps
                    LOCKED
                    HIDE
                    LIGHT_MODE GLASS_AUTO
                    LIGHT_RHEOSTAT 22
                    KEY_FRAME 0.000000 0.000000 1.000000
                    KEY_FRAME 59.000000 59.000000
                    DIGITS 2
                    DECIMALS 0
                    PERIOD_WIDTH 5
                    LED_ROWS 1

                  gen_LED MM 2 2 2
                    POS 766.000000 704.000000
                    IMAGE EHSI_Pilot/map_mode/led_number_white_2
                    DATAREF KA350/instruments/EHSI_Pilot/dmeTimeMMgps
                    LOCKED
                    HIDE
                    LIGHT_MODE GLASS_AUTO
                    LIGHT_RHEOSTAT 22
                    KEY_FRAME 0.000000 0.000000 1.000000
                    KEY_FRAME 59.000000 59.000000
                    DIGITS 2
                    DECIMALS 0
                    PERIOD_WIDTH 5
                    LED_ROWS 1

 

Edited by Ither

Share this post


Link to post
Share on other sites
4 hours ago, Ither said:

DATAREF KA350/instruments/EHSI_Pilot/dmeTimeHHgps
DATAREF KA350/instruments/EHSI_Pilot/dmeTimeMMgps

Hi,

It looks like they are using 2 datarefs of their own.

Given their names,  one would be the hours (HH) and the other the minutes (MM). However they most likely are mislabelled and are MM:SS isn't it?

2.11637773 is in minutes:

  • integer part 2 = 2 minutes.
  • fractional part .11637773 * 60 = ~ 7 secs.

I'm sure you can get what you want with the KEY_FRAME values:

1) use the RXP dataref for both.

2) change the 1st KEY_FRAME (HH) to make minutes into minutes:

                    KEY_FRAME 0.000000 0.000000 1.000000
                    KEY_FRAME 1.000000 1.000000

3) change the 2nd KEY_FRAME (MM) to make fractional minutes into seconds:

                    KEY_FRAME 0.000000 0.000000 1.000000
                    KEY_FRAME 1.000000 60.000000

4) it looks these are configured to display 2 digits only so this should work (I've never tested nor used this but it seems logical to me).

Otherwise, you can make a simple LUA script which read the GTN dataref value and split it in hours + minutes into 2 new datarefs, which you'd use to feed the gen_LED items.

 

Share this post


Link to post
Share on other sites

have you made any progress with this?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...