Guest GFD Posted June 16, 2003 Report Posted June 16, 2003 Hi, I'm wondering if it is possible to send pitch & bank commands to FS via FSUIPC. I'm programming an autopilot and I would like to send my own commands in stead of using the autopilot commands defined in FSUIPC at this moment. If this isn't possible, in what way can I do this anyway ? Thanks for your help. Bart Devriendt http://glassflightdeck.sourceforge.net
Guest Mark Posted June 17, 2003 Report Posted June 17, 2003 Hi, I've been doing exactly the same thing. The way I programmed it was to use a little control theory and control the aielerons. I think the algorithmn is called a DIS - differentiation, integrating summing. To control bank angle you need to control rate of role (which is roughly what you get for a given aieleron setting). To make the aircraft turn to a certain heading you control bank angle. Cheers Mark
Pete Dowson Posted June 17, 2003 Report Posted June 17, 2003 I'm wondering if it is possible to send pitch & bank commands to FS via FSUIPC. I'm programming an autopilot and I would like to send my own commands in stead of using the autopilot commands defined in FSUIPC at this moment. Pitch and bank are controlled by elevator and aileron. You can just take over those controls. You can even ask FSUIPC to disconnect the user's controls so that they don't interfere. The control inputs are at offsets 0BB2 AND 0BB6. The facilities to disconnect the real controls are at 310A,. Please refer to the Programmers Guide in the SDK. Pete
Guest Mark Posted June 17, 2003 Report Posted June 17, 2003 Hi, My code drives the offsets Pete has pointed out. My spelling of aileron is just a little wrong :) Anyway, here is the code for the main control loop for bank hold: double bank = iAircraft.Bank(); double error = bank + iBank; double pC = iPConstant*error; iIntegrator += (iIConstant*error); iTrim = (int)(pC+iIntegrator); iSurfaces.SetAileron(iTrim); It's in Java. You need to experiment with the 2 contants. At the moment I use iPConstant = 700.00; iIConstant = 45.00; Cheers
Guest GFD Posted June 17, 2003 Report Posted June 17, 2003 Thanks alot. I think this will help me alot. I'm going to test these things one of these days. Greetz, Bart
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