diff options
| author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2026-11-16 23:11:37 +0100 |
|---|---|---|
| committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2026-11-16 23:11:37 +0100 |
| commit | 0f9be2889809c8d2ad816616ebcaf9b39d981d8e (patch) | |
| tree | a17856f838609779445c812e64b410451ced6e74 /crates | |
| parent | 52084b49a323ae9a974e2787fe034a06be3ae758 (diff) | |
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.
Diffstat (limited to 'crates')
| -rw-r--r-- | crates/gipfel-core/src/lsq.rs | 8 |
1 files changed, 5 insertions, 3 deletions
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 )); } |
