Jump to content
The simFlight Network Forums

FSUIPC writing into FS2004


Recommended Posts

Hi there,

 

I'd like to change the position as well as bank, pitch and roll angles of the aircraft.

I managed to write the desired angles but I cann't change Lat/Lon/ Alt

 

There is this remark [Can be written to move aircraft: in FS2002 only in slew or pause states].

 

Does this mean at can be written only to FS2002 OR only in slew mode in FS2002 meaning does it work in FS2004 at all.

 

Heres is the code I used in C++

void FS9WriteInterface::writeLatitudeDeg(double latDeg)
{
	long long Latitude;	
	DWORD dwResult;
	Latitude = latDeg /90.0 * (10001750.0 * 65536.0 * 65536.0);
	if (FSUIPC_Write(0x0560, 8, &Latitude, &dwResult))
	{ 
		FSUIPC_Process(&dwResult);
	}
}

Cheers Maik
 

Link to comment
Share on other sites

I'd like to change the position as well as bank, pitch and roll angles of the aircraft.

I managed to write the desired angles but I cann't change Lat/Lon/ Alt

 

You can change all at once, and (in FSX at least) even set the airspeed at the same time.  You write from offset 055C (or 0558 with airspeed) and set LLAPBH (Lat Lon Alt Pitch Bank Heading), all in one structure.

 

In FSX you can alternatively write individual values.

 

There is this remark [Can be written to move aircraft: in FS2002 only in slew or pause states].

Does this mean at can be written only to FS2002 OR only in slew mode in FS2002 meaning does it work in FS2004 at all.

 

It means that it only works in FS2002 when you first set slew or pause mode. That didn't apply to FS98 and FS2000 (which is when FSUIPC's interface first appeared). I'm afraid I don't actually recall whether that also applies to FS2004 -- it may well do. I haven't been involved with FS2004 for many years. Try it and see.

 

Have you checked that the right value is being written? Use logging (Monitor offset 0560), or use FSInterrogate -- that latter utility is an essential for debugging FSUIPC applications.

 

Regards

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.