Or login with:
| doubleangularDistance( | const Position& | start | |
| const Position& | end | ) |
#include <stdio.h> #include <codecogs/maths/geometry/spherical/angularDistance.h> int main() { Position start(10,-90); Position end(45,20); printf("Angular Distance in Radians = %lf", angularDistance(start, end)); return 0; }Output:
Angular Distance in Radians = 1.686437Source code is available when you agree to a GP Licence or buy a Commercial Licence.
Not a member, then Register with CodeCogs. Already a Member, then Login.
| doubledistance( | const Position& | start | |
| const Position& | end | ||
| double | radToDist = 3437.7475 | ) |
| Description | radToDist |
| Nautical Mile on Earth | 3437.7475 knots/radian |
| Miles on Earth | 3956.0881 miles/radian |
| kilometers on Earth | 6366.7070 km/radian |
#include <stdio.h> #include <codecogs/maths/geometry/spherical/angulardistance.h> int main() { Position start(10,-90); Position end(45,20); printf("\nKnots = %lf", distance(start, end)); printf("\nMiles = %lf", distance(start, end, 3956.0881)); return 0; }Output:
Knots = 5797.543498 Miles = 6671.692101
| start | the first Position [Latitude, Longitude]. |
| end | the second Position [latitude, Longitude]. |
| radToDist | Default Value = 3437.7475 |
Source code is available when you agree to a GP Licence or buy a Commercial Licence.
Not a member, then Register with CodeCogs. Already a Member, then Login.
You must login to leave a messge