Jump to content

[MOD] DCS-to-GPS


Holton181

Recommended Posts

I tried to do just that but it didnt work. I am not too sure as to how to set things up in the app itself. The only way I got it to connect was setting up DCS_to_GPS for foreflight and selecting Xplane as an input device in Flt Plan Go. It connects and the app gets the initial spawn position of my aircraft in DCS put it doesnt seem to update afterwards. I tried creating a custom input device with foreflights port in Flt Plan Go but that didnt connect at all.

 

That's strange. X-Plane list Foreflight and SkyDemon together for the same tick-boxes (and some other applications), and the FltPlan Go instructions say to use that same setting in X-Plane so it shouldn't be a difference in the data packages sent.

Can you please attach both your DCS_NMEA.lua you configured and the DCS log file?

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

That's strange. X-Plane list Foreflight and SkyDemon together for the same tick-boxes (and some other applications), and the FltPlan Go instructions say to use that same setting in X-Plane so it shouldn't be a difference in the data packages sent.

Can you please attach both your DCS_NMEA.lua you configured and the DCS log file?

 

I will tomorrow when I get home. Thanks for your help.

[sIGPIC][/sIGPIC]

 

Callsign: BUNZ

 

https://www.5vwing.com/

Link to comment
Share on other sites

I will tomorrow when I get home. Thanks for your help.
Just tested FltPlan Go myself. It worked perfectly with both X-Plane 10 and DCS. Hopefully we will find something in your files.

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

Here we go. Thanks for your help. It works with Xplane 11, but cant get it to work with this :/

 

Like I said, The apps connects, shows correct position of aircraft at spawn point, and then doesnt seem to receive any other updated position (shows me stationary)

Export.lua

DCS_NMEA.lua


Edited by Jeepyb

[sIGPIC][/sIGPIC]

 

Callsign: BUNZ

 

https://www.5vwing.com/

Link to comment
Share on other sites

Here we go. Thanks for your help. It works with Xplane 11, but cant get it to work with this :/

 

Like I said, The apps connects, shows correct position of aircraft at spawn point, and then doesnt seem to receive any other updated position (shows me stationary)

 

 

No, nothing strange with those that I can see. If the port was closed in a firewall/router you wouldn't get the initial position either.

You'r not trying to use it while on a MP server? It should not matter, it should work, but some server settings can block some information required by DCS_to_GPS.

 

Can you try it again, start a flight in SP and make sure you get that initial fix in FltPlan Go, then quit. Then post the dcs.log found in "\Saved Games\DCS.openbeta\Logs" here please (I take for granted you use the folder "DCS.openbeta" due to your export.lua).

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

NEW VERSION!!!

 

 

1.3

* Hopefully simplified setup procedure, everything in the same section in the beginning of DCS_NMEA.lua

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

Tested with foreflight. No issue.

 

Do you think it would be possible to broadcast the packets instead of using a fixed IP?

X-Plane 11.5x / DCS 2.5.6 / P3Dv5 / Aerofly FS 2 / War Thunder

 

Win10-x64 | ASUS Z390 Maximus VI | Intel i7-9700K @3.6GHz | Corsair Vengeance LPX 32 GB DDR4 | 6TB SSD Samsung 850 Pro | 2TB M2 PCI 4x | ASUS GTX 1080 ROG STRIX 8GB DDR5X | TM Hotas Warthog | Saitek Combat Pedals | Oculus Rift S

Link to comment
Share on other sites

Tested with foreflight. No issue.

 

 

 

Do you think it would be possible to broadcast the packets instead of using a fixed IP?

 

I would love to, but I'm not proficient enough in the realms of programming and communication to do that. I have tried to find information on how to do it in LUA, and tested what I have found (traces still in the code), but everywhere I looked also always included fixed IP. If you have any ideas how it should be done in LUA I would really appreciate any help.

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

I can't get this to connect to FltPlanGo on my phone. I honestly don't even know if I'm doing the setup correctly.

 

Do I need to enable both AHRS_UDP *and* NMEA_UDP, or just AHRS?

 

Under "where to connect," am I putting my computer's IP address in the provided spot or my phone/tablet's?

 

Exactly how do I open the ports "port_udp" and "port_ahrs" in my firewall? My understanding, and therefore what I did, is to go into Inbound Rules and open ports 49002 and/or 4353 with UDP protocol.

 

You gotta break these things down Barney-style, man. Not all of us *really* understand how these things work.


Edited by Chuck_Henry
Link to comment
Share on other sites

I can't get this to connect to FltPlanGo on my phone. I honestly don't even know if I'm doing the setup correctly.

 

