Brainstormer Posted August 9, 2010 Posted August 9, 2010 Hi, maybe you remember me..im the guy who build the Motion Cockpit with the Su 27 Panel.. Now i have an big Problem with the Export Files for my Simulator Software. Since the release of FC 2.0 it doesnt work anymore, because they have changend alot of Stuff in the LUA's...But i think you all know about these problems...... The Plugin for my Sim works almost with the LOVP Script for FC 2.0 but it doesnt fits perfectly.... Can someone convert the attached Script that i can use it for FC2.0?? I cant speak LUA but i think for you its an easy thing to do, hope someone can help me.... Thnx alot Danielsimulator.rar
aaron886 Posted August 9, 2010 Posted August 9, 2010 (edited) I took a quick look at it, and I would look here for the error: local t = LoGetModelTime() local altBar = LoGetAltitudeAboveSeaLevel() local altRad = LoGetAltitudeAboveGroundLevel() local pitch, bank, yaw = LoGetADIPitchBankYaw() local vel = LoGetVerticalVelocity() local angle = LoGetAngleOfAttack() local accel = LoGetAccelerationUnits()Check [LO directory]/Temp/Error.log after running your script for specific line-number errors. A lot of the default classes have changed, and correct implementation can be found in the Export.lua script. Off the top of my head, LoGetAccelerationUnits is changed for one, it now returns an array with 3 elements, including G in the X, Y and Z planes. For example, if you initiated a variable like so: G_value={} and then loaded data into it with LoGetAcclerationUnits() like so: G_value = LoGetAccelerationUnits() You could access the vertical G like so: G_value.y Edited August 10, 2010 by aaron886
Moa Posted August 9, 2010 Posted August 9, 2010 Brainstomer, Yoda's LEAVU2 and ERI code shows how to get exported information from Flaming Cliffs 2 - including doing it remotely via a TCP socket.
Brainstormer Posted August 10, 2010 Author Posted August 10, 2010 (edited) Thanks for the hint with LEAVU...but i think this is a bit too much for a simple exportation of Pitch and Yaw. I also think this is made for Java and not for VB Programs(im really noob in programming so please excuse if im wrong) @aaron I'll try...hope it will work:) At the moment i use this http://3dvrm.com/bsvp/LOFC2/Export.lua Script as the Example... And i think the problem is in here: socket.try(c:send(string.format("flight_params %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i\n", t, IAS*100, TAS*100, AOA*ToDegree*100, Gp.y*100, VV*100, altBar*100, altRad*100, pitch*100, bank*100, (-yaw)*100, Mach*100, HSI.ADF*100, HSI.RMI*100, HSI.Compass*100, route.goto_point.world_point.x*100, route.goto_point.world_point.y*100, route.goto_point.world_point.z*100, myXCoord*100, obj.LatLongAlt.Alt*100, myZCoord*100, navi.Requirements.roll*100, navi.Requirements.pitch*100, navi.Requirements.altitude*100, engine.RPM.left*100, engine.RPM.right*100, engine.Temperature.left*100, engine.Temperature.right*100, engine.fuel_internal*100, engine.fuel_external*100))) beacuse in the first row of the Plugin it shows me "Flight_params" instead of the game time...so the plugin is always paused..... But if i change it, it shows me nothing, only "connected".... Edited August 10, 2010 by Brainstormer
Recommended Posts