Jump to content
The simFlight Network Forums

Offsets Help (Managed Client)


Recommended Posts

Hello,

I am trying to read those offsets 0578 057C 0580 (pitch, bank heading) using the 1.3 dotnet client and dividing them as per FSUIPC offset instructions but the values returned are either very high or very low, did someone test those offsets our could point me on how to get them properly (i need Rads so it should be oBodyBank.Value * 2 * Math.PI / (65536D * 65536D) but it doesn't seem to work

Also another question I am trying to read and write XYZ velocities using offsets 3180 3188 and 3190 but those are seemingly not writable, so I am using 3098, 30A0, 3090 to write but then I have to adjust for the relative wind using offsets 3470 3478 3480 but that does't seem to work... any suggestions ?

thank you in advance

Fred

Link to comment
Share on other sites

I am trying to read those offsets 0578 057C 0580 (pitch, bank heading) using the 1.3 dotnet client and dividing them as per FSUIPC offset instructions but the values returned are either very high or very low, did someone test those offsets

Test them? They are in heavy use in many many important programs, and certainly work exactly as documented. Have you used FSInterrogate to see their values in real time? FSInterrogate can show you the raw and factored values, accurately.

i need Rads so it should be oBodyBank.Value * 2 * Math.PI / (65536D * 65536D) but it doesn't seem to work

I don't recognise that syntax (what language is "1.3 dotnet"?), but I assume you are doing everything in floating point? Why the "D" on the ends of the 65536?

Are you sure you have the reading part correct? It doesn't matter what your computations look like if your are reading the values incorrectly. Compare your results with what FSInterrogate shows.

Also another question I am trying to read and write XYZ velocities using offsets 3180 3188 and 3190 but those are seemingly not writable, so I am using 3098, 30A0, 3090 to write but then I have to adjust for the relative wind using offsets 3470 3478 3480 but that does't seem to work... any suggestions ?

No, because you don't supply enough information. What "doesn't work", exactly -- you can't write, or you write and it doesn't change?

In general those sorts of values are DERIVED from the simulation engine inside FS. Every time you write to one of them, FS will overwrite it on the next iteration, at the sim internal frame rate. To have any effect at all you usually have to keep writing at frequent intervals. Probably you'd need to run in-process -- i.e. as a Gauge, DLL or, easier, a Lua plug-in.

It would also help if you mentioned what version of FSUIPC and, especially, FS you are talking about. There's an enormous difference between FS9 and FSX internal implementations in these areas.

Regards

Pete

Link to comment
Share on other sites

Peter,

thank you for your reply.

I'am sorry I was not clear, and also I posted before I checked better myself...

I am using FSUIPC dot net client 1.3 to write a windows forms application in C# to alter helicopter behaviours in FSX..

The issue with the offsets 0578 057C 0580 (pitch, bank heading) was my mistake as I was casting as float instead of integer (sorry)

I am using a fixed 20 fps framerate on FSX and on my application so the updates should be in synch.

Regarding the offsets to alter the XYZ linear velocities of the helo I am currently using offsets 3098, 30A0, 3090 (Ground velocities). Am I doing this correctly or would it be better to use other offsets such as 3180 3188 and 3190 (TAS velocities) or even the accelleration offsets (is there a best practice commonly used by FSUIPC developers for altering linear and angular velocities?).

Thank you for your help and for such a great product. After MS dropped FSX development and consequently Simconnect, I think FSUIPC will be the future for improving this great sim.

Thank you and regards

Fred

Link to comment
Share on other sites

Regarding the offsets to alter the XYZ linear velocities of the helo I am currently using offsets 3098, 30A0, 3090 (Ground velocities). Am I doing this correctly or would it be better to use other offsets such as 3180 3188 and 3190 (TAS velocities) or even the accelleration offsets (is there a best practice commonly used by FSUIPC developers for altering linear and angular velocities?).

Sorry, I've no idea, really. It's a matter of experimentation. The SimConnect documentation lists all of these as "settable", and certainly SimConnect does not reject FSUIPC's writes to them as it does with the others:

3060 - 3070 (Acceleration Body X Y Z)

3090 - 30A0 (Velocity Body Z X Y)

30A8 - 30B8 (Rotation Velocity Body X Z Y)

3190 - 31A0 (Velocity World Z X Y)

31C0 - 31D0 (Acceleration World X Y Z)

Those are the Microsoft names for the values. What you might manage to do with them I really don't know -- in FS9 and before it was a "fiddle", a "hack" directly into the Sim Engine -- applications were constantly fighting FS's own computations in order to get their own values established. The fact that Microsoft actually provides official ways of writing these, via SimConnect, in FSX should have meant, I would hope, that they would work without so much hassle.

But I am not an expert in any of this area. All I've done is provided the FS9-compatible access. Maybe you should ask questions on the SimConnect forums too, where folks may be trying to write these direct to SimConnect.

It does occur to me that all of them will tend to interact with one another, so EITHER one set has to be written first and that affects all the others, or, more likely perhaps (?) you have to write consistent values to all of them at the same time.

BTW, referring back to this in your earlier message:

Also another question I am trying to read and write XYZ velocities using offsets 3180 3188 and 3190 but those are seemingly not writable

Were the offsets 3180, 3188, 3190 an error in your typing? I assume you really meant 3178, 3180 and 3188? These certainly aren't writable through SimConnect, so I assume must be a "result", not an input.

After MS dropped FSX development and consequently Simconnect, I think FSUIPC will be the future for improving this great sim.

Well, not necessarily, because 99% of FSUIPC's access into FSX is via SimConnect. To do anything more than what SimConnect provides would mean hacking into the code and really I am reluctant to do any more of that these days. It was a nightmare in FS9. The use of highly optimising C++ compilers for complex multi-piping processors produces really horribly convoluted code in the first place, and as Microsoft went further and further along the Object-Oriented code route, with even trivial functionality boxed up in virtual private interfaces and buried deep below a series of pointers, I really started flagging. It's no fun any more, especially at my age (66). Maybe some bright young sparks will come up with answers for some of the niggles, and if they would wish to share them then by all means I would incorporate them, but it is more liekly in this day and age for such to be kept secret and used to promote more products.

Regards

Pete

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • 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.