Jump to content
The simFlight Network Forums

Getting data for a motion platform


Recommended Posts

I bought FSUIPC last year so I could have more control over joysticks, rudder pedals and other peripherals.

I have, however, started to look at the feasibility of building a motion platform for FSX. To calculate the required movements, I need to be able to pull a variety of pieces of data from FSX and I am completely at sea.

I have looked at the documentation on LUAs that comes with FSUIPC and I can see part of the way, however, where is the LUA library? I was wanting to use Liberty Basic as my programming tool, as the Basic environment is one that I am comfortable with and because Liberty Basic has commands for calling APIs and DLLs and I (perhaps naively) thought it would be able to call LUAs as well.

I think what I am looking at is using the n=ipc.readDBL(offset), n=ipc.readFLT(offset) & n=ipc.readDD(offset) LUAs with the relevant offset values but I don't know how to do this. Can anyone help?

Link to comment
Share on other sites

I have looked at the documentation on LUAs that comes with FSUIPC and I can see part of the way, however, where is the LUA library?

As the documentation says, there are several Laries built into FSUIPC -- the default libraries are all there, plus the FS specific ones added by FSUIPC. Others you'd need to link to using the require command.

I was wanting to use Liberty Basic as my programming tool, as the Basic environment is one that I am comfortable with and because Liberty Basic has commands for calling APIs and DLLs and I (perhaps naively) thought it would be able to call LUAs as well

No no. You are misunderstanding. Lua is a scripting language used, in this case, for plug-ins to FS. If you want to write free-standing programs using your own development environment, then you interface to FSUIPC via the methods detailed in the FSUIPC SDK.

Regards

Pete

Link to comment
Share on other sites

Thanks for that.

I had misunderstood. I've now looked at the example scripts and there looks to be some useful stuff there and I've found the Lua 5.2 Reference Manual. I'll study those and see how I get on.

I don't, however, fully understand your final statement re the FSUIPC SDK. Do you mean the FSX SDK?

Link to comment
Share on other sites

I had misunderstood. I've now looked at the example scripts and there looks to be some useful stuff there and I've found the Lua 5.2 Reference Manual. I'll study those and see how I get on.

If you want your program to run as a plug-in, running in-process with FSX, Lua is okay, and you can write other language DLLs whch can be called from Lua if you wish. You have to be careful though. It is very easy to crash FSX this way.

I don't, however, fully understand your final statement re the FSUIPC SDK. Do you mean the FSX SDK?

No, I certainly meant the FSUIPC SDK -- why would you doubt this? It is the FSUIPC SDK which provides all the information and tools for interfacing into FSUIPC as well as the complete documentation of the offsets and so on. It is what has been used for the last 14 years by all those applications which use FSUIPC and WideFS.

The Lua plug-in facilities are just a recent addition to FSUIPC's armoury of tools to allow rather more complex user configuring, or even programming, than can be achieved by editing the INI file assignments and using Macros, alone. It was never really intended for full blown applications, though a few interesting ones have grown around it, lke LINDA.

Regards

Pete

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.