This object has been designed for speed and memory usage to offer a minimal handling of a Latitude and Longitude geographical coordinate, it simply stores the coordinate in the form of decimal Degrees, Minutes and Seconds (DMS) over two properties named Latitude and Longitude. It is cut down and only offers some form of validation in the constructor but developers are expected to use the GeoCoordinate object as this offers more functionality and error checking plus it uses this object within to store the lat/long coordinate; the larger GeoCoordinate will be explored in more detail in a future blog.
There are two useful methods to allow for calculations with geographical coordinates and these are based around the FAA documentation of formula. These are:
1 – WGS84Distance(GeoCoordinateBasic)
This method will compute the distance between two GeoCoordinateBasic objects and also report back the forward and reverse azimuths using the GeoAzimuthDistance object
2 – WGS84Destination(CompassBearing, LinearDistance)
This method will derive through calculation a Latitude/Longitude coordinate based on point, a compass bearing and a distance to travel. A simple example would be as follows where geoCoordinateBasic is the result and baseGeoCoordinate is the starting point.
GeoCoordinateBasic geoCoordinateBasic = baseGeoCoordinate.GeoCoordinateBasic.WGS84Destination(azimuth, distanceNm);
Further methods will be added in the future and if you have any questions or would like to see new features or improvements then please make contact.
This object is subject to many unit test cases taken from the FAA documentation and also from ICAO and we allow access to the test environment for you to validation and make sure the calculations are working.
Below is a screen shot of the internal test case for constructors of this object: