مسافة هافرسين

يقدّر مسافة الدائرة العظمى بين إحداثيين، لا مسافة الطريق.

المدخلات: نصالنتيجة: قيمة عددية

إدخال نصي

أمثلة

One degree along the equator

One degree along the equator. The input is a small public learning fixture; it contains no private production data.

المدخلات

0, 0, 0, 1

Expected answer

Tolerance ±1.1119492664455874e-7
111194.92664455874
Quarter of the equator

Quarter of the equator. The input is a small public learning fixture; it contains no private production data.

المدخلات

0, 0, 0, 90

Expected answer

Tolerance ±0.000010007543398010283
10007543.398010284
Pole to pole

Pole to pole. The input is a small public learning fixture; it contains no private production data.

المدخلات

90, 0, -90, 0

Expected answer

Tolerance ±0.00002001508679602057
20015086.79602057
A zero-distance control

A zero-distance control. The input is a small public learning fixture; it contains no private production data.

المدخلات

51.5, -0.1, 51.5, -0.1

Expected answer

Tolerance ±1e-12
0
Cross the date line

Cross the date line. The input is a small public learning fixture; it contains no private production data.

المدخلات

0, 179.5, 0, -179.5

Expected answer

Tolerance ±1.1119492664455905e-7
111194.92664455905
Haversine distance

المدخلات

51.487263,-0.124323, 38.9517,-77.1467

Expected answer

JSON
5902542.836307819
Haversine distance, zero distance

المدخلات

51.487263,-0.124323, 51.487263,-0.124323

Expected answer

JSON
0

أدوات ذات صلة

أخرى

مرجع العملية

عرض الوثائق التقنية الأصلية (English)