Holton181 Posted January 11, 2019 Posted January 11, 2019 First I would like to say I'm not a programmer but have enough basic knowledge to read code and create simple scripts, but without knowledge about what is going on under the hood. So please bare with me. I have an export script to export NMEA 0183 sentences (GGA and GMC) to any devise/app that can connect via UDP or Serial Port and utilize these sentences. It now finally work pretty well if one can live with the position error that exist between real, spherical world and DCS flat counterpart. I don't consider this cheating, since we already have the NS430 and position is grabbed by LoGetSelfData, so should not trigger any server anti-cheating flags. There is only one minor but irritating issue I would like to know if possible to handle from the script. I hope some of you LUA wizards can help me. The problem is with Bluetooth Virtual Serial Ports (I can't test for physical serial ports). It works perfectly fine, as long as I have something listening to the port. But as soon as I stop the listener DCS freeze. Starting the listener and DCS unfreeze as if nothing had happen. I suspect it is something with the Bluetooth part of the connection, and since DCS basically only sees a COM port it might not be possible to avoid. Or is it? This is the tree blocks involved in the serial communication: Start=function(self) ... --Bluetooth ---[[ sPort = "COM3" com = io.open(sPort,"w+b") --]] ... endActivityNextEvent=function(self,t) ... --Bluetooth ---[[ com:write(string.format("$%s*%x\r\n$%s*%x\r\n", GGA,csGGA,RMC,csRMC)) -- fills the serial buffer com:flush() -- send the serial buffer --]] ... endStop=function(self) ... --Bluetooth ---[[ com:close(sPort) --]] ... end And I have this in the end if involved some how: -- ============= -- Overload -- ============= do local PrevLuaExportStart=LuaExportStart LuaExportStart=function() BS_NMEA:Start() if PrevLuaExportStart then PrevLuaExportStart() end end end do local PrevLuaExportActivityNextEvent=LuaExportActivityNextEvent LuaExportActivityNextEvent=function(t) local tNext = t tNext = BS_NMEA:ActivityNextEvent(t) if PrevLuaExportActivityNextEvent then PrevLuaExportActivityNextEvent() end return tNext end end do local PrevLuaExportStop=LuaExportStop LuaExportStop=function() BS_NMEA:Stop() if PrevLuaExportStop then PrevLuaExportStop() end end endCOM3 is the Bluetooth VP configured as "incoming" in Windows 7 Pro. The listener I'm using is my Android phone with an app specially for overriding the devise GPS with NMEA sentences from an external Bluetooth GPS. So, what do you say? Helicopters and Viggen DCS 1.5.7 and OpenBeta Win7 Pro 64bit i7-3820 3.60GHz P9X79 Pro 32GB GTX 670 2GB VG278H + a Dell PFT Lynx TrackIR 5
Holton181 Posted January 19, 2019 Author Posted January 19, 2019 No-one? Helicopters and Viggen DCS 1.5.7 and OpenBeta Win7 Pro 64bit i7-3820 3.60GHz P9X79 Pro 32GB GTX 670 2GB VG278H + a Dell PFT Lynx TrackIR 5
Holton181 Posted January 29, 2019 Author Posted January 29, 2019 Here is the script, freezing issue unresolved: https://www.digitalcombatsimulator.com/en/files/3303310/ Helicopters and Viggen DCS 1.5.7 and OpenBeta Win7 Pro 64bit i7-3820 3.60GHz P9X79 Pro 32GB GTX 670 2GB VG278H + a Dell PFT Lynx TrackIR 5
BaD CrC Posted January 29, 2019 Posted January 29, 2019 So you managed to export GPS position to an external software like Foreflight? https://www.blacksharkden.com http://discord.gg/blacksharkden
Holton181 Posted January 29, 2019 Author Posted January 29, 2019 So you managed to export GPS position to an external software like Foreflight?I haven't tried with Foreflight, or any application on the same PC for that matter. But I guess it could be done. Will try it out. I have used my Android phone as receiver and any maping app on that, both with UDP and Bluetooth virtual serial port. Helicopters and Viggen DCS 1.5.7 and OpenBeta Win7 Pro 64bit i7-3820 3.60GHz P9X79 Pro 32GB GTX 670 2GB VG278H + a Dell PFT Lynx TrackIR 5
Holton181 Posted January 29, 2019 Author Posted January 29, 2019 Ah, now I saw what Foreflight is. Yes it would work, I have a similar app called Fly-is-Fun and it works. Helicopters and Viggen DCS 1.5.7 and OpenBeta Win7 Pro 64bit i7-3820 3.60GHz P9X79 Pro 32GB GTX 670 2GB VG278H + a Dell PFT Lynx TrackIR 5
Recommended Posts