Update public source

This commit is contained in:
2026-10-12 03:12:14 +03:00
parent e8baabf986
commit 0a4f3810b4
4 changed files with 90 additions and 73 deletions
+17
View File
@@ -20,6 +20,7 @@ from __future__ import annotations
import csv
import html
import math
import os
from datetime import datetime, timezone
@@ -28,6 +29,22 @@ from zoneinfo import ZoneInfo
from .config import get_timezone
def haversine_m(lat1, lon1, lat2, lon2):
radius = 6371000.0
phi1 = math.radians(lat1)
phi2 = math.radians(lat2)
dphi = math.radians(lat2 - lat1)
dlambda = math.radians(lon2 - lon1)
a = (
math.sin(dphi / 2.0) ** 2
+ math.cos(phi1)
* math.cos(phi2)
* math.sin(dlambda / 2.0) ** 2
)
return 2.0 * radius * math.asin(min(1.0, math.sqrt(a)))
# ============================================================
# HTML