Jacques Le Coent Posted February 2, 2009 Report Posted February 2, 2009 Hi Pete, I am currently building a generic cockpit using the famous Aeroworks B200 as a basis .The Hard is completed by a Saitek Pro -flight Yoke and pedals as well as a GF –LTG module (gears, flaps, trim). Softwares are XP SP2, Flight simulator 2004, FSUIPC v 3.75 (This might not be the latest one, but I do not think that this is relevant for my issues), The cockpit controls (switches, buttons, rotating knobs) are driven by the IO card interface and SIOC. So everything is very classical and documented many times (too much sometimes). FSUIPC is obviously the software corner stone frequently addressed in my SIOC script. However I still have two main topics for which I am unable to use FSUIPC either directly (via the Saitek Pro yoke buttons) or within the SIOC script. 1 A.P. ALTITUDE I wish to control the A.P. from the Saitek Pro –Yoke and ProQuadrant buttons. Although all others Automatic Pilot functions ( A.P. heading hold ,A.P. Nav1 hold, A.P. Approach , A.P. VS inc, A.P. VS dec ) are working fine ,the AP Alt Hold ( 65726) or the AP panel Alt Hold (65799) do not trigger the Altitude select or the ALT automatic pilot function as expected .This is also true for other aircrafts using other A.P. models (e.g:Cessna 172) . I am currently using Key2 mouse for this as an alternative solution but I do not like it since the B200 already requires it so much, Can you help? 2 HEADING BUG AND VOR1 OBI (FAST). The functions Heading Bug Dec (65880) and Heading Bug Inc (65879) as well as the functions VOR1 OBI Dec ((65662), VOR1 OBI Inc (65663) are implemented within my SIOC script via the offset $3110 and working fine. I wish to add (for more convenience) the FSUIPC following functions Heading Bug Dec fast, Heading Bug Inc. Fast, VOR1 OBI Dec fast ,VOR1 OBI Incr fast. These are displayed and also working fine but their offset numbers are not documented (at least in the available printed documentation). Can you help also? Best regards Jacques Le Coent Dr Haussner str 5 67435 Neustadt /w Germany
Pete Dowson Posted February 2, 2009 Report Posted February 2, 2009 FSUIPC v 3.75 (This might not be the latest one, but I do not think that this is relevant for my issues) Well it does matter to me as I have a policy of only supporting the stated supported versions -- namely the one on current release or interim updates made available since then. I do this explicitly to encourage people to keep up to date. It makes less support load in the long term. Although all others Automatic Pilot functions ( A.P. heading hold ,A.P. Nav1 hold, A.P. Approach , A.P. VS inc, A.P. VS dec ) are working fine ,the AP Alt Hold ( 65726) or the AP panel Alt Hold (65799) do not trigger the Altitude select or the ALT automatic pilot function as expected .This is also true for other aircrafts using other A.P. models (e.g:Cessna 172) . Hmm. "AP panel altitude hold" certainly does here for default aircraft, including the Cessna 172, and in fact this control has been in continuous use doing that on many cockpits now for many years (since FSW95 days at least). Here's a log entry showing me clicking it with the mouse: 146860 *** EVENT: Cntrl= 65799 (0x00010107), Param= 0 (0x00000000) AP_PANEL_ALTITUDE_HOLD The same control sent from a button or keypress does the same thing. Maybe you need help from the author of the "Aeroworks B200"? I'm afraid I don't know what that might do, but try logging -- switch on Event logging and you will see the control name or number for each FS panel button which issues an FS control. I wish to add (for more convenience) the FSUIPC following functions Heading Bug Dec fast, Heading Bug Inc. Fast, VOR1 OBI Dec fast ,VOR1 OBI Incr fast. These are displayed and also working fine but their offset numbers are not documented (at least in the available printed documentation). Er, offset numbers? You are confused! Offsets are addresses of values in memory, offset from a base. They deal in VALUES, not CONTROLS. Please never mix them up otherwise you will most certainly get into a mess. Do you want to use offsets, i.e. from an FSUIPC application program, or controls, i.e. from buttons or keypresses? I've no idea what SIOC does. The offset related to the heading bug is a an area of memory containing the actual heading value. To increment it you read it, add something to it, and write it back. FS control numbers are assigned by Microsoft (they are "KEY EVENT" numbers in their gauge programming kit), and i provide a complete list in my documents. FSUIPC controls are ADDITIONAL to the ones invented by Microsoft, and they are all listed in the Advanced Users documentation. Please be sure to be using a supported version of FSUIPC next time you ask a question, please. Pete
Jacques Le Coent Posted February 3, 2009 Author Report Posted February 3, 2009 Hi Pete, As a former commercial pilot I am not a computer specialist but I understand now (or I believe so) that basically the offsets are the addresses where the FS variables can be found and the FS controls are keys events launching the programs which are manipulating these variables. Your advice to visit the Aeroworks B200 author forum was fruitful. I could see some questions about this topics without any solution so far (expect K2mouse).The B200 Autopilot seems to be “special “.A compatible version would be expected in a version 3 but nobody knows when. I also double checked the AP panel Alt hold control on the others FS standard aircrafts and finally found out that it´s working well on all of them. Please accept my apology for misleading you. As you wrote I could find the controls that I was looking for in the FSUIPC for advanced users, chapter Additional FS controls (1024 through 1027).Since I just looked in the list of 2004 controls I missed them. Many thanks again for your strong support Jacques Best regards PS :I will download and register 3.85
Pete Dowson Posted February 3, 2009 Report Posted February 3, 2009 I understand now (or I believe so) that basically the offsets are the addresses where the FS variables can be found and the FS controls are keys events launching the programs which are manipulating these variables. Well, more or less -- controls are not so much "launching programs" but more just identifying an action. They are, in fact, the identity numbers of private Windows messages (Commands in fact) which are send around between different parts of Flight Sim. Your advice to visit the Aeroworks B200 author forum was fruitful. I could see some questions about this topics without any solution so far (expect K2mouse).The B200 Autopilot seems to be “special “.A compatible version would be expected in a version 3 but nobody knows when. I also double checked the AP panel Alt hold control on the others FS standard aircrafts and finally found out that it´s working well on all of them. Please accept my apology for misleading you. No problem, I assumed it was a misunderstanding. Regards Pete
RemoteFMS Posted February 10, 2009 Report Posted February 10, 2009 I'm rewriting my application to work with FS2004 (version for FSX was made using Simconnect) and I can't find offsets for total fuel capacity and actual fuel quantity. Do I need to sum all the tanks capacities and fuel quantities? Btw, my software: :)
Pete Dowson Posted February 10, 2009 Report Posted February 10, 2009 I'm rewriting my application to work with FS2004 (version for FSX was made using Simconnect) and I can't find offsets for total fuel capacity and actual fuel quantity. Do I need to sum all the tanks capacities and fuel quantities? Yes. Btw, my software: :) Very colourful! ;-) Pete
RemoteFMS Posted February 10, 2009 Report Posted February 10, 2009 Very colourful! ;-) Pete I hope it is a compliment ;) Btw, I can't find another offset for user aircraft title... And I need it to know when the user change his aircraft or maybe there is another way to check it?
Pete Dowson Posted February 10, 2009 Report Posted February 10, 2009 Btw, I can't find another offset for user aircraft title... Why do you want another for the same data? Just use the one provided at 3D00. I don't see any point in mapping it more than once! Pete
RemoteFMS Posted February 10, 2009 Report Posted February 10, 2009 No, you didn't understand me. I don't want to map it twice ;) I found the 3D00 offset but documentation says "3D00 - Name of the current aircraft (from the ―title parameter in the AIRCRAFT.CFG file). Valid for FS2K only." And I connect to FS2004 not FS2000. Is it an error in doc?
Pete Dowson Posted February 10, 2009 Report Posted February 10, 2009 I found the 3D00 offset but documentation says "3D00 - Name of the current aircraft (from the ―title parameter in the AIRCRAFT.CFG file). Valid for FS2K only." And I connect to FS2004 not FS2000. Is it an error in doc? Ah, that "Valid for FS2k only" dates from when the offset was added -- in FS2000 times. It wasn't valid before FS2000. Do you see the two columns to the right, both marked "Ok". One is for FS2002 and the other for FS2004 (the heading is on the first page of the list). It means it is "ok" for those. That's why the columns were added. Sorry, I never seem to get enough time to go through al the text. You should find FSInterrogate, supplied in the SDK, useful for determining offset validity. That's why it is provided. Or you can even use the on-screen monitoring facility in FSUIPC (right-hand side of the Logging page). Regards Pete
RemoteFMS Posted February 11, 2009 Report Posted February 11, 2009 Thanks Pete! FSIterrogate turned out useful. Now another problem with the offsets. In Simconnect some values are given directly and here I need to calculate some things. I need 3 things: 1. maximum number of flaps handle positions 2. actual handle position 3. actual flaps angle As i know I will need maximum number of flaps handle positions so I can derive actual handle position from 0BDC but i can't find the offset for it. And it seems I will need max flaps angle to calculate actual angle. Do I need to read aircraft.cfg some way for that?
Pete Dowson Posted February 11, 2009 Report Posted February 11, 2009 1. maximum number of flaps handle positions You'd need to compute that from the increment at 3BFA. It does say that. Apart from using FSInterrogate to check things, why not search the document listing all the offsets? I found that one in two minutes just searching for "flap". The full documentation is the document. Don't rely on what is written in FSInterrogate FSI files and they are difficult to maintain and not done very thoroughly. 2. actual handle position I *think*, but I'm not sure, that the relative handle position is the value actually provided in the 0BE0 and 0BE4, but it might not be. It changed between FS2000 and FS2002 but I never determined the real meaning. 3. actual flaps angle That's more difficult. You'd need to know what the maximum is in radians or degrees. Sorry I can't help with that. No one ever asked before anyway, all these many years! Do I need to read aircraft.cfg some way for that? Looks like it. Why do you need the true angle? Regards Pete
RemoteFMS Posted February 11, 2009 Report Posted February 11, 2009 Apart from using FSInterrogate to check things, why not search the document listing all the offsets? I found that one in two minutes just searching for "flap". The full documentation is the document. Don't rely on what is written in FSInterrogate FSI files and they are difficult to maintain and not done very thoroughly. Ofcourse I use documentation as my primary source. I had to ommited that one ;) Why do you need the true angle? This is one of many variables displayed in my application in addition to flaps positions. I would like to display flaps handle position as flaps angle displayed on the label next to the handle but I can't get it from FS so at least I display true flaps angle.
Pete Dowson Posted February 11, 2009 Report Posted February 11, 2009 I would like to display flaps handle position as flaps angle displayed on the label next to the handle but I can't get it from FS so at least I display true flaps angle. Yes, but the label and the actual angle aren't always the same. Best in both FS9 and FSX really to get the label data from the CFG file. You only need to do this on a change of aircraft of course -- the AIR file changes are notified by a count in the offsets. The Aircraft.CFG file [flaps.0] section seems to contain what you want. For example, C182: flaps-position.0 = 0 // degrees flaps-position.1 = 10 // degrees flaps-position.2 = 20 // degrees flaps-position.3 = 30 // degrees737-400: flaps-position.0 = 0 // degrees flaps-position.1 = 1 // degrees flaps-position.2 = 2 // degrees flaps-position.3 = 5 // degrees flaps-position.4 = 10 // degrees flaps-position.5 = 15 // degrees flaps-position.6 = 25 // degrees flaps-position.7 = 30 // degrees flaps-position.8 = 40 // degrees You can use the regular ReadPrivateProfileString() API calls for these, and they share access well so there's no danger of conflict. They should even work using the UNC pathnames from a Networked PC (though I've not tried that). Derive it from the full AIR file pathname offset, just replace the filename part by "aircraft.cfg". Regards Pete
RemoteFMS Posted February 11, 2009 Report Posted February 11, 2009 First, the offsets 0BE0 and 0BE4 are for actual flaps position not the handle. But I found and used 0BDC offset to derive handle position so one problem solved :) Now the angles. The values in CFG file are true angles not label values. e.g. C172 flaps-position.0 = 0 flaps-position.1 = 12.7 flaps-position.2 = 25.3 flaps-position.3 = 38 and on the label in the cockpit there is 0, 10, 20, FULL. So I think I 'm not able to get label values that's why I request at least actual true angle from Simconnect but it seems for FS9 I will have to read CFG to obtain max flaps angle to do the calculations. ************* Pete, do you know how to check if the plane has adjustable prop? I use min and max prop beta angle in Simconnect. If they are different then it's adjustable but I found the offset only for actual beta angle (2418).
Pete Dowson Posted February 11, 2009 Report Posted February 11, 2009 The values in CFG file are true angles not label values. Oh, just coincidence that they were the same as the labels in the two files I took as samples. how likely is that? ;-) do you know how to check if the plane has adjustable prop? On FS9, offset 0AF0 tells you. Simconnect doesn't supply this data. Regards Pete
RemoteFMS Posted March 3, 2009 Report Posted March 3, 2009 On FS9, offset 0AF0 tells you. Simconnect doesn't supply this data. Oh, I missed that one :) Thank you! Another three things: 1. I see the offsets 060C and 060E for gear type are not used by FS9. Is there any way to get the gear type? I didn't find anything in aircraft.cfg also. 2. I also noticed the result of offset 0784 (carb heat available) is true for the planes like King Air 350, B737, 747 and others. 3. Does FS9 use seatbelts sign at all?
Pete Dowson Posted March 3, 2009 Report Posted March 3, 2009 1. I see the offsets 060C and 060E for gear type are not used by FS9. Is there any way to get the gear type? I didn't find anything in aircraft.cfg also Not that I know of. 2. I also noticed the result of offset 0784 (carb heat available) is true for the planes like King Air 350, B737, 747 and others. Hmm. Not sure about that. It is probably simply not set if the aircraft type isn't "prop", so it depends on the last prop you had loaded. 3. Does FS9 use seatbelts sign at all? Not unless it has been added by an add-on aircraft. Pete
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