Do I need to enable both AHRS_UDP *and* NMEA_UDP, or just AHRS?

 

Under "where to connect," am I putting my computer's IP address in the provided spot or my phone/tablet's?

 

Exactly how do I open the ports "port_udp" and "port_ahrs" in my firewall? My understanding, and therefore what I did, is to go into Inbound Rules and open ports 49002 and/or 4353 with UDP protocol.

 

You gotta break these things down Barney-style, man. Not all of us *really* understand how these things work.

 

I don't *really* understand it fully myself ;-)

For FltPlanGo you only need AHRS_UDP.

You put your phones IP in "where to connect?"

Exactly how you open the AHRS port on your equipment, I can't really help you with, but I would assume you should add it as outbound since the traffic is exclusively going from your DCS computer to your phone. I don't need to open the port/s myself the way I have things configured.

Hope it helps.

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

Do I need to enable both AHRS_UDP *and* NMEA_UDP, or just AHRS?

Only AHRS_UDP

 

 

Under "where to connect," am I putting my computer's IP address in the provided spot or my phone/tablet's?

The IP of your Tablet/iphone.

 

 

 

Exactly how do I open the ports "port_udp" and "port_ahrs" in my firewall? My understanding, and therefore what I did, is to go into Inbound Rules and open ports 49002 and/or 4353 with UDP protocol.

You rather don't need to do anything as long as you are in the same network, windows will allow the connection.

My PC has IP 192.168.1.34 (FIXED/Reserved on DHCP) and my iPad has the IP 192.168.1.58 (DHCP)

 

Usually the DHCP server is you router DSL/WIFI. Depends a bit on your network. If windows detects a new activity on the network, there is a good chance that it will ask you to confirm the dialog. Generally inside the own premises it will not block.

 

 

Hope this helps

X-Plane 11.5x / DCS 2.5.6 / P3Dv5 / Aerofly FS 2 / War Thunder

 

Win10-x64 | ASUS Z390 Maximus VI | Intel i7-9700K @3.6GHz | Corsair Vengeance LPX 32 GB DDR4 | 6TB SSD Samsung 850 Pro | 2TB M2 PCI 4x | ASUS GTX 1080 ROG STRIX 8GB DDR5X | TM Hotas Warthog | Saitek Combat Pedals | Oculus Rift S

Link to comment
Share on other sites

  • 3 weeks later...

Hello!

 

I just tried to get it working with my iPad Mini and Foreflight.

 

1. I adjusted the right path in the export.lua

2. I entered the data in the DCS_NMEA.lua as followed:

 

 

 

-- CONFIGURATION

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

 

-- This "CONFIGURATION" is the only section you need to edit!

 

-- What output do You want? 0 = disabled, 1 = enabled, can be several

AHRS_UDP = 1 -- AHRS sentences via UDP (ForFlight, SkyDemon, WingX Pro, FltPlan Go, etc. Enable X-Plane as data provider)

NMEA_UDP = 1 -- NMEA sentences via UDP

NMEA_Serial = 0 -- NMEA sentences via Serial port, you can configure a virtual Bluetooth serial port and connect to a Bluetooth devise

-- INPORTANT!!!

-- If Bluetooth is used, be aware that DCS will freeze as long as the used device isn't listening to the port. As soon as it listen, DCS will un-freeze.

-- I do not know if this freezing behavior exist when a physical serial port is used, since I do not have one to test with.

-- Remember to comment out the "dofile" line related to this MOD in Export.lua or set NMEA_Serial = 0 in this file if you are not going to use it to avoid freezing.

 

 

-- Where to connect?

host_AHRS, port_AHRS = "192.168.0.27", 49002 -- Only needed if AHRS_UDP = 1, replace IP with device IP and leave the port as 49002

host_udp, port_udp = "192.168.0.27", 49002 -- Only needed if NMEA_UDP = 1, replace IP with device IP and select preferred port, use the same port in your GPS device.

sPort_Nr = 3 -- Only needed if NMEA_Serial = 1, replace the number with the serial port You want to use

-- INPORTANT!!!

-- Make sure the ports port_udp and port_AHRS are correctly opened in any firewall and router. You might need to open it as UDP exclusively and not as TCP/UDP.

 

 

-- How often do You want information to be sent, Nr of times per second? from 1 to 10 (ForFlight requirement)

-- Doesn't affect AHRS position updates, need to be ones per second (ForFlight requirement), but does affect AHRS Attitude and all NMEA updates

ActivityNextEventFrequency = 5

 

 

-- STOP!!! Go no further! ;)

 

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

-- END OF CONFIGURATION

 

 

 

3. I opened the 49002 and 4353 port in my router

 

 

