FEnigma/src/fenigma
Dominik Roth 980be86908 Fall back to a compromise point when two distance circles don't cross
Previously two distance-only clues whose circles didn't actually
intersect (real typewriter data isn't perfectly consistent, a
misplaced spotter or an off-by-a-bit distance reading is enough) just
gave up entirely, even when they were nearly touching.

solver.closest_compromise_point() picks the midpoint between each
circle's point facing the other, the standard notion of the closest
approach between two circles. It stays well-behaved even when the
centers are nearly coincident, unlike projecting along the center
line the way a real intersection's formula does, which diverges as
the centers get close while the radii stay far apart, exactly the
near-coincident case this is for.

The result is flagged rather than treated as a clean fix: Location
gained a  field, set whenever solve_location() had to use this
fallback, cleared by any subsequent coord.setter call (manual or
solver), shown in the entity's status label and toasted after a
manual clue edit. Persisted through save/load.
2026-08-08 23:56:24 +02:00
..
__init__.py Rename package/app to FeNigma consistently 2026-08-08 20:20:43 +02:00
app.py Fall back to a compromise point when two distance circles don't cross 2026-08-08 23:56:24 +02:00
ballistics.py Sweep em-dashes out of code, docstrings, and requirements.txt 2026-08-08 20:27:53 +02:00
coord_dialog.py Sweep em-dashes out of code, docstrings, and requirements.txt 2026-08-08 20:27:53 +02:00
firing_panel.py Sweep em-dashes out of code, docstrings, and requirements.txt 2026-08-08 20:27:53 +02:00
grid_widget.py Map: show scout flight's anchor grid square and bearing under its name 2026-08-08 23:43:39 +02:00
models.py Fall back to a compromise point when two distance circles don't cross 2026-08-08 23:56:24 +02:00
ocr.py OCR: support the opening calibration order's plain-prose target line 2026-08-08 22:49:44 +02:00
shells.py Sweep em-dashes out of code, docstrings, and requirements.txt 2026-08-08 20:27:53 +02:00
solver.py Fall back to a compromise point when two distance circles don't cross 2026-08-08 23:56:24 +02:00