Jump to content
Sign in to follow this  
LNRalph

GPS mode ENR, TERM, APR?

Recommended Posts

Is it possible to get these trough a dataref? Through the discrete out maybe? I couldn't find it in the documentation.

Share this post


Link to post
Share on other sites

Hi,

Yes you can!

You're right, it is the purpose of the discrete_out dataref and it is also consistent both between the GTN and the GNS V2.

It is not documented but I'm sending you a PM with details. Do you mind sharing what you'd use this for?

PS: customers of our FltSim version also get WAAS and TAWS annunciation panel gauges which are coded in XML and which document how to use the 'discrete_out' data. They are entirely based on this.

Edited by RXP

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

Hi Jean-Luc,

Could I get the details for this as well, please?

I'm trying to interface between X Plane 11 and an EHSI in AirManager to bring up indications of LOI, phase of flight, type of approach etc, to practice PBN operations.

Share this post


Link to post
Share on other sites

My SASL 3 code used in freeware Bell 429.

local gps_dis = globalPropertyi("RXP/radios/indicators/gps_discrete_out")
local mask    = {8, 16, 128, 256, 512, 4096, 16384, 16777216, sz = 8}
local dref    = {WPT, TERM, INTEG, MSG, APR, TERR_WRN, TERR_CAUT, TRAFFIC}

function update()
    local gdo = get(gps_dis)
    for i = 1, mask.sz do
        set(dref, bit.band(gdo, mask) / mask)
    end
end

 

New datarefs created in MAIN.

APR                    = createGlobalPropertyi("429/gps/APR");
INTEG                = createGlobalPropertyi("429/gps/INTEG");
MSG                    = createGlobalPropertyi("429/gps/MSG");
TERM                = createGlobalPropertyi("429/gps/TERM");
TERR_CAUT            = createGlobalPropertyi("429/gps/TERR_CAUT");
TERR_WRN            = createGlobalPropertyi("429/gps/TERR_WRN");
TRAFFIC                = createGlobalPropertyi("429/gps/TRAFFIC");
WPT                    = createGlobalPropertyi("429/gps/WPT");

  • Like 1

Share this post


Link to post
Share on other sites

If you're doing like so, which is iterating the bits and set a separate dataref for each, you could save the division:

local gps_dis = globalPropertyi("RXP/radios/indicators/gps_discrete_out")
local mask    = {8, 16, 128, 256, 512, 4096, 16384, 16777216, sz = 8}
local dref    = {WPT, TERM, INTEG, MSG, APR, TERR_WRN, TERR_CAUT, TRAFFIC}

function update()
    local gdo = get(gps_dis)
    for i = 1, mask.sz do
        set(dref, bit.band(gdo, mask) and 1 or 0) -- ternary operator
    end
end

PS: if the 'WPT','TERM' etc... are just tested like this: != 0 meaning is set, == 0 meaning is not set, then you don't even have to convert the bit and result to 1 or 0, just do:

set(dref, bit.band(gdo, mask))

Edited by RXP

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

Got it - thanks! Have been playing with GPS approaches and can distinguish between LPV and LNAV approaches (and then bring up a display of the type of approach) by just checking to see whether a glideslope is available on the HSI. However, still working on a way to distinguish between an LPV with an LNAV/VNAV or LP+V etc. 

Share this post


Link to post
Share on other sites
On 3/8/2020 at 3:08 PM, TIJMacLean said:

However, still working on a way to distinguish between an LPV with an LNAV/VNAV or LP+V etc. 

Hi,

Trying to give you a 'best answer' I've found this page which is interesting:
https://www.boldmethod.com/learn-to-fly/navigation/what-is-the-difference-between-lpv-and-lnav-vnav-gps-approaches/

I'm not sure why there would be a need to know whether it is +V or LPV because it seems to be a "GPS only matter". Can you please elaborate?

 


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

Differences between the types of approaches, I’m happy with, but thank you.

 

I’m trying to replicate the bottom part of the GPS where it tells you whether you’re on an LPV or LNAV/VNAV or LNAV + V approach, to put that indication on the HSI. At the moment, as far as I can tell, the discrete out only lets you know if you’re in APR rather than ENR or TERM. Just to make it more obvious which approach you’re on directly in field of view instead of having to check the GTN. 

Share this post


Link to post
Share on other sites

If I understand correctly, the approach type could be a factor for the HSI instrument for determining whether the GPS is using an angular or linear deflection scale. However, the output signal is 'shaped' to fit a regular HSI gauge if I'm not mistaken.

Unfortunately the GTN plugin doesn't expose this data and I can't promise anything for now, but we're updating our implementation regularly and this kind of data could be exposed in the future.


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

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...