mrjohn Posted October 9, 2022 Report Posted October 9, 2022 I am working on a project to build a replica full functioning Link Trainer (WWII era blind flying pilot training). It is a form of simulator with 3 axis of motion. The 'pilot' will operate MSFS in the usual way The trainer movement will be by stepper motors and the general principle is that the physical trainer follows the virtual model which is in MSFS. My concept is that I will read attitude (heading, bank and pitch) data from the registers in FSUIPC and my program will convert the required movement to GCode and pass that to a GRBL device and so to move the trainer. The question I have relates to input to my program (which I will write in Lazarus/Free Pascal) when the sensor devices are HID devices (Arduino Leonardo) on USB. But I expect I will have problems with my USB connection conflicting with FSUIPC and MSFS. Of course there will be no problem if by chance FSUIPC and read data from sensors, data which is not used by MSFS but will be available for my program via register access. The data I need to read is the positions of the physical axises. Do you have any comments please? John
John Dowson Posted October 9, 2022 Report Posted October 9, 2022 5 hours ago, mrjohn said: But I expect I will have problems with my USB connection conflicting with FSUIPC and MSFS. Why would there be conflicts with USB connections? Any program can request a connection to a usb device. 5 hours ago, mrjohn said: Of course there will be no problem if by chance FSUIPC and read data from sensors, data which is not used by MSFS but will be available for my program via register access. The data I need to read is the positions of the physical axises. FSUIPC supports HID joystick type devices directly, and other HID type devices using lua. But, if it is available to your program, you can do anything you want with it there, including writing to FSUIPC offsets. Maybe download FSUIPC and take a look at the SDK folder to see the tools provided for programmers. As your post relates to MSFS, I will move this to the FSUIPC7 support sub-forum. John
mrjohn Posted October 9, 2022 Author Report Posted October 9, 2022 Thank you for the quick response. John
mrjohn Posted October 13, 2022 Author Report Posted October 13, 2022 Hi Peter I have now set up a development PC with MS Flight Simulator X and I have downloaded the SDK, the 'Hello' example works and I have tried to convert FPC files to Lazarus using the Lazarus tools. But I have a problem in FPCUser in the Var declaration of the IPC Client Stuff m_atom :atom; The error reported by Lazarus is 'Identifier not found "atom"'
John Dowson Posted October 14, 2022 Report Posted October 14, 2022 19 hours ago, mrjohn said: Hi Peter John, not Peter. Pete retired several years ago. 19 hours ago, mrjohn said: I have now set up a development PC with MS Flight Simulator X and I have downloaded the SDK, the 'Hello' example works and I have tried to convert FPC files to Lazarus using the Lazarus tools. But I have a problem in FPCUser in the Var declaration of the IPC Client Stuff m_atom :atom; The error reported by Lazarus is 'Identifier not found "atom"' Sorry, but I have no idea what this means. What is Lazarus? What are 'FPC Files'? What SDK/programming language are you using? FYI, the most used and supported client library would be Paul Henty's ,Net client API (see https://forum.simflight.com/forum/167-fsuipc-client-dll-for-net/).
mrjohn Posted October 14, 2022 Author Report Posted October 14, 2022 Hi John, I trust Peter is enjoying his retirement. Lazarus is "Lazarus is a Delphi compatible cross-platform IDE for Rapid Application Development. " I am trying to use the Delpi files from the FSUIPC SDK in which several files are named FPCxxx etc. The conversion to Lazarus files is not going well so I downloaded and installed Delphi and although the UIPCHello example in the SDK does compile under Delphi it gives me an error "IPC request contains bad data". What I want to do is extract data from the FSUIPC 'offsets' to move our replica Link Trainer in accordance of the Flight Simulator. I will look at the Paul Henty's API, thank you. John
John Dowson Posted October 15, 2022 Report Posted October 15, 2022 Hi John, 14 hours ago, mrjohn said: Lazarus is "Lazarus is a Delphi compatible cross-platform IDE for Rapid Application Development. " I am trying to use the Delpi files from the FSUIPC SDK in which several files are named FPCxxx etc. The conversion to Lazarus files is not going well so I downloaded and installed Delphi and although the UIPCHello example in the SDK does compile under Delphi it gives me an error "IPC request contains bad data". Ok. I know nothing about Delphi or Lazarus. This SDK was provided by Pelle F. S. Liljendal (pelle@liljendal.dk) over 20 years ago....you could try emailing him for support, but I think you would be better of using one of the more modern SDKs, 14 hours ago, mrjohn said: I will look at the Paul Henty's API, thank you. Yes, I think that is a better choice, if you are familiar with C:# / .Net. Cheers, John
mrjohn Posted October 16, 2022 Author Report Posted October 16, 2022 Hi John I have no knowledge of C and even less of .Net but I may have discovered a way forward with a friend who has been using FSUIPC and Delphi for several years. Thanks for your advice John
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