Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Dear Paul
It is a great pleasure to work with your DLL. Even I had to start in VB .Net (after 26 years of VB6 ...

We have some scenery details (i.e. sightseeing towers) which are located obviously the same place as our own generic obstacles.
We need to create many Exclusion Rectangles.

FsLatLonCircle is almost the solution. Obviously you are quite strong in this field. Our wish:

FsLatLonExcludePoly
Constructs a new FsLatLonExcludePoly from a central FSLatLonPoint and a Radius in meters / feet with 4 points on the circle, forming a polygon pointing to North.

To create then the XML file in P3D SDK 5 format i.e.
<ExclusionRectangle
      latitudeMinimum = "N47.0"
      latitudeMaximum = "N48.0"
      longitudeMinimum = "W123.0"
      longitudeMaximum = "W122.0"
/>
should be rather simple than.

According the many posts in forums covering exclusion rectangles many users have problems to create.

May be you can have a look into.
Best regards
Peter

Posted

Hi Peter,

As it's a rectangle, I've extended the functionality of the FsLatLonQuadrilateral for this.

You can now create a quad from a centre point and a width and height.

// Create the centre point of the rectangle
FsLatLonPoint centre = new FsLatLonPoint(49.206993, -2.206967);
// Create the rectangle 100m high (north to south) and 56m wide (east to west) around the centre point
FsLatLonQuadrilateral quad = FsLatLonQuadrilateral.FromCenterMetres(centre, 100, 56);

The quad now has new properties to get the Min/Max longitude and latitude. E.g.

FsLatitude maxLat = quad.LatitudeMaximum;

This is now available for testing in version 3.1.26-BETA. (Tick 'include pre-release" in the Nuget package manager to see the Beta versions).

Hopefully this meets your requirements but let me know if I've misunderstood.

Paul

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.