Jump to content

Recommended Posts

Posted

Hi All,

I'm trying to export the flap status of the F/A-18C into the Export.log without much success. Apologies for my lack of experience.

Am I to use the following:

LoGetMechInfo() -- mechanization info
result_is =
{
    flaps          = {status,value}  

Can someone show me how, please. Thank you.

Here below is one of my simple export.lua I'm testing with:

 

--------------------------------------------------------------------------------------

function LuaExportStart()

    package.path  = package.path..";"..lfs.currentdir().."/LuaSocket/?.lua"
    package.cpath = package.cpath..";"..lfs.currentdir().."/LuaSocket/?.dll"

    socket = require("socket")
    IPAddress = "127.0.0.1"
    Port = 31090

    MySocket = socket.try(socket.connect(IPAddress, Port))
    MySocket:setoption("tcp-nodelay",true) 
end

function LuaExportBeforeNextFrame()
end

function LuaExportAfterNextFrame()
end

function LuaExportStop()

    if MySocket then 
        socket.try(MySocket:send("exit"))
        MySocket:close()
    end
end

function LuaExportActivityNextEvent(t)


    local tNext = t 
    
    local IAS = LoGetIndicatedAirSpeed()
    socket.try(MySocket:send(string.format("IAS: %.4f \n",IAS)))
    
    tNext = tNext + 1.0
    return tNext

end

-----------------------------------------------------------------------

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...