Stickley92 Posted October 4, 2020 Share Posted October 4, 2020 (edited) userprofile = os.getenv ("userprofile"):gsub("","/") -- dofile(userprofile .. "/Saved Games/DCS.openbeta/Scripts/DCS_NMEA.lua") ^^^^^^ also this is the location C:\Users\username\Saved Games\DCS.openbeta\Scripts Edited October 4, 2020 by Stickley92 Link to comment Share on other sites More sharing options...
Stickley92 Posted October 4, 2020 Share Posted October 4, 2020 I take it the base version of foreflights works and i dont need to buy like the pro version for it. Link to comment Share on other sites More sharing options...
Holton181 Posted October 4, 2020 Author Share Posted October 4, 2020 userprofile = os.getenv ("userprofile"):gsub("","/") -- dofile(userprofile .. "/Saved Games/DCS.openbeta/Scripts/DCS_NMEA.lua") ^^^^^^ also this is the location C:\Users\username\Saved Games\DCS.openbeta\Scripts Can you attach the actual file? Parts of this particular code gets altered when copy/paste to this forum. You can send it by PM if you don't want to reveal anything publicly. 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 Link to comment Share on other sites More sharing options...
Holton181 Posted October 4, 2020 Author Share Posted October 4, 2020 [ATTACH]249246[/ATTACH] [ATTACH]249247[/ATTACH]Ah, you forgot to remove the -- in the beginning of line two in Export.lua. Actually visible in the copy/paste above, but it's morning... 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 Link to comment Share on other sites More sharing options...
Denver29 Posted October 4, 2020 Share Posted October 4, 2020 Hi everybody I desesperatly can not make this work on my ipad with foreflight I copy the script as you said, i open the UDP port 49002 and 4353. I go to my forflight "device" option and nothing!! It's empty !!! What am I mistaking?? Link to comment Share on other sites More sharing options...
Denver29 Posted October 4, 2020 Share Posted October 4, 2020 my DCS export script looks that: userprofile = os.getenv ("userprofile"):gsub("\","/") -- dofile(userprofile .. "/Saved Games/DCS.openbeta/Scripts/DCS_NMEA.lua") -- load the DCS ExportScript for DAC and Ikarus dofile(lfs.writedir()..[[scripts\DCS-ExportScript\ExportScript.lua]]) pcall(function() local dcsSr=require('lfs');dofile(dcsSr.writedir()..[[Mods\Services\DCS-SRS\Scripts\DCS-SimpleRadioStandalone.lua]]); end,nil); dofile(lfs.writedir()..[[scripts\Helios\HeliosExport16.lua]]) Link to comment Share on other sites More sharing options...
Stickley92 Posted October 4, 2020 Share Posted October 4, 2020 Holton thank you for your help that worked amazing so simple haha. I loaded up and enabled and worked a followed my flight, the only thig that was wrong is that it did not load up the flight plan. Denver29, make sure the 2 -- at the start of --dofile in the Export.lua are removed thats what was wrong with mine. Link to comment Share on other sites More sharing options...
Holton181 Posted October 4, 2020 Author Share Posted October 4, 2020 Holton thank you for your help that worked amazing so simple haha. I loaded up and enabled and worked a followed my flight, the only thig that was wrong is that it did not load up the flight plan. Denver29, make sure the 2 -- at the start of --dofile in the Export.lua are removed thats what was wrong with mine. Happy you got it sorted! my DCS export script looks that: Yes, as Stickley92 mentioned, remove -- in the beginning of the second line. I saw in the code you Denver29 posted there is another, better way to grab the Saved Games directory, a way that is not only "anonymous" but is also totally independent of DCS version. I might implement that method later on to avoid the hassle with selecting and uncoment correct line (remove the --). 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 Link to comment Share on other sites More sharing options...
Stickley92 Posted October 4, 2020 Share Posted October 4, 2020 Is there anything i need to do so it loads the flight plan? This is for mainly when i fly the Huey? Link to comment Share on other sites More sharing options...
Holton181 Posted October 4, 2020 Author Share Posted October 4, 2020 Is there anything i need to do so it loads the flight plan? This is for mainly when i fly the Huey? If you mean the DCS flight plan, that is out of the scope of DCS-to-GPS. But it is possible even if not automated. The excellent tool CombatFlight has the ability to load a miz file, extract flight plans and export them as .kmz files that can be loaded into ForeFlight (I think?). It is possible to filter what information to load into CombatFlight to basically only load information for your own aircraft to avoid spoilers. It can be found here: https://forums.eagle.ru/showthread.php?t=195724 I can't provide any support for it here, you have to get that from that thread. 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 Link to comment Share on other sites More sharing options...
Stickley92 Posted October 5, 2020 Share Posted October 5, 2020 Thanks for all your help. Link to comment Share on other sites More sharing options...
Robbo763 Posted October 5, 2020 Share Posted October 5, 2020 (edited) The app I use on Android, Naviator' https://www.naviator.app/, doesn't appear to have a way to accept the output from DCS-to-GPS, at least not that I can work out. I read earlier in this thread about GPSBridge but that does not appear to be available any longer. Is anyone aware of an android app that will accept the output from DCS-to-GPS and pass it to Naviator as a 'mock' GPS location? I use Naviator with XP11 via the 'X-Plane to GPS' app which 'spoofs' the GPS location. Thanks Edited October 5, 2020 by Robbo763 Link to comment Share on other sites More sharing options...
Holton181 Posted October 6, 2020 Author Share Posted October 6, 2020 The app I use on Android, Naviator' https://www.naviator.app/, doesn't appear to have a way to accept the output from DCS-to-GPS, at least not that I can work out. I read earlier in this thread about GPSBridge but that does not appear to be available any longer. Is anyone aware of an android app that will accept the output from DCS-to-GPS and pass it to Naviator as a 'mock' GPS location? I use Naviator with XP11 via the 'X-Plane to GPS' app which 'spoofs' the GPS location. Thanks Hi Robbo, I mentioned this in my answer to your PM, but figured I also mention it her for anybody who is interested. There are several android apps to connect to external GPS sources via BT to spoof the internal one. I use this one, it's without commercials. Otherwise just search for "Bluetooth GPS" in Google Play. I too fly X-Plane (still 10) and have my phone as GPS. I have never used the "X-Plane to GPS" utility though. Can be done with the app above and a Bluetooth Virtual Serial Port (or WiFi and the GPSBridge you mentioned, I payed for it when it was available, so I can still access it, real pity it is gone). Hope my answer in my PM helped you out. 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 Link to comment Share on other sites More sharing options...
Robbo763 Posted October 6, 2020 Share Posted October 6, 2020 Thanks Holton, you've been a great help!! Link to comment Share on other sites More sharing options...
Robbo763 Posted October 7, 2020 Share Posted October 7, 2020 It works great Holton, all sorted, thank you!!! Link to comment Share on other sites More sharing options...
micro Posted January 5, 2021 Share Posted January 5, 2021 Hello Holton, I am very grateful for you to share DCS-to-GPS v1.4. I can use ForeFlight, WingX Pro and it works normally, but the annual fee for these apps is expensive for me. I play DCS and just hope it can Let ADI (speed, altitude), Export to my iPad. Recently I found a cheap app called A-EFIS Pro in the iOS app store(or Android app Store). It can accept X-Plane simulator use port 49000. I set the port_AHRS to the same and it still doesn’t work. I was discouraged because I almost tried the iOS app store and Android app Store. No one is feasible, I don’t know if there is a way to make A-EFIS Pro accept DCS-to-GPS output data or it’s just my desire. Because I don’t understand programming language, no matter what, thank you again for sharing. A-EFIS Pro Link to comment Share on other sites More sharing options...
Holton181 Posted January 5, 2021 Author Share Posted January 5, 2021 ... I will see if I can get the android version to work. If it works with X-Plane the likelihood it works with DCS is high.At the moment I don't find much time for siming, so don't expect a quick answer, but I'll do it as soon as I can. 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 Link to comment Share on other sites More sharing options...
micro Posted January 5, 2021 Share Posted January 5, 2021 Holton ,The app freecharge version “A-EFIS black & white”, thanks a lot ! Link to comment Share on other sites More sharing options...
Holton181 Posted January 5, 2021 Author Share Posted January 5, 2021 I had a quick look at it. The reason it works with X-Plane and not DCS are the way the developer have chosen to grab the information from X-Plane, namely from the "Data Input & Output" / "Data Set". That delivers data in I think CSV format for general usage. DCS-to-GPS requires the format to be in either NMEA or AHRS format.If the developer had chosen to grab the X-Plane information via one of the AHRS export options instead, it would have worked with DCS-to-GPS as well. I'm guessing he made his choice based on wanting to have access to aircraft systems like the pitot static system (pressures), for whatever reason.Maybe I could implement a way to export DCS information in the way A-EFIS requires, but to be perfectly honest with you I don't believe I have the time to spare, and at the time being I don't fly much myself at all either. But maybe, in a not foreseeable future, I might give it a try just for the challenge. In that case you hear about it here. 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 Link to comment Share on other sites More sharing options...
micro Posted January 5, 2021 Share Posted January 5, 2021 1 hour ago, Holton181 said: I had a quick look at it. The reason it works with X-Plane and not DCS are the way the developer have chosen to grab the information from X-Plane, namely from the "Data Input & Output" / "Data Set". That delivers data in I think CSV format for general usage. DCS-to-GPS requires the format to be in either NMEA or AHRS format. If the developer had chosen to grab the X-Plane information via one of the AHRS export options instead, it would have worked with DCS-to-GPS as well. I'm guessing he made his choice based on wanting to have access to aircraft systems like the pitot static system (pressures), for whatever reason. Maybe I could implement a way to export DCS information in the way A-EFIS requires, but to be perfectly honest with you I don't believe I have the time to spare, and at the time being I don't fly much myself at all either. But maybe, in a not foreseeable future, I might give it a try just for the challenge. In that case you hear about it here. I look forward to overcoming this problem in the future. I want to say thank you for spending your precious time to understand my problem. Link to comment Share on other sites More sharing options...
BigMorgan Posted November 28, 2021 Share Posted November 28, 2021 After moving my saved games folder to a different drive from my OS, I can no longer get the script to function at all. Is there any workaround for this? Link to comment Share on other sites More sharing options...
MAXsenna Posted November 29, 2021 Share Posted November 29, 2021 After moving my saved games folder to a different drive from my OS, I can no longer get the script to function at all. Is there any workaround for this?How did you move it? Sent from my MAR-LX1A using Tapatalk Link to comment Share on other sites More sharing options...
BigMorgan Posted November 30, 2021 Share Posted November 30, 2021 (edited) On 11/29/2021 at 7:33 AM, MAXsenna said: How did you move it? Using the correct method so Windows recognizes the new folder as the Saved Games folder. Everything else works great in DCS, but if I open the log I get an error about being unable to load DCS_NMEA.lua in C:\{...}\Saved Games\DCS\Scripts 2021-11-30 15:05:41.947 ALERT EDCORE: Can't execute Lua file F:\Saved Games\DCS\Scripts\Export.lua - can't open 'C:/Users/Morgan/Saved Games/DCS/Scripts/DCS_NMEA.lua' Edited November 30, 2021 by BigMorgan Link to comment Share on other sites More sharing options...
MAXsenna Posted November 30, 2021 Share Posted November 30, 2021 Using the correct method so Windows recognizes the new folder as the Saved Games folder. Everything else works great in DCS, but if I open the log I get an error about being unable to load DCS_NMEA.lua in C:\{...}\Saved Games\DCS\ScriptsRight. Seems I misunderstood your problem.According to the error in the log, it seems it still points to the wrong place. I guess you've already tried to edit it.Not using this mod so I can't be of assistance. Sorry. Sent from my MAR-LX1A using Tapatalk 1 Link to comment Share on other sites More sharing options...
BigMorgan Posted November 30, 2021 Share Posted November 30, 2021 (edited) Solved. Replacing the export.lua lines with the following got it to work again local NMEAlfs=require('lfs'); dofile(NMEAlfs.writedir()..'Scripts/DCS_NMEA.lua') Edited November 30, 2021 by BigMorgan 1 Link to comment Share on other sites More sharing options...
Recommended Posts