Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Missing registration on X-Plane vFlyteAir Arrow

Featured Replies

Hi,

I'm using the vFlyteAir PA-28R Arrow III with X-Plane. The registration displayed in LittleNavmap is wrong, it's the default/generic one for the aircraft .acf model and not the one associated with the livery. The registration seems dynamically changed using LUA, so maybe that confuses LittleNavmap. Unfortunately that means I have a duplicate when flying online on IVAO. Is there something that can be done here?

  • Author

Well it looks like (at least for vFlyteAir aircrafts) the registration is dynamically changed (with LUA) when a livery is loaded, with a code like:

    -- TailNumber --
    -- Set the Tail Number based in index of livery initially loaded for ATC
    -- This only works on initial load of aircraft
    if cl_LiveryIndex_last ~= cl_LiveryIndex then
        if cl_LiveryIndex == 0 then
            cl_TailNum  = "N000PA"
        end
        if cl_LiveryIndex == 1 then
            cl_TailNum  = "N1089Q"
        end
        if cl_LiveryIndex == 2 then
            cl_TailNum  = "N47455"
        end
        if cl_LiveryIndex == 3 then
            cl_TailNum  = "N1927H"
        end
        if cl_LiveryIndex == 4 then
            cl_TailNum  = "C-GQYI"
        end
        if cl_LiveryIndex == 5 then
            cl_TailNum  = "G-IRKB"
        end
        if cl_LiveryIndex == 6 then
            cl_TailNum  = "N9350K"
        end
        if cl_LiveryIndex == 7 then
            cl_TailNum  = "N6995C"
        end
        if cl_LiveryIndex == 8 then
            cl_TailNum  = "N44961"
        end
        if cl_LiveryIndex == 9 then
            cl_TailNum  = "N43988"
        end
        if cl_LiveryIndex == 10 then
            cl_TailNum  = "OH-PEA"
        end
        if cl_LiveryIndex == 11 then
            cl_TailNum  = "F-GEOQ"
        end
        if cl_LiveryIndex == 12 then
            cl_TailNum  = "D-EMRY"
        end
        if cl_LiveryIndex == 13 then
            cl_TailNum  = "F-GJCB"
        end
        if cl_LiveryIndex == 14 then
            cl_TailNum  = "G-BNSG"
        end
        if cl_LiveryIndex == 15 then
            cl_TailNum  = "G-OBAK"
        end
    end

So maybe there's some kind of race condition here, with LNM getting the registration from X-Plane *before* the livery is loaded and thus having the “generic” tail number.

I read the reg from the "sim/aircraft/view/acf_tailnum" dataref. Is that the one they are changing in the Lua script?
The dataref is read permanently by Xpconnect. So LNM should catch all changes.

Looking closer at the code it seems that I overwrite this value with "acf/_tailnum" from the .acf file. :sad:

Have to check. Looks like something is wrong there.

Thanks for reporting

Alex

 

  • 1 month later...
  • Author

Hi Alex, any news on this?

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.