From 44b3677745b372543475093a4a0842db1deed7d9 Mon Sep 17 00:00:00 2001 From: Jake Faulkner Date: Tue, 8 Sep 2026 23:13:16 +1200 Subject: [PATCH] Use along-strike length when converting the FSP strike bearing great_circle_bearing_to_nztm_bearing takes the distance shifted along the bearing being converted, but FspSegment.to_plane passed the segment's down-dip width while converting its strike. srf.py does the same conversion for a strike and correctly passes the along-strike len. The numerical effect is small -- the NZTM convergence correction varies by roughly 0.001 degrees between 5 and 60 km, being dominated by origin latitude rather than distance -- so this is a correctness and clarity fix rather than one with visible consequences. self.width remains the right distance for the dip direction a few lines below. Fixes #91 Co-Authored-By: Claude Opus 5 --- source_modelling/fsp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source_modelling/fsp.py b/source_modelling/fsp.py index 771f953..69fa58f 100644 --- a/source_modelling/fsp.py +++ b/source_modelling/fsp.py @@ -117,7 +117,7 @@ def as_plane(self) -> Plane: "Cannot convert segment to Plane: missing required attributes." ) strike_nztm = coordinates.great_circle_bearing_to_nztm_bearing( - self.top_centre, self.width, self.strike + self.top_centre, self.length, self.strike ) top_centre_nztm = coordinates.wgs_depth_to_nztm(self.top_centre) dip_dir = strike_nztm + 90