Jump to content
The simFlight Network Forums

FSUIPC4 Offsets - AP Altitude/VS with A2A in FSX


Recommended Posts

Hi Pete

 

I am the support developer for LINDA and have found an interesting issue with the offsets for Autopilot Altitude (07D4) and Vertical Velocity (07F2) with A2A aircraft add ons in FSX and P3D. I wonder what your view is.

 

The offsets are:

  • 07D4  4 bytes  Autopilot altitude value, as metres*65536
  • 07F2  2 bytes  Autopilot vertical speed value, as ft/min

​The altitude is quoted as being in metres and the vertical speed in ft/min.

 

​I have found through detailed tests that the conversion of Altitude from metres to feet is required only if the A2A A182 or C172 aircraft are used or when using P3D (alt = round(0x07D4 * 3.2808399 / 65536)). The reverse applies to the Vertical Speed. If not A2A or P3D, VS= round(0x07F2 / 3.2808399).

 

In all other cases (FSX and non-A2A), the offsets are defined as AP Alt in feet and AP VS in metres/sec. This is opposite from the FSUIPC4 Status of IPC Offsets for FSX document.

 

Link to comment
Share on other sites

Hi Pete

 

I am the support developer for LINDA and have found an interesting issue with the offsets for Autopilot Altitude (07D4) and Vertical Velocity (07F2) with A2A aircraft add ons in FSX and P3D. I wonder what your view is.

 

The offsets are:

  • 07D4  4 bytes  Autopilot altitude value, as metres*65536
  • 07F2  2 bytes  Autopilot vertical speed value, as ft/min

​The altitude is quoted as being in metres and the vertical speed in ft/min.

 

​I have found through detailed tests that the conversion of Altitude from metres to feet is required only if the A2A A182 or C172 aircraft are used or when using P3D (alt = round(0x07D4 * 3.2808399 / 65536)). The reverse applies to the Vertical Speed. If not A2A or P3D, VS= round(0x07F2 / 3.2808399).

 

I don't know what A2A have done, but the units for these things are stated to SimConnect in the request made by FSUIPC.  FSUIPC wants those units for compatibility with earlier non-SimConnect versions of FS.

 

It seems A2A use the units FSX things of as metres or ft/min as feet or metres/min. Very strange! Have you asked them about that?

 

In all other cases (FSX and non-A2A), the offsets are defined as AP Alt in feet and AP VS in metres/sec. This is opposite from the FSUIPC4 Status of IPC Offsets for FSX document.
 

 

This statement confuses me and seems to contradict when you said just before. Can you clarify it please?

 

Pete

Link to comment
Share on other sites

Thank you Pete. It may only be A2A but P3D who have moved the goal posts. A2A may just be using the P3D definition for AP Alt and VS for both platforms.

 

Looking at the Lockheed Martin definition (http://www.prepar3d.com/SDKv2/LearningCenter/utilities/variables/simulation_variables.html#Aircraft%20Autopilot%20Data):

 

 

AUTOPILOT ALTITUDE LOCK VAR Selected altitude ("Altitude bug") Feet Y Shared Cockpit

 

AUTOPILOT VERTICAL HOLD VAR Selected vertical speed ("VSI bug") Feet/minute Y Shared Cockpit

 

I will inquire further with them.

Link to comment
Share on other sites

Thank you Pete. It may only be A2A but P3D who have moved the goal posts. A2A may just be using the P3D definition for AP Alt and VS for both platforms.

 

Looking at the Lockheed Martin definition (http://www.prepar3d.com/SDKv2/LearningCenter/utilities/variables/simulation_variables.html#Aircraft%20Autopilot%20Data):

 

 

AUTOPILOT ALTITUDE LOCK VAR Selected altitude ("Altitude bug") Feet Y Shared Cockpit

 

AUTOPILOT VERTICAL HOLD VAR Selected vertical speed ("VSI bug") Feet/minute Y Shared Cockpit

 

Yes, but those are described in exactly the same way in the FSX SimConnect SDK. But when the data is requested you can specify the units, thus:

 

HRESULT SimConnect_AddToDataDefinition(

  HANDLE  hSimConnect,

  SIMCONNECT_DATA_DEFINITION_ID  DefineID,

  const char*  DatumName,

  const char*  UnitsName,

  SIMCONNECT_DATATYPE  DatumType = SIMCONNECT_DATATYPE_FLOAT64,

  float  fEpsilon = 0,

  DWORD  DatumID = SIMCONNECT_UNUSED

);

 

It also says (my highlighting):

 

"UnitsName

  [in]  Specifies the units of the variable. See the Simulation Variables document for a table of acceptable unit names. It is possible to specify different units to receive the data in, from those specified in the Simulation Variables document. See DEFINITION_2 below for an example. The alternative units must come under the same heading (such as Angular Velocity, or Volume, as specified in the Units of Measurement section of the Simulation Variables document). For strings and structures enter "NULL" for this parameter. "

 

FSUIPC uses that flexibility to request them in the units which are immediately more compatible with the offsets and the same as FS9 and before.

 

I really don't think P3D is different to FSX in this regard -- there are many folks using instrumentation from the likes of ProSim, Project Magenta and so on which use these offsets for reading and writing these A/P values. Are you not sure it isn't just A2A who've got things wrong? Your first message says A2A in both FSX and P3D. Your last paragraph in that message was contradictory which is why I asked for clarification there.

 

I have P3Dv2 installed on this PC, I'll go check now. I do have P3D v3 too, but on my cockpit system only which isn't powered up at present.

 

Pete

Link to comment
Share on other sites

Okay. I can confirm that P3Dv2.5 has those variables working exactly as in FSX.

 

Please use the FSUIPC Monitor facilities -- logging tab, right-hand side. Enter 07D4 as type U32 and 07F2 as type S16, then check "normal log" at the bottom. FSUIPC will log changes to those along with the value of the actual SimVar read. Compare those to the values displayed in the MCP. The SimVar altitude is in metres and the V/S in feet.

 

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.