After starting a flight "Foreflight" find a device and the moving map shows the right position. But only for 5 seconds. Then the device suddently disappears and the moving map stopped working.

 

 

Maybe some of you guys could help me to find out whats wrong.

 

I really would like to get this awsome tool running :) Thanks for that great work!

 

Regards

 

Thomas

Link to comment
Share on other sites

Hello!

 

 

 

I just tried to get it working with my iPad Mini and Foreflight.

 

 

 

1. I adjusted the right path in the export.lua

 

2. I entered the data in the DCS_NMEA.lua as followed:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3. I opened the 49002 and 4353 port in my router

 

 

 

 

 

After starting a flight "Foreflight" find a device and the moving map shows the right position. But only for 5 seconds. Then the device suddently disappears and the moving map stopped working.

 

 

 

 

 

Maybe some of you guys could help me to find out whats wrong.

 

 

 

I really would like to get this awsome tool running :) Thanks for that great work!

 

 

 

Regards

 

 

 

Thomas

 

Hi Thomas!

 

Just to make sure, do you move around during these 5 seconds and the map is following your position and the attitude indicator following your movement?

Since you use ForeFlight you can disable the 'NMEA_UDP' and set it to 'NMEA_UDP = 0' (and no need to open port 4353 if you're not using it). Is that making any difference?

If not please attach your DCS log file.

 

/H

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

Hi!

Thanks for the answer.

 

It will only show your position once for something around 5 seconds. Then your aircraft symbol and the device will disappear.

 

I also tried to set the NMEA_UDP to 0 and tried other ports, but it didn't work.

 

 

Now i deactivated all other scripts in the export.lua (Tacview, SimpleRadio, VAICOM) and deleted the files from the script-folder. Now it works fine!

 

I'm not able to figure out which of these scripts make some trouble in combination with the DCS_NMEA.lua. I will test around a bit by switching some scripts on and off, maybe i can help you with that.

 

Regards

Thomas

Link to comment
Share on other sites

Hi!

 

Thanks for the answer.

 

 

 

It will only show your position once for something around 5 seconds. Then your aircraft symbol and the device will disappear.

 

 

 

I also tried to set the NMEA_UDP to 0 and tried other ports, but it didn't work.

 

 

 

 

 

Now i deactivated all other scripts in the export.lua (Tacview, SimpleRadio, VAICOM) and deleted the files from the script-folder. Now it works fine!

 

 

 

I'm not able to figure out which of these scripts make some trouble in combination with the DCS_NMEA.lua. I will test around a bit by switching some scripts on and off, maybe i can help you with that.

 

 

 

Regards

 

Thomas

 

Thanks for this!

Interesting, would be nice to see your DCS log file when you find what plugin conflicts with DCS-to-GPS.

I have Tacview myself without any problems (will double check) but not the other two. The port 49002 seems to be a standard port for AHRS communication, maybe one of the other plug-ins also use it? While developing I tried to use the same UDP socket for the AHRS and NMEA communication, but got a similar behavior as you so I reverted back to using separate sockets.

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

  • 2 weeks later...

So, do I need NMEAconnect or some other app for my iPad to actually receive the information being broadcast from DCS over my Wi-Fi network? I just tried setting this up with version 1.3 and ForeFlight, and nothing happens at all.

 

If the answer is yes, would someone be so kind as to post some by-the-numbers instructions on how to set that up?

Link to comment
Share on other sites

So, do I need NMEAconnect or some other app for my iPad to actually receive the information being broadcast from DCS over my Wi-Fi network? I just tried setting this up with version 1.3 and ForeFlight, and nothing happens at all.

 

If the answer is yes, would someone be so kind as to post some by-the-numbers instructions on how to set that up?

 

ForeFlight should work without any additional apps.

Set

AHRS_UDP=1

and

host_AHRS, port_AHRS = "[your iPad IP adress]", 49002

 

In ForeFlight, follow point 4 and 5 in these instructions:

https://support.foreflight.com/hc/en-us/articles/204115525-How-do-I-connect-to-the-X-Plane-flight-simulator-?mobile_site=true

 

If you have done this already but can't get ForeFlight to connect/receive information, can you please attach the dcs.log file?

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

************** Heads up! *************

It seems to be some issues together with SRS.

Working on a solution.

Stay tuned!

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

Do you think it would be possible to broadcast the packets instead of using a fixed IP?

 

 

muehlema, I figured it out!

It is really simple actually. Change the last section in the IP address you enter in DCS_NMEA.lua to 255, something like this "192.168.0.255" (the three other section like yours). Worked for me.

According to information I found it should work with "255.255.255.255", but it doesn't for me, but I tether my phones mobile network as my WIFI and that might cause issues, it might work for you.

 

 

If it doesn't work for you there might be a few other things needed, pleas let me know.

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

  • 2 months later...

I had the issue with DCS to GPS not working because of Simple Radio (SRS). I use ForeFlight. DCS to GPS would connect for about 3 seconds, and then disconnect as others have described. I then moved the DCS to GPS lines in Export.lua to before the SRS lines and DCS to GPS now works great, and so far SRS seems to be fine as well.

 

Here is my Export.lua file in case it helps. I'm running DCS BIOS (the version created by the DCSFlightPanels guys). DCS to GPS, SRS, and Tacview.

 

dofile(lfs.writedir()..[[scripts\DCS-BIOS\BIOS.lua]])

-- Export of NMEA sentences to be used with any application or device capable of using them.
-- Uncomment only one of the two lines below corresponding to your DCS Saved Games path. You might need to edit the path if different than any of them.
userprofile = os.getenv ("userprofile"):gsub("\\","/")
-- dofile(userprofile .. "/Saved Games/DCS/Scripts/DCS_NMEA.lua")
dofile(userprofile .. "/Saved Games/DCS.openbeta/Scripts/DCS_NMEA.lua")

local dcsSr=require('lfs');dofile(dcsSr.writedir()..[[scripts\DCS-SimpleRadioStandalone.lua]])

local Tacviewlfs=require('lfs');dofile(Tacviewlfs.writedir()..'Scripts/TacviewGameExport.lua')

Link to comment
Share on other sites

Has anyone made DCS maps for ForeFlight for DCS? I mean, once the maps are made, everyone should be able to share them. I have the ForeFlight USA Subscription, but what I really want is the DCS map from DCS as an imported overlay for ForeFlight. There is a lot of DCS specific info there that doesn't match current sectionals.

Link to comment
Share on other sites

OK, I get it.

 

This is the age old problem. It is difficult to get a good geo referenced map out of DCS (the F10 map). Flappie has done an excellent job hand creating one for the Caucasus in GeoTIFF format (https://forums.eagle.ru/showthread.php?t=244363) and the easiest way to get an MBTiles version of it is to download the excellent CombatFlite program which uses MBTiles maps (what ForeFlight needs). The MBTiles maps are in the installation directory. But, all the other maps in CombatFlight are just real world sectionals - which don't always match the DCS map perfectly (airports and navigation beacons aren't always the same).

 

BTW, CombatFlite (free download - https://www.combatflite.com/) can be used to plan DCS missions, and export Google Earth .kmz files for waypoints and other geometric information (hand drawn routes, zones, etc.) which can be imported into ForeFlight as well. See ForeFlight's webpage on importing this stuff here: https://foreflight.com/support/user-content/ CombatFlite integrates with the DCS Mission Editor to make all this much more easy.

 

CombatFlite exports .KMZ files. This is just a compressed .KML file. You can unpack a .KMZ file with common ZIP programs like 7zip, WinRAR, etc. If all else fails, rename the .KMZ to .ZIP and Windows can unzip it with a double click. Then you can import the included .KML into ForeFlight directly as explained at the ForeFlight link above. Or maybe ForeFlight works with KMZ files? I haven't tried it.

 

Holton181, thanks for your excellent work on DCS to GPS!!

Link to comment
Share on other sites

... moved the DCS to GPS lines in Export.lua to before the SRS lines and DCS to GPS now works great, and so far SRS seems to be fine as well.

...the easiest way to get an MBTiles version of it is to download the excellent CombatFlite program which uses MBTiles maps (what ForeFlight needs). The MBTiles maps are in the installation directory.

...CombatFlite (free download - https://www.combatflite.com/) can be used to plan DCS missions, and export Google Earth .kmz files for waypoints and other geometric information (hand drawn routes, zones, etc.) which can be imported into ForeFlight as well...

Holton181, thanks for your excellent work on DCS to GPS!!

 

And thank You, Drakoz, for finding a possible solution to the SRS conflict!

I tried to look into it but couldn't find anything on my own, so I contacted the developer of SRS for assistance but he haven't had the time yet, and right now I don't have it myself. I never thought the solution could be that simple! I really hope some one else with the problem can test this and confirm it works for them too (I don't have the time for a few additional months, and I don't use SRS either), then I will put it in the descriptions. Of course I will credit you Drakoz for it.

Also thanks for the mentioning of Combatflight and the possibility to export the KML files. One can also import any MIZ file and export already planed routes from it. Good for SP.

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

  • 4 weeks later...
  • Recently Browsing   0 members

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