Jump to content
The simFlight Network Forums
oresther

fsuipcclient for p3d 64bit

Recommended Posts

No problem motuslechat, I havn't taken offence at anything you wrote.

I really appreciate everyone's enthusiasm for the new version. I'm just keen to let everyone know that improvements are on the way in terms of distribution and keeping track of versions.

If there's anything you want to try out, let me know and I'll get you some sample code...

Kind Regards,

Paul

Share this post


Link to post
Share on other sites

Hi Paul,

Do you think that it is possible to add this method ?

MoveAircraftTo( Aircraft_ID, Lat (decimal degrees), Lon (decimal degrees), Alt (meters),  Heading (degrees), With_Slew_Mode (boolean default is true))

Thank you.

Share this post


Link to post
Share on other sites

I've been looking at moving the Player Aircraft.

For FSX and above, FSUIPC provides a good way of doing this. It's very reliable.

If I don't use this special feature then it's very messy. Sometimes the altitude isn't set properly, sometimes the plane falls out of the sky etc.

So I can only do this for FSX and above. For FS9, developers will need to do their own moving using the normal offsets and calling for scenery refreshes etc. I don't have FS9 so I can't come up with a method that works for both.

Paul

Share this post


Link to post
Share on other sites

Yes it's done, but only for FSX and above.

New version attached: RC7

Here are the changes from RC6:

Version 3.0 RC7
================

* Added new contructor to FsLatLonPoint to accept Lat and Lon in DecimalDegrees

* Added new FsAltitide class to convert between Feet, Metres and FS Altitude Units

* Added FSUIPCConnection.MoveAircraft() method. This will move the plane to the specified location,
  an optionally set a new Altitiude, Speed, Pitch and Bank is specified. 
  Can also accept a Runway, Gate or Helipad from the FsDatabase, or an FsPositionSnapshot object.

* Added method MoveAircraftHere() to FsRunway, FsGate and FsHelipad objects in the database. 

* Added property IsOnGround to AiPlaneInfo object. This lets you know if the AI Plane is on the ground or not.

* BREAKING CHANGE: AiPlaneInfo - properties beginning with 'Destination' changed to 'Arrival'

* Added FsPositionSnaphot class that hold information about the position of the player aircraft. 
  This includes lon/lat/ias/bank/pitch/altitude/onground/heading
  This can be used manually or generated automatically by using the FSUIPCConnection.GetPositionSnaphot() method.

Here is some example code for using the new MoveAicraft() feature:

Basic Use:

            // Basic use: Pass the new position information. 
            // Some parameters are nullable. Pass null to keep the current values 
            // (e.g. to keep the current heading pass null for the heading.)
            // When setting the onGround flag, the new altitude and IAS values are ignored.
            // Example of moving the aircraft to final approach for runway 09 at EGJJ:
            FsLatLonPoint newLocation = new FsLatLonPoint(49.193896, -2.320686);
            FsAltitude newAltitude = FsAltitude.FromFeet(2000);
            double newHeading = 79;
            double newPitch = 0;
            double newBank = 0;
            double newIAS = 90;
            bool onGround = false;
            bool leavePaused = false;
            FSUIPCConnection.MoveAircraft(newLocation, onGround, newAltitude, newHeading, newPitch, newBank, newIAS, leavePaused);

Position Snapshots:

            // Using Position Snapshots:
            // You can also pass a FsPositionSnapshot object to the move aircraft method.
            // This can be created manually, or automatically using the GetPositionSnapshot method.
            // Using this feature you can automatically save the players postion and restore it later:
            // To save:
            FsPositionSnapshot newSnapshot = FSUIPCConnection.GetPositionSnapshot();
            // Later, you can restore this postion (including the IAS, Bank, Pitch, Heading and Alt)
            FSUIPCConnection.MoveAircraft(newSnapshot, leavePaused);

Airport Database Objects:

            // Using Airport Database objects:
            // You can also pass FsGate, FsRunway and FsHelipad objects.
            // The database must be loaded for this to work.
            // This is an example of moving to Gate 1 at EGJJ
            FsGate gate = FSUIPCConnection.AirportsDatabase.Airports["EGJJ"].Gates["1"];
            FSUIPCConnection.MoveAircraft(gate, leavePaused);

Let me know if there are any problems, or you need any more help.

Paul

FSUIPCClient3.0_RC7.zip

Share this post


Link to post
Share on other sites

* Added new contructor to FsLatLonPoint to accept Lat and Lon in DecimalDegrees : tested and Ok

* Added new FsAltitide class to convert between Feet, Metres and FS Altitude Units : tested and Ok in meters

* Added FSUIPCConnection.MoveAircraft() method. This will move the plane to the specified location,   an optionally set a new Altitiude, Speed, Pitch and Bank is specified : tested and Ok

All is perfect :-)

 

When you will have time, can you give us samples for AirportsDatabase and AITraffic and AiPlaneInfo.

 

Thank you very much for your job !!!!

 

 

Share this post


Link to post
Share on other sites

Great, thanks for testing MoveAircraft().

 

The documentation for the use of the AiTrafficServices (including AiPlaneInfo) is in the 2.4 package. See the example application and the user guide pdf:

http://forum.simflight.com/topic/74848-fsuipc-client-dll-for-net-version-24/

 

For using the new airports database see this post:

http://forum.simflight.com/topic/78224-cant-read-nearest-icao-in-c/?do=findComment&comment=511147

 

For details about the interaction between the the database and AI traffic see this post:

http://forum.simflight.com/topic/78224-cant-read-nearest-icao-in-c/?do=findComment&comment=511259

 

Paul

Share this post


Link to post
Share on other sites

Thank you,

 

I have forgotten 2.4 pdf doc.

 

For airports databases, I havn't seen this sample. I have try it npw and it works fine !

 

For AI traffic I will have a look

Share this post


Link to post
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


×