Расстояние между двумя точками. Широта и долгота - C#
Формулировка задачи:
Можно ли рассчитать расстояние между двумя точками?
Допустим есть первая точка:
И вторая:
<LatitudeDegrees>52.4705276</LatitudeDegrees> <LongitudeDegrees>31.0407276</LongitudeDegrees>
<LatitudeDegrees>52.473259</LatitudeDegrees> <LongitudeDegrees>31.0381279</LongitudeDegrees>
Как узнать расстояние?
Находил формулы, но просто не понимаю их... Если можно пожалуйста поподробнее..Решение задачи: «Расстояние между двумя точками. Широта и долгота»
textual
Листинг программы
using System;
using System.Collections.Generic;
using System.Device.Location;
using System.Text;
namespace ConsoleApplication7
{
class Program
{
static void Main(string[] args)
{
GeoCoordinate geoLondon = new GeoCoordinate(51.3, -0.1);
GeoCoordinate geoMoskow = new GeoCoordinate(55.45, 37.36);
double distanceTo = geoLondon.GetDistanceTo(geoMoskow);
Console.WriteLine("Расстояние от Москвы до Лондона = {0:F} км.", distanceTo / 1000);
Console.ReadKey();
}
}
}