summaryrefslogtreecommitdiff
path: root/crates/gipfel-core/src/panorama.rs
AgeCommit message (Collapse)Author
8 dayscore: consolidate the three ad-hoc azimuth wraps into wrap_angleJohannes Hofmann
ProjArgs::from_params now normalizes the mountain azimuth centrally, so the two remaining hand-rolled wraps are redundant: * get_coordinates dropped its single-step +/-2pi normalization (a leftover of the C++ original that could not even handle azimuths more than one full turn off); from_params covers it strictly more generally. * is_visible's abs-mod-fold became one wrap_angle call. The explicit is_finite guard stays (wrap_angle's NaN would silently pass the >= view_angle test when max_view_angle is 0). No behavior change: 35 core + 13 golden tests, including the Finding 1 regression test and all north/wide-panorama tests, pass unmodified.
10 daysMerge branch 'wasm-spike'Johannes Hofmann
# Conflicts: # crates/gipfel-core/src/metadata.rs
10 dayscore: is_visible wraps the azimuth difference and rejects non-finite inputJohannes Hofmann
GipfelFind.lean Finding 1: with |alph - a_center| > 2pi (user enters azimuth 400deg, or a fit leaves a_center unnormalized) the single fold produced a NEGATIVE 'distance' that passed every comparison, making hills behind the camera visible. NaN or infinite azimuths — and a NaN center, which made everything visible — passed as well. Fix at the point of use: wrap with % 2pi before the fold, and bail out on non-finite alph/a_center. Regression test pins the Lean witnesses (out_of_range_center_angle_stays_safe).
2026-10-30cli: -V flag; restricted export ignores occlusion; web visibility knobJohannes Hofmann
- gipfel-cli export-hills gains -V <ratio> (the visibility/prominence threshold, C default 0.07); default unchanged - export_hill_rows: restricted mode (-e, curated lists like the gipfelweb photo index) no longer drops FLAG_HIDDEN entries. The occlusion heuristic is for thinning the full peak database; a curated photo list should show every entry inside the field of view. Unrestricted export (golden-pinned) unchanged. - gipfelweb Makefile: V ?= 0.05 knob for the peak view, -V 0 for the photo index; per-image %.opts now appended after the standard flags (they were placed before the subcommand and silently ignored)
2026-10-27wasm: experimental browser spikeJohannes Hofmann
Proves the gipfel core can run in the browser via WASM. Enabled by the earlier GSL removal: the core is now pure Rust. gipfel-core gains byte-oriented entry points (no filesystem) alongside the existing path-based ones: - hill::load_from_bytes, Panorama::load_data_from_bytes - metadata: load_image_from_bytes, read_jpeg_comment_from_bytes, write_jpeg_comment_to_bytes, save_image_to_bytes (EXIF via Cursor) New crate gipfel-wasm (experimental, not shipped with the app): - wasm-bindgen surface: version() + fit_demo(db_bytes, jpg_bytes) which runs the whole pipeline in memory: parse hill DB, read gipfel JPEG comment / EXIF, synthesize 5 observations from visible hills, perturb, refit (pure-Rust LM), report JSON with reprojection error - demo/index.html: file pickers + result pane (wasm-pack --target web) - build.sh: adds the wasm target, builds with wasm-pack, prints serve cmd - native test runs the same pipeline against gipfel.dat + test.jpg and asserts sub-pixel reprojection error (passes here) To try on a machine with rustup: cd crates/gipfel-wasm && ./build.sh
2026-10-26Replace the C++ implementation with the Rust portJohannes Hofmann
The Rust port (formerly gipfel-rs) is now the official successor to the FLTK/GSL C++ code base. This squashes the port into a single commit and removes the C++ sources (they remain in the git history below). Layout: crates/gipfel-core headless core: hills, panorama geometry, projections (maxima-generated derivatives), pure-Rust LM fit, gipfel: JPEG comment + EXIF I/O, profiles, stitching crates/gipfel-cli command-line tools (export, info, stitch, profiles) crates/gipfel-app Cosmic DE (libcosmic) GUI, binary name `gipfel` codegen/ maxima scripts + regen.sh for the projection code tests/ golden files + C++ reference harnesses (historical) The original README is kept for now; it will be updated to describe the Rust build. gipfel.dat, AUTHORS, ChangeLog and NEWS are unchanged.