I am looking for a function that will allow me to send 2 Lat, Longs. 1 Lat, long is my base and the second is what I want to determine if it is N,S,E, or West. Or would I have to go NW,N,NE,EN,E,ES,SE,S,SW,WS,W,WN? Either way does anyone have something like this in C#?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
First you can calculate the Great Circle Bearing
JavaScript (easily convertable to C#):
http://www.movable-type.co.uk/scripts/latlong.html
Then segment the result into the desired cardinal directions, e.g. if bearing is between -45 (315 degrees) degrees and 45 degrees it is North and so on.