Jump to content
The simFlight Network Forums

FSUIPC - Prepar3D & 0570 Offset


Recommended Posts

Hi,

I'm using FSUIPC version 4.84 in conjunction with Prepar3D v1.3 (the latest) to try and set the altitude of my aircraft while in slew mode. My IOS has slew capabilites and this is one of the options within the screen.... move the aircraft around, left, right, pitch, roll, yaw, velocities and ofcourse altitude.... I allow a specific altitude entry instead of slewing up and down.

I have code that works perfectly using FSUIPC 3.999s and FS2004.

A pseudo run through:

===========================================

set slew (user button press)

enter altitude (user desired eg 2000ft)

---routine after user has entered ALT---

set pause

convert user entered ft to meters

manipulate whole and fraction into 64bit int (note this works with the FS2004 and FSUIPC build)

set altitude using 0570 8bytes

unset pause

---routine ends---

unset slew (user button press)

===========================================

Again this works fine with FS2004 yet does not with Prepar3D. I use SHIFT + Z + Z and I can see the ALT flash to my desired altidude and the scenery flashes then the aircraft is returned to the ground.

To make things interesting, while slew is set is raise the aircraft off the ground by as little as a few feet (from within Prepar3D using F4) and then the above routine works perfectly?? I'm confused why this would be the case... I have monitored simconnect for Errors, and there were none. I have monitored FSUIPC IPC writes to console out put and there is no difference between the writes that happen when the aircraft is on the ground or elevated a few feet. Yet oddly when the aircraft is slewed a few feet off the ground my routine works yet when it's on the ground it does not.

Any suggestions or advice would be great. If you would like to know more information please ask.

Regards

Link to comment
Share on other sites

Ok after further testing today it appears that this offset cannot not be set when the simulation is in slew mode and the aircraft is on the ground.... I tested writing to this offset without pause or slew activated and it works perfectly. I then selected pause and wrote to the offset again perfect. I then selected slew and wrote to the offset and it does not work (when the aircraft is on the ground). After raising the aircraft just a few feet then setting the offset it works.

This is just an update, I will have to wait until Pete's back to raise it with him..

Regards

Edited by narcosisnz
Link to comment
Share on other sites

Ok after further testing today it appears that this offset cannot not be set when the simulation is in slew mode and the aircraft is on the ground.... I tested writing to this offset without pause or slew activated and it works perfectly. I then selected pause and wrote to the offset again perfect. I then selected slew and wrote to the offset and it does not work (when the aircraft is on the ground). After raising the aircraft just a few feet then setting the offset it works.

This is just an update, I will have to wait until Pete's back to raise it with him..

FSUIPC does nothing different in pause or slew modes. It merely sends the value to SimConnect. I'm not sure why it is different in different modes, but i think it is the same in FSX. You might try the "Initial Position" method instead -- see offsets 0558 and 055C. You'd need to write that Lat/lon values as well, but you could read those first to get the same values.

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.