From 0f9be2889809c8d2ad816616ebcaf9b39d981d8e Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Mon, 16 Nov 2026 23:11:37 +0100 Subject: core: clearer same-side feasibility message 'only 22.7x apart in the image' was ambiguous next to pixel x coordinates. State the ratio as a distance-from-center comparison with the actual pixel distances: ZUGSPITZE is 22.7 times farther from the image center than SAEULING (3398 px vs 150 px, both right of center). A pair 80.4 deg apart in azimuth needs a distance ratio of at least 140 in rectilinear mode. This looks like a panorama - switch to cylindrical mode, or place the view center between the peaks. --- crates/gipfel-core/src/lsq.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'crates/gipfel-core/src') diff --git a/crates/gipfel-core/src/lsq.rs b/crates/gipfel-core/src/lsq.rs index 5e9c28c..4e8be31 100644 --- a/crates/gipfel-core/src/lsq.rs +++ b/crates/gipfel-core/src/lsq.rs @@ -469,12 +469,14 @@ pub fn comp_params( let ratio = far.x.abs() / near.x.abs(); if ratio < min_ratio * 0.9 { return bail(format!( - "{} and {} are {:.1} deg apart in azimuth but only {:.1}x apart in the image (both {} of center); rectilinear geometry needs at least {:.0}x for a pair this wide. This looks like a panorama - switch to cylindrical mode, or place the view center between the peaks.", - near.name, + "{} is {:.1} times farther from the image center than {} ({:.0} px vs {:.0} px, both {} of center). A pair {:.1} deg apart in azimuth needs a distance ratio of at least {:.0} in rectilinear mode. This looks like a panorama - switch to cylindrical mode, or place the view center between the peaks.", far.name, - d.to_degrees(), ratio, + near.name, + far.x.abs(), + near.x.abs(), if far.x >= 0.0 { "right" } else { "left" }, + d.to_degrees(), min_ratio )); } -- cgit v1.2.3