mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-26 14:58:12 +00:00
A very elongated trail (lat_span << lon_span or vice-versa) shares an isotropic scale, so the visible window in the *short* direction can span many grid_m. The previous code computed lat_n / lon_n once and bailed with `return` if either exceeded 40 — leaving the user with no grid at all on east-west or north-south runs. Now: after picking the initial step via the MIN_GRID_PX and shorter/2 loops, also bump the step up further until both lat_n and lon_n fit within MAX_GRID_LINES (40). Falls back to `return` only if even the largest STEPS[] entry (100 km) can't produce a small-enough grid — which shouldn't happen in practice on terrestrial trails. Also fixed: comment claimed "~4 intervals across shorter dim" while the code divides by 3.0f. Updated to "~3 intervals" to match. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>