Jump to content
Sign in to follow this  
Florian-K

Which dataref is telling which is the master device?

Recommended Posts

On 6/30/2019 at 5:38 AM, defyent said:

Hello,

I have two questions, the first is, is there a way to determine from dataref's which mode the CDI button in is in? VLOC vs GPS? 

Second, it seems that when I have "Connect CDI mode to NAV/GPS Switch" enabled, the gps/nav switch constantly flicks back and forth between gps and nav, making my cdi but tick back and forth. It's as if RXP is trying to enable one feature and xplane is trying to make it revert back. Any idea how to fix this? Cheers.

I'll want to pick up this question and add another one:

Looking at HSI_source_pilot will only work if I just have one GNS/GTN, but I have two units, a GTN650 as NAV1 and a GNS530 as NAV2. Both are configured to work on the pilot side, as I'm using a Apsen EFD1000 replica as HSI which can at least in reality cope with two NAV/GPS sources.

In that case, looking at HSI_source_pilot isn't sufficient: If I want the units to work correctly, I have to set the CDI sync feature of both units to "GPS -> SIM" because otherwise switching the one will automatically switch the other one as well. But in this case, the Dataref will only show the state of the current master device, not the other one. But in order to correctly render the appropriate bearing pointer for the other unit (e.g. GPS2 or VLOC2), I'd need to recognize if that unit is switched while not being the master as well. 

Which brings me to my second question, I cannot figure out how to detect which GPS is currently the master device. I'd hoped that there is a "gps_unit" so we could compare that against the "gps_unit_1" and "gps_unit_2" datarefs, but there isn't. And comparing the bearings against the hsi_bearing won't work if both units are following the same flight plan. I can force the system to select a defined GPS at startup by hotwiring the appropriate command once my Aspen loads but there's no way to detect whether the two run out of sync, at least not if on the same flight plan.

Best regards

Florian

 

 

Share this post


Link to post
Share on other sites

Hi,

There is an unofficial dataref (meaning non-documented): gps_master_device

This will be 0 if none, or the same code as the "gps_unit" ones!

 


Jean-Luc | reality-xp.com
This message from Reality XP is protected by a disclaimer: reality-xp.com/aboutrealityxp/email.html

Let your voice be heard and help us make a difference for you: Vote !
Open up communications with Reality-XP (Microsoft Flight Simulator Forums)

Share this post


Link to post
Share on other sites

In the meantime I figured out that gps_discrete_out_1 / gps_discrete_out_2 will have bit 15 and bit 2 set in GPS mode and bit 6 set in VLOC mode. The question on how to determine the master remains though... 

Share this post


Link to post
Share on other sites
16 hours ago, RXP said:

Hi,

There is an unofficial dataref (meaning non-documented): gps_master_device

This will be 0 if none, or the same code as the "gps_unit" ones!

 

Great, thanks for the fast reply. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...