DCS-Skunkworks / dcs-bios

Data export tool for DCS.
https://dcsbios.com/
GNU General Public License v3.0
281 stars 62 forks source link

Add support for F-16 EHSI indicator #905

Open karpiyon opened 1 month ago

karpiyon commented 1 month ago

Version

Aircraft

F-16

Control

EHSI

Description

Can you add support for EHSI. I refer to the course/heading/distance/Mode values. Currently I read the course using:

EHSI fields are in parse_indication(13)

function parse_indication(indicator_id)  -- Thanks to [FSF]Ian code
    local t = {}
    local li = list_indication(indicator_id)
    local m = li:gmatch("-----------------------------------------\n([^\n]+)\n([^\n]*)\n")
    while true do
        local name, value = m()
        if not name then break end
            t[name]=value
    end
    return t
end

To get the course/range/mode i use:

            local EhsiCourse    = EHSI_fields["Course Indicator Value"]
            local EhsiRange    = EHSI_fields["Range Indicator Value"]
            local EhsiModeLeft  = EHSI_fields["Mode Left"]
            local EhsiModeRight = EHSI_fields["Mode Right"]

I don't know how to get the heading.

Screenshots

image

Additional context

No response

karpiyon commented 1 month ago

image

charliefoxtwo commented 1 month ago

Getting the heading bug and course offset lines may be difficult or just not possible. I'm not aware of anywhere else we do that, and I can't find any way to get to that data - we'd basically need to get the position of a texture, and I'm not sure if that's exposed in a way we can access. If anybody is aware of a function call we can use to get that info I'm all ears.

The text on the display is very much doable.