Exemplo n.º 1
0
        public void CalculateLoxodromicCourse(double lat1, double lon1, double lat2, double lon2, double distance)
        {
            var calculator = new SpheroidCalculator(Spheroid.Wgs84);
            var result     = calculator.CalculateLoxodromicLine(new Point(lat1, lon1), new Point(lat2, lon2));

            Assert.That(result.Bearing12, Is.EqualTo(distance).Within(Millionth));
        }
Exemplo n.º 2
0
        public void CalculateLoxodromicLineDistance(double lat1, double lon1, double lat2, double lon2, double distance)
        {
            var calculator = new SpheroidCalculator(Spheroid.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));
        }