ms5athome Posted April 22, 2011 Report Posted April 22, 2011 Hey guys, Pete: I've read a lot about the FSUIPC tool, wonderful stuff. Now i was wondering. Is there any way for input position coordinates using an external GPS via RS-232? I'm trying to fool around with a friend, using his gps to make my FSX fly the same place while flying on his C-172. In the case that FSUIPC wont receive this kind of data, do you know about any addon that will do this stuff? I know it's a strange topic, but since i'm strange guy, nobody should be surprised! LOL Thanks a lot for your time. Looking forward your answer! Julian from Argentina
Pete Dowson Posted April 22, 2011 Report Posted April 22, 2011 I've read a lot about the FSUIPC tool, wonderful stuff. Now i was wondering. Is there any way for input position coordinates using an external GPS via RS-232? I'm trying to fool around with a friend, using his gps to make my FSX fly the same place while flying on his C-172. You could do it by writing a Lua plug in. The Lua COM library provided in FSUIPC will allow you to read the data on a serial port, then you can convert it to the format required by FS and use the IPC library facilities for setting the position, altitude, pitch, bank, and heading. On FSX you can also set the speed at the same time. The example Luas for connecting a master and slave FS over the Network shows the way to use the IPC library for this. There are some supplied examples of COM use too, but currently not for reading position data. For GPS output you'd need to ascertain what format it is supplying the data, Possibly NMEA 0183, which is easy enough and well documented on the Internet. Note that most GPS's will only supply the data at something like one second intervals, which is good enough for the moving map type application it is really intended for. On FS one update per second will look really jerky, so you'd need to experiment with ways of smoothing it. On FSX you can set the airspeed as wel as the complete attitude of the aircraft, so it might continue well enough between updates, with a little 'jerk' of correction each time it receives a new value. But it would be better to try to extrapolate with extra values computed by the Lua program to give at least 10 updates per second. Better smoothing could be obtained by accepting a 1 or 2 second lag on the PC compared to the GPS, buffering two or three incoming values and computing the smooth 10 per second positions for FS. Regards Pete
ms5athome Posted April 22, 2011 Author Report Posted April 22, 2011 You could do it by writing a Lua plug in. The Lua COM library provided in FSUIPC will allow you to read the data on a serial port, then you can convert it to the format required by FS and use the IPC library facilities for setting the position, altitude, pitch, bank, and heading. On FSX you can also set the speed at the same time. The example Luas for connecting a master and slave FS over the Network shows the way to use the IPC library for this. There are some supplied examples of COM use too, but currently not for reading position data. For GPS output you'd need to ascertain what format it is supplying the data, Possibly NMEA 0183, which is easy enough and well documented on the Internet. Note that most GPS's will only supply the data at something like one second intervals, which is good enough for the moving map type application it is really intended for. On FS one update per second will look really jerky, so you'd need to experiment with ways of smoothing it. On FSX you can set the airspeed as wel as the complete attitude of the aircraft, so it might continue well enough between updates, with a little 'jerk' of correction each time it receives a new value. But it would be better to try to extrapolate with extra values computed by the Lua program to give at least 10 updates per second. Better smoothing could be obtained by accepting a 1 or 2 second lag on the PC compared to the GPS, buffering two or three incoming values and computing the smooth 10 per second positions for FS. Regards Pete OMG! Not a programmer here, so i guess i'll just leave it alone then. Thanks for your quick answer anyway Pete.
gr8guitar Posted August 16, 2011 Report Posted August 16, 2011 Hello Pete, I have the registered version of FSUIPC (3.99) and I did not see a lua COM library, it is only for FSX & FSUIPC 4?
Pete Dowson Posted August 16, 2011 Report Posted August 16, 2011 Hello Pete, I have the registered version of FSUIPC (3.99) and I did not see a lua COM library, it is only for FSX & FSUIPC 4? No. What do you actually mean be you don't "see" it? Like all the other built-in libraries, it is built in, it is is part if the FSUIPC code. You don't "see" it until you use it! The same library is also built into the current WideClient interim releases. BTW there's no "registered" and "unregistered" version -- the same version simply has the user facilities unlocked by Registration. Pete
gr8guitar Posted August 11, 2012 Report Posted August 11, 2012 Going back to the original question. I have found two ways to put real GPS into FS9/FSX. 1) There is a GSP2FS software (free) out there, not sure if it's work with FSX, works fine with FS9 (esp. in slew mode). 2) Using Excel, I read the com port, parse the needed info and send coordinates and altitude to FS, works great but remember, it updates at the rate the GPS outputs.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now