Skip to content

Commit

Permalink
cavern: If no CORRECTIONS2, use CORRECTIONS for backsights
Browse files Browse the repository at this point in the history
The format documentation doesn't clearly say, but experimentation
shows this is what Compass itself does.
  • Loading branch information
ojwb committed Feb 29, 2024
1 parent 565c15f commit b163d7b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/datain.c
Original file line number Diff line number Diff line change
Expand Up @@ -771,8 +771,8 @@ data_file(const char *pth, const char *fnm)

if (strcmp(buffer, "CORRECTIONS") == 0 && ch == ':') {
nextch(); /* : */
pcs->z[Q_BEARING] = -rad(read_numeric(false));
pcs->z[Q_GRADIENT] = -rad(read_numeric(false));
pcs->z[Q_BACKBEARING] = pcs->z[Q_BEARING] = -rad(read_numeric(false));
pcs->z[Q_BACKGRADIENT] = pcs->z[Q_GRADIENT] = -rad(read_numeric(false));
pcs->z[Q_LENGTH] = -METRES_PER_FOOT * read_numeric(false);
get_token();
}
Expand Down
6 changes: 3 additions & 3 deletions tests/backread.dat
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ SURVEY NAME: C
SURVEY DATE: 10 13 1986 COMMENT:Test backsights
SURVEY TEAM:
Them
DECLINATION: 0 FORMAT: DDDDLRUDLADB CORRECTIONS: 0.00 0.00 0.00
DECLINATION: 0 FORMAT: DDDDLRUDLADB CORRECTIONS: 1.00 2.00 0.20

FROM TO LENGTH BEARING INC LEFT UP DOWN RIGHT BACKBEARING BACKINC FLAGS COMMENTS

C1 C2 3.281 -999 0 1 1 1 1 180 -999
C1 C3 3.281 999 0 1 1 1 1 180 999 Karst uses 999 for "no value" which Compass accepts for compatibility
C1 C2 3.081 -999 -2 1 1 1 1 179 -999
C1 C3 3.081 359 999 1 1 1 1 999 -2 Karst uses 999 for "no value" which Compass accepts for compatibility

Cave
SURVEY NAME: C
Expand Down

0 comments on commit b163d7b

Please sign in to comment.