Skip to content

Commit

Permalink
Improve cmd_declination_conv_proj_bug testcase
Browse files Browse the repository at this point in the history
Change the input coordinate system to one which doesn't given different
results depending on whether the datum grid is installed or not, which
was causing CI to fail on macOS.
  • Loading branch information
ojwb committed Feb 5, 2024
1 parent 10f69f8 commit 566f5b8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
4 changes: 2 additions & 2 deletions tests/cmd_declination_conv_proj_bug.out
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
./cmd_declination_conv_proj_bug.svx:9: info: Declination: -3.5dg @ 2005-12-15, grid convergence: 0.8dg
*declination auto 97480 72608 225
./cmd_declination_conv_proj_bug.svx:16: info: Declination: -3.5dg @ 2005-12-15, grid convergence: 0.8dg
*declination auto 562696.24 6000557.63 225

Removing trailing traverses...

Expand Down
25 changes: 16 additions & 9 deletions tests/cmd_declination_conv_proj_bug.svx
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
; pos=yes warn=0
; Reduced testcase posted by Patrick Warren to the mailing list
; The convergence was wrong by 90 degrees with PROJ < 9.3.0. Survex 1.4.6
; works around the problem. Also if *cs out was after *declination auto
; a grid convergence of 0 degrees was used - Survex 1.4.6 calculates the
; convergence lazily which happens when we read a compass reading, and
; gives an error if the output coordinate system hasn't been set by then.
*cs OSGB:SD
*declination auto 97480 72608 225
; Based on reduced testcase posted by Patrick Warren to the mailing list.
;
; The input coordinate system has been changed from OSGB:SD as that was giving
; different output on Linux and macOS depending whether the datum grid is
; installed.
;
; The convergence value was 90-v instead of v with PROJ < 9.3.0. Survex 1.4.6
; works around the problem.
;
; Also if *cs out was after *declination auto a grid convergence of 0 degrees
; was used - Survex 1.4.6 calculates the convergence lazily which happens when
; we read a compass reading, and gives an error if the output coordinate system
; hasn't been set by then.
*cs EPSG:25830
*declination auto 562696.24 6000557.63 225
*cs out EPSG:3042
*date 2005.12.15
*fix 1 97480 72608 225
*fix 1 562696.24 6000557.63 225
*data normal from to tape compass clino
1 2 25.0 000 0 ; due north, magnetic

0 comments on commit 566f5b8

Please sign in to comment.