diff options
| author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2026-11-12 22:33:02 +0100 |
|---|---|---|
| committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2026-11-12 22:33:02 +0100 |
| commit | c2834deb56723838dd8b63844b70931437eaf437 (patch) | |
| tree | d414d64d31dcd4fbb622fc2a07385733bacf3e25 /wipfel-droid/gradlew | |
| parent | 23278ebd6df3e71c7e766ee84e6571e8091f858a (diff) | |
core: fix fit when north lies between the two markers
With markers at e.g. 350 deg and 10 deg the raw azimuth difference is
340 deg instead of 20 deg. Two places choked on that:
* ProjArgs::from_params fed the raw difference into the projection
formulas. The cylindrical projection uses it LINEARLY
(x = scale * (m_view - c_view)), so the 350 deg peak was projected
350 degrees of scale to the right of center instead of 10 degrees to
the left - no parameter set can satisfy both markers and the
panorama-mode fit fails. The rectilinear projection is periodic and
unaffected. Fix: represent m_view as c_view + wrapped difference, so
every consumer (fit residuals, Jacobian, project_point) sees the
shortest arc. get_coordinates already normalized for exactly this
reason; the fit path bypassed it.
* comp_params derived the initial scale from |d_alph| = 340 deg, an
initial scale off by a factor of 17 - this hit rectilinear mode too.
Use the wrapped difference.
Regression tests: two-marker fits across north for both projections
(the cylindrical one fails without the fix), plus a direct check that
a 350 deg peak projects to -10 deg * scale.
Diffstat (limited to 'wipfel-droid/gradlew')
0 files changed, 0 insertions, 0 deletions
