public void CalculateLoxodromicCourse(double lat1, double lon1, double lat2, double lon2, double distance) { var calculator = SpheroidCalculator.Wgs84(); var result = calculator.CalculateLoxodromicLine(new Point(lat1, lon1), new Point(lat2, lon2)); Assert.That(result.Bearing12, Is.EqualTo(distance).Within(Millionth)); }
public void CalculateLoxodromicLineDistance(double lat1, double lon1, double lat2, double lon2, double distance) { var calculator = SpheroidCalculator.Wgs84(); var result = calculator.CalculateLoxodromicLine(new Point(lat1, lon1), new Point(lat2, lon2)); Assert.That(result.Distance.ConvertTo(DistanceUnit.Nm).Value, Is.EqualTo(distance).Within(Millionth)); }
public void MeridionalDistance(double latitude, double parts) { var calculator = SpheroidCalculator.Wgs84(); var result = calculator.CalculateMeridionalDistance(latitude); Assert.That(result.ConvertTo(DistanceUnit.Nm), Is.EqualTo(parts).Within(Millionth)); }
public void MeridionalParts(double latitude, double parts) { var calculator = SpheroidCalculator.Wgs84(); var result = calculator.CalculateMeridionalParts(latitude); Assert.That(result, Is.EqualTo(parts).Within(Millionth)); }
public void CalculateOrthodromicDestination(double lat1, double lon1, double angle, double distance, double lat2, double lon2) { var calculator = SpheroidCalculator.Wgs84(); var result = calculator.CalculateOrthodromicLine(new Point(lat1, lon1), angle, new Distance(distance, DistanceUnit.Nm).SiValue); Assert.That(result.Coordinate2.Latitude, Is.EqualTo(lat2).Within(Millionth)); Assert.That(result.Coordinate2.Longitude, Is.EqualTo(lon2).Within(Millionth)); }
public GeoContext() { GeodeticCalculator = SpheroidCalculator.Wgs84(); EqualityOptions = new SpatialEqualityOptions(); LongitudeWrapping = false; }