Delphi Posted February 15, 2015 Report Posted February 15, 2015 Hallo Paul, currently I'm working on a program which generates map overlays for flight path, filed flight plan, approach and depature procedures. I use your fsuipc.dll for all the coordinates calculation. Works great :-), thanks. In order to complete my program I would need some additional coordinate calculations as part of your Longitude/Latitude Helper Classes: 1. Calculation of a Lat / Lon given by the following descripition (example): Track yyyy (degree) from XXXX (Lat / Lon) until intercepting radial ZZZ (degree) from a given coordinate (Lat / Lon) 2. Calculation of a Lat / Lon given by the following descripition (example): Track yyyy (degree) from XXXX (Lat / Lon) until a certain distance (DME) to a given coordinate (Lat / Lon) Would be great if version 3.0 of your fsuipc.dll would have these additional features. Regards, Ruediger
Paul Henty Posted February 15, 2015 Report Posted February 15, 2015 Hi Ruediger, Good suggestions. I'll have a look at this in the next few days, Paul
motuslechat Posted February 16, 2015 Report Posted February 16, 2015 Hi Paul, I have already code to do this. Tell me if you want it. Motus
Paul Henty Posted February 16, 2015 Report Posted February 16, 2015 Hi Motus, I got most of this done last night, but thanks for the offer. Paul
Paul Henty Posted February 16, 2015 Report Posted February 16, 2015 Hi Ruediger, Ready for testing. New DLL attached. Just overwrite your current DLL and XML files. The new methods added to FsLatLonPoint are: 1. For your request #1: FsLatLonPoint IntersectRadial(double Bearing, FsLatLonPoint Point, double Radial) Calculates the intersection from the current point along the Bearing to where it meets the Radial from the other Point. Check the IsValid property of the point returned to make sure it's valid. Invalid points are generated if the bearing and radial never intersect, or if the intersection is more than 200NM from the Point. This is an arbitrary limit but some limit must be placed or else some results could be hundred of thousands of miles away from the Point which doesn't make sense. I could increase the limit if required. Sample code: FsLatLonPoint myPlaneLocation = new FsLatLonPoint(); FsLatLonPoint vorLocation = new FsLatLonPoint(); double myBearing = 40; double vorRadial = 180; // find where the plane (flying bearing 040) will intersect radial 180 of the VOR: FsLatLonPoint intersection = myPlaneLocation.IntersectRadial(myBearing, vorLocation, vorRadial); if (intersection.IsValid) { // Do stuff with intersection } else { // No intersection possible, or intersection is more than 200NM from VOR } 2. For your request #2: FsLatLonPoint IntersectDMENauticalMiles(double Bearing, FsLatLonPoint Point, Double Distance)FsLatLonPoint IntersectDMEMetres(double Bearing, FsLatLonPoint Point, Double Distance)FsLatLonPoint IntersectDMEFeet(double Bearing, FsLatLonPoint Point, Double Distance) Calculates the intersection from the current point along the Bearing to where it is the specified Distance from the other Point. Check the IsValid property of the point returned to make sure it's valid. Invalid points are generated if the bearing never goes within the specified distance of the point. Sample code: (using the method for Metres) // find where the plane (flying bearing 040) will be 1km from the VOR: FsLatLonPoint intersection2 = myPlaneLocation.IntersectDMEMetres(myBearing, vorLocation, 1000); if (intersection2.IsValid) { // Do stuff with intersection } else { // No intersection possible. The bearing never comes within 1km of the VOR } Paul FSUIPCClient3.0_BETA.zip
Delphi Posted February 16, 2015 Author Report Posted February 16, 2015 Hi Paul, how did you do that so fast? :-) Many, many thanks...... I will test it and give you a response by tomorrow afternoon. Ruediger
Delphi Posted February 17, 2015 Author Report Posted February 17, 2015 Hi Paul, today I had less spare time than expected. I could only test IntersectDMENauticalMiles. Works perfect. That exactly what I need. Tomorrow I will be out of town. The final test I will perform on Thursday. Rüdiger
Delphi Posted February 19, 2015 Author Report Posted February 19, 2015 Hi Paul, so far all my test cases worked very well. Starting now with the implementation. If I find an issue I will inform you. Thanks again... Ruediger
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now