47fac22230
- .claude/CLAUDE.md - .claude/commands/subagentes.md - .claude/rules/INDEX.md - .mcp.json - bash/functions/cybersecurity/analyze_dns.md - bash/functions/cybersecurity/audit_http_headers.md - bash/functions/cybersecurity/audit_ssh_config.md - bash/functions/cybersecurity/check_firewall.md - bash/functions/cybersecurity/detect_suspicious_users.md - bash/functions/cybersecurity/encrypt_file.md - ... Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1.5 KiB
1.5 KiB
id, name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, example, tested, tests, test_file_path, file_path, params, output, source_repo, source_license, source_file
| id | name | kind | lang | domain | version | purity | signature | description | tags | uses_functions | uses_types | returns | returns_optional | error_type | imports | example | tested | tests | test_file_path | file_path | params | output | source_repo | source_license | source_file | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| haversine_km_py_geo | haversine_km | function | py | geo | 1.0.0 | pure | haversine_km(lon1: float, lat1: float, lon2: float, lat2: float) -> float | Calcula la distancia en kilometros entre dos puntos lon/lat usando la formula de Haversine con R=6371.0. |
|
false |
|
from geo.haversine_km import haversine_km d = haversine_km(-3.7038, 40.4168, 2.1686, 41.3874) # Madrid -> Barcelona ~504 km | true |
|
python/functions/geo/tests/test_haversine_km.py | python/functions/geo/haversine_km.py |
|
distancia en kilometros entre los dos puntos | internal:footprint_aurgi | internal-aurgi | zonas_mapas_aurgi/backend/app.py:668 |
Ejemplo
from geo.haversine_km import haversine_km
d = haversine_km(-3.7038, 40.4168, 2.1686, 41.3874)
# d ≈ 504.0 km
Notas
Funcion pura. Usa R=6371.0 km (radio medio de la Tierra). No maneja NaN ni Inf.