@speleotica/frcsdata 3.0.1 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/FrcsPlotFile.js +5 -1
  2. package/FrcsPlotShot.js +5 -1
  3. package/FrcsShot.d.ts +25 -4
  4. package/FrcsShot.js +4 -5
  5. package/FrcsSurveyFile.js +5 -1
  6. package/FrcsTrip.js +5 -1
  7. package/FrcsTripSummary.js +5 -1
  8. package/FrcsTripSummaryFile.js +5 -1
  9. package/es/FrcsPlotFile.js +5 -1
  10. package/es/FrcsPlotShot.js +5 -1
  11. package/es/FrcsShot.js +5 -6
  12. package/es/FrcsSurveyFile.js +5 -1
  13. package/es/FrcsTrip.js +5 -1
  14. package/es/FrcsTripSummary.js +5 -1
  15. package/es/FrcsTripSummaryFile.js +5 -1
  16. package/es/formatFrcsShot.js +75 -0
  17. package/es/formatFrcsShot.spec.js +141 -0
  18. package/es/index.js +24 -28
  19. package/es/node/index.js +2 -10
  20. package/es/node/parseFrcsPlotFile.spec.js +1 -5
  21. package/es/node/parseFrcsSurveyFile.spec.js +115 -69
  22. package/es/node/parseFrcsTripSummaryFile.spec.js +1 -5
  23. package/es/parseFrcsPlotFile.js +1 -26
  24. package/es/parseFrcsSurveyFile.js +75 -103
  25. package/es/parseFrcsTripSummaryFile.js +1 -12
  26. package/es/string/index.js +2 -9
  27. package/es/string/parseFrcsPlotFile.spec.js +1 -5
  28. package/es/string/parseFrcsSurveyFile.spec.js +205 -109
  29. package/formatFrcsShot.d.ts +3 -0
  30. package/formatFrcsShot.js +72 -0
  31. package/formatFrcsShot.spec.js +139 -0
  32. package/index.d.ts +2 -1
  33. package/index.js +24 -28
  34. package/node/index.js +1 -9
  35. package/node/parseFrcsPlotFile.spec.js +165 -180
  36. package/node/parseFrcsSurveyFile.spec.js +270 -235
  37. package/node/parseFrcsTripSummaryFile.spec.js +83 -106
  38. package/package.json +15 -15
  39. package/parseFrcsPlotFile.js +224 -318
  40. package/parseFrcsSurveyFile.js +422 -431
  41. package/parseFrcsTripSummaryFile.js +102 -142
  42. package/string/index.js +10 -27
  43. package/string/parseFrcsPlotFile.spec.js +165 -180
  44. package/string/parseFrcsSurveyFile.spec.js +545 -541
  45. package/yarn.lock +1285 -702
@@ -1,662 +1,666 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
6
-
7
5
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
8
-
9
6
  var _mocha = require("mocha");
10
-
11
7
  var _index = require("./index");
12
-
13
8
  var _unitized = require("@speleotica/unitized");
14
-
15
9
  var _chai = require("chai");
16
-
17
10
  var _FrcsShot = require("../FrcsShot");
18
-
19
11
  var _parseSegment = require("parse-segment");
20
-
21
- var data = " Fisher Ridge Cave System, Hart Co., KY\nENTRANCE DROPS, JOE'S \"I LOVE MY WIFE TRAVERSE\", TRICKY TRAVERSE\nPETER QUICK, KEITH ORTIZ - 2-15-81\nThis File has Crumps test connected. 11/20/12\n *\nFT C DD A\n AE20 0 1 3 0 2\n* %FS\n* AE20 0 0 0 Bug-can't put before so put after-so can't make 2 fixed 10/28/12\n AE19 AE20 9.3 60.0 60.0-36.0 2 12 0 20\n AE18 AE19 24.5 0.0 0.0-90.0 6 10 25 0\n AE17 AE18 8.0 350.5 350.5 17.0 3 5 0 0\n AE16 AE17 6.7 0.0 0.0-90.0 3 5 6 1\n AE15 AE16 12.6 70.5 71.0-18.0 4 0 2 1\n AE14 AE15 10.0 21.5 20.0 6.0 5 5 0 3\n AE13 AE14 26.8 288.0 286.0-50.0 0 7 20 5\n*\n*SHORT CANYON AT THE BASE OF THE SECOND DROP\n AE12 AE13 20.7 236.0 236.0 34.0 3 5 4 4\n *\nTRICKY TRAVERSE AND THEN FIRST SURVEY IN UPPER CROWLWAY\nDAN CROWL, KEITH ORTIZ, CHIP HOPPER, PETER QUICK, LARRY BEAN 14 FEB 1981\n *\nFI B DD\n A2 A1 48 10 292.0 110.0-42.0 5 10 35 5\n A3 A2 12 5 333.5 153.5 35.0 3 1 15 5\n A4 A3 4 2 0.0 0.0 90.0 3 1 10 10\n";
12
+ var data = " Fisher Ridge Cave System, Hart Co., KY\nENTRANCE DROPS, JOE'S \"I LOVE MY WIFE TRAVERSE\", TRICKY TRAVERSE\nPETER QUICK, KEITH ORTIZ - 2-15-81\nThis File has Crumps test connected. 11/20/12\n *\nFT C DD A\n AE20 0 1 3 0 2\n* %FS\n* AE20 0 0 0 Bug-can't put before so put after-so can't make 2 fixed 10/28/12\n AE19 AE20 9.3 60.0 60.0-36.0 2 12 0 20\n AE18 AE19 24.5 0.0 0.0-90.0 6 10 25 0\n AE17 AE18 8.0 350.5 350.5 17.0 3 5 0 0\n AE16 AE17 6.7 0.0 0.0-90.0 3 5 6 1\n AE15 AE16 12.6 70.5 71.0-18.0 4 0 2 1\n AE14 AE15 10.0 21.5 20.0 6.0 5 5 0 3\n AE13 AE14 26.8 288.0 286.0-50.0 0 7 20 5\n*\n*SHORT CANYON AT THE BASE OF THE SECOND DROP\n AE12 AE13 20.7 236.0 236.0 34.0 3 5 4 4\n *\nTRICKY TRAVERSE AND THEN FIRST SURVEY IN UPPER CROWLWAY\nDAN CROWL, KEITH ORTIZ, CHIP HOPPER, PETER QUICK, LARRY BEAN 14 FEB 1981\n *\nFI B DD\n A2 A1 48 10 292.0 110.0-42.0 5 10 35 5 A1 2 7 3 4.5\n A3 A2 12 5 333.5 153.5 35.0 3 1 15 5\n A4 A3 4 2 0.0 0.0 90.0 3 1 10 10\n *\nDOUG'S DEMISE (50 FT DROP), CHRIS CROSS, CRAWL ABOVE DROP\nPETER QUICK, CHRIS GERACE, PHIL ODEN, CHIP HOPPER - 3-6-81\n *\nFT C DD\n B31 B30 13.7 360.0 360.0 40.0 2 4 6 \nB30sp B30 13.7 s 360.0 360.0 40.0 2 4 6 \n";
22
13
  (0, _mocha.describe)('parseFrcsSurveyFile', function () {
23
- (0, _mocha.it)('basic test',
24
- /*#__PURE__*/
25
- (0, _asyncToGenerator2["default"])(
26
- /*#__PURE__*/
27
- _regenerator["default"].mark(function _callee() {
14
+ (0, _mocha.it)('basic test', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
28
15
  var parsed;
29
16
  return _regenerator["default"].wrap(function _callee$(_context) {
30
- while (1) {
31
- switch (_context.prev = _context.next) {
32
- case 0:
33
- _context.next = 2;
34
- return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
35
-
36
- case 2:
37
- parsed = _context.sent;
38
- (0, _chai.expect)(parsed).to.deep.equal({
39
- cave: 'Fisher Ridge Cave System',
40
- errors: [],
41
- location: 'Hart Co., KY',
42
- trips: [{
43
- header: {
44
- name: 'ENTRANCE DROPS, JOE\'S "I LOVE MY WIFE TRAVERSE", TRICKY TRAVERSE',
45
- comment: 'This File has Crumps test connected. 11/20/12',
46
- section: undefined,
47
- date: undefined,
48
- team: undefined,
49
- distanceUnit: _unitized.Length.feet,
50
- azimuthUnit: _unitized.Angle.degrees,
51
- inclinationUnit: _unitized.Angle.degrees,
52
- backsightAzimuthCorrected: true,
53
- backsightInclinationCorrected: false,
54
- hasBacksightAzimuth: true,
55
- hasBacksightInclination: false
56
- },
57
- shots: [{
58
- backsightAzimuth: null,
59
- backsightInclination: null,
60
- comment: null,
61
- distance: _unitized.Unitize.feet(0),
62
- down: _unitized.Unitize.feet(2),
63
- excludeDistance: true,
64
- from: 'AE20',
65
- frontsightAzimuth: null,
66
- frontsightInclination: null,
67
- kind: _FrcsShot.FrcsShotKind.Normal,
17
+ while (1) switch (_context.prev = _context.next) {
18
+ case 0:
19
+ _context.next = 2;
20
+ return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
21
+ case 2:
22
+ parsed = _context.sent;
23
+ (0, _chai.expect)(parsed).to.deep.equal({
24
+ cave: 'Fisher Ridge Cave System',
25
+ errors: [],
26
+ location: 'Hart Co., KY',
27
+ trips: [{
28
+ header: {
29
+ name: 'ENTRANCE DROPS, JOE\'S "I LOVE MY WIFE TRAVERSE", TRICKY TRAVERSE',
30
+ comment: 'This File has Crumps test connected. 11/20/12',
31
+ section: undefined,
32
+ date: undefined,
33
+ team: undefined,
34
+ distanceUnit: _unitized.Length.feet,
35
+ azimuthUnit: _unitized.Angle.degrees,
36
+ inclinationUnit: _unitized.Angle.degrees,
37
+ backsightAzimuthCorrected: true,
38
+ backsightInclinationCorrected: false,
39
+ hasBacksightAzimuth: true,
40
+ hasBacksightInclination: false
41
+ },
42
+ shots: [{
43
+ backsightAzimuth: null,
44
+ backsightInclination: null,
45
+ comment: null,
46
+ distance: _unitized.Unitize.feet(0),
47
+ excludeDistance: true,
48
+ from: 'AE20',
49
+ frontsightAzimuth: null,
50
+ frontsightInclination: null,
51
+ kind: _FrcsShot.FrcsShotKind.Normal,
52
+ to: null,
53
+ fromLruds: {
68
54
  left: _unitized.Unitize.feet(1),
69
55
  right: _unitized.Unitize.feet(3),
70
- to: null,
71
- up: _unitized.Unitize.feet(0)
72
- }, {
73
- from: 'AE20',
74
- to: 'AE19',
75
- kind: _FrcsShot.FrcsShotKind.Normal,
76
- distance: _unitized.Unitize.feet(9.3),
77
- frontsightAzimuth: _unitized.Unitize.degrees(60),
78
- backsightAzimuth: _unitized.Unitize.degrees(60),
79
- frontsightInclination: _unitized.Unitize.degrees(-36),
80
- backsightInclination: null,
56
+ up: _unitized.Unitize.feet(0),
57
+ down: _unitized.Unitize.feet(2)
58
+ }
59
+ }, {
60
+ from: 'AE20',
61
+ to: 'AE19',
62
+ kind: _FrcsShot.FrcsShotKind.Normal,
63
+ distance: _unitized.Unitize.feet(9.3),
64
+ frontsightAzimuth: _unitized.Unitize.degrees(60),
65
+ backsightAzimuth: _unitized.Unitize.degrees(60),
66
+ frontsightInclination: _unitized.Unitize.degrees(-36),
67
+ backsightInclination: null,
68
+ excludeDistance: false,
69
+ comment: "AE20 0 0 0 Bug-can't put before so put after-so can't make 2 fixed 10/28/12",
70
+ toLruds: {
81
71
  left: _unitized.Unitize.feet(2),
82
72
  right: _unitized.Unitize.feet(12),
83
73
  up: _unitized.Unitize.feet(0),
84
- down: _unitized.Unitize.feet(20),
85
- excludeDistance: false,
86
- comment: "AE20 0 0 0 Bug-can't put before so put after-so can't make 2 fixed 10/28/12"
87
- }, {
88
- from: 'AE19',
89
- to: 'AE18',
90
- kind: _FrcsShot.FrcsShotKind.Normal,
91
- distance: _unitized.Unitize.feet(24.5),
92
- frontsightAzimuth: _unitized.Unitize.degrees(0),
93
- backsightAzimuth: _unitized.Unitize.degrees(0),
94
- frontsightInclination: _unitized.Unitize.degrees(-90),
95
- backsightInclination: null,
74
+ down: _unitized.Unitize.feet(20)
75
+ }
76
+ }, {
77
+ from: 'AE19',
78
+ to: 'AE18',
79
+ kind: _FrcsShot.FrcsShotKind.Normal,
80
+ distance: _unitized.Unitize.feet(24.5),
81
+ frontsightAzimuth: _unitized.Unitize.degrees(0),
82
+ backsightAzimuth: _unitized.Unitize.degrees(0),
83
+ frontsightInclination: _unitized.Unitize.degrees(-90),
84
+ backsightInclination: null,
85
+ excludeDistance: false,
86
+ comment: null,
87
+ toLruds: {
96
88
  left: _unitized.Unitize.feet(6),
97
89
  right: _unitized.Unitize.feet(10),
98
90
  up: _unitized.Unitize.feet(25),
99
- down: _unitized.Unitize.feet(0),
100
- excludeDistance: false,
101
- comment: null
102
- }, {
103
- from: 'AE18',
104
- to: 'AE17',
105
- kind: _FrcsShot.FrcsShotKind.Normal,
106
- distance: _unitized.Unitize.feet(8),
107
- frontsightAzimuth: _unitized.Unitize.degrees(350.5),
108
- backsightAzimuth: _unitized.Unitize.degrees(350.5),
109
- frontsightInclination: _unitized.Unitize.degrees(17),
110
- backsightInclination: null,
91
+ down: _unitized.Unitize.feet(0)
92
+ }
93
+ }, {
94
+ from: 'AE18',
95
+ to: 'AE17',
96
+ kind: _FrcsShot.FrcsShotKind.Normal,
97
+ distance: _unitized.Unitize.feet(8),
98
+ frontsightAzimuth: _unitized.Unitize.degrees(350.5),
99
+ backsightAzimuth: _unitized.Unitize.degrees(350.5),
100
+ frontsightInclination: _unitized.Unitize.degrees(17),
101
+ backsightInclination: null,
102
+ excludeDistance: false,
103
+ comment: null,
104
+ toLruds: {
111
105
  left: _unitized.Unitize.feet(3),
112
106
  right: _unitized.Unitize.feet(5),
113
107
  up: _unitized.Unitize.feet(0),
114
- down: _unitized.Unitize.feet(0),
115
- excludeDistance: false,
116
- comment: null
117
- }, {
118
- from: 'AE17',
119
- to: 'AE16',
120
- kind: _FrcsShot.FrcsShotKind.Normal,
121
- distance: _unitized.Unitize.feet(6.7),
122
- frontsightAzimuth: _unitized.Unitize.degrees(0),
123
- backsightAzimuth: _unitized.Unitize.degrees(0),
124
- frontsightInclination: _unitized.Unitize.degrees(-90),
125
- backsightInclination: null,
108
+ down: _unitized.Unitize.feet(0)
109
+ }
110
+ }, {
111
+ from: 'AE17',
112
+ to: 'AE16',
113
+ kind: _FrcsShot.FrcsShotKind.Normal,
114
+ distance: _unitized.Unitize.feet(6.7),
115
+ frontsightAzimuth: _unitized.Unitize.degrees(0),
116
+ backsightAzimuth: _unitized.Unitize.degrees(0),
117
+ frontsightInclination: _unitized.Unitize.degrees(-90),
118
+ backsightInclination: null,
119
+ excludeDistance: false,
120
+ comment: null,
121
+ toLruds: {
126
122
  left: _unitized.Unitize.feet(3),
127
123
  right: _unitized.Unitize.feet(5),
128
124
  up: _unitized.Unitize.feet(6),
129
- down: _unitized.Unitize.feet(1),
130
- excludeDistance: false,
131
- comment: null
132
- }, {
133
- from: 'AE16',
134
- to: 'AE15',
135
- kind: _FrcsShot.FrcsShotKind.Normal,
136
- distance: _unitized.Unitize.feet(12.6),
137
- frontsightAzimuth: _unitized.Unitize.degrees(70.5),
138
- backsightAzimuth: _unitized.Unitize.degrees(71),
139
- frontsightInclination: _unitized.Unitize.degrees(-18),
140
- backsightInclination: null,
125
+ down: _unitized.Unitize.feet(1)
126
+ }
127
+ }, {
128
+ from: 'AE16',
129
+ to: 'AE15',
130
+ kind: _FrcsShot.FrcsShotKind.Normal,
131
+ distance: _unitized.Unitize.feet(12.6),
132
+ frontsightAzimuth: _unitized.Unitize.degrees(70.5),
133
+ backsightAzimuth: _unitized.Unitize.degrees(71),
134
+ frontsightInclination: _unitized.Unitize.degrees(-18),
135
+ backsightInclination: null,
136
+ excludeDistance: false,
137
+ comment: null,
138
+ toLruds: {
141
139
  left: _unitized.Unitize.feet(4),
142
140
  right: _unitized.Unitize.feet(0),
143
141
  up: _unitized.Unitize.feet(2),
144
- down: _unitized.Unitize.feet(1),
145
- excludeDistance: false,
146
- comment: null
147
- }, {
148
- from: 'AE15',
149
- to: 'AE14',
150
- kind: _FrcsShot.FrcsShotKind.Normal,
151
- distance: _unitized.Unitize.feet(10),
152
- frontsightAzimuth: _unitized.Unitize.degrees(21.5),
153
- backsightAzimuth: _unitized.Unitize.degrees(20),
154
- frontsightInclination: _unitized.Unitize.degrees(6),
155
- backsightInclination: null,
142
+ down: _unitized.Unitize.feet(1)
143
+ }
144
+ }, {
145
+ from: 'AE15',
146
+ to: 'AE14',
147
+ kind: _FrcsShot.FrcsShotKind.Normal,
148
+ distance: _unitized.Unitize.feet(10),
149
+ frontsightAzimuth: _unitized.Unitize.degrees(21.5),
150
+ backsightAzimuth: _unitized.Unitize.degrees(20),
151
+ frontsightInclination: _unitized.Unitize.degrees(6),
152
+ backsightInclination: null,
153
+ excludeDistance: false,
154
+ comment: null,
155
+ toLruds: {
156
156
  left: _unitized.Unitize.feet(5),
157
157
  right: _unitized.Unitize.feet(5),
158
158
  up: _unitized.Unitize.feet(0),
159
- down: _unitized.Unitize.feet(3),
160
- excludeDistance: false,
161
- comment: null
162
- }, {
163
- from: 'AE14',
164
- to: 'AE13',
165
- kind: _FrcsShot.FrcsShotKind.Normal,
166
- distance: _unitized.Unitize.feet(26.8),
167
- frontsightAzimuth: _unitized.Unitize.degrees(288),
168
- backsightAzimuth: _unitized.Unitize.degrees(286),
169
- frontsightInclination: _unitized.Unitize.degrees(-50),
170
- backsightInclination: null,
159
+ down: _unitized.Unitize.feet(3)
160
+ }
161
+ }, {
162
+ from: 'AE14',
163
+ to: 'AE13',
164
+ kind: _FrcsShot.FrcsShotKind.Normal,
165
+ distance: _unitized.Unitize.feet(26.8),
166
+ frontsightAzimuth: _unitized.Unitize.degrees(288),
167
+ backsightAzimuth: _unitized.Unitize.degrees(286),
168
+ frontsightInclination: _unitized.Unitize.degrees(-50),
169
+ backsightInclination: null,
170
+ excludeDistance: false,
171
+ comment: null,
172
+ toLruds: {
171
173
  left: _unitized.Unitize.feet(0),
172
174
  right: _unitized.Unitize.feet(7),
173
175
  up: _unitized.Unitize.feet(20),
174
- down: _unitized.Unitize.feet(5),
175
- excludeDistance: false,
176
- comment: null
177
- }, {
178
- from: 'AE13',
179
- to: 'AE12',
180
- kind: _FrcsShot.FrcsShotKind.Normal,
181
- distance: _unitized.Unitize.feet(20.7),
182
- frontsightAzimuth: _unitized.Unitize.degrees(236),
183
- backsightAzimuth: _unitized.Unitize.degrees(236),
184
- frontsightInclination: _unitized.Unitize.degrees(34),
185
- backsightInclination: null,
176
+ down: _unitized.Unitize.feet(5)
177
+ }
178
+ }, {
179
+ from: 'AE13',
180
+ to: 'AE12',
181
+ kind: _FrcsShot.FrcsShotKind.Normal,
182
+ distance: _unitized.Unitize.feet(20.7),
183
+ frontsightAzimuth: _unitized.Unitize.degrees(236),
184
+ backsightAzimuth: _unitized.Unitize.degrees(236),
185
+ frontsightInclination: _unitized.Unitize.degrees(34),
186
+ backsightInclination: null,
187
+ excludeDistance: false,
188
+ comment: 'SHORT CANYON AT THE BASE OF THE SECOND DROP',
189
+ toLruds: {
186
190
  left: _unitized.Unitize.feet(3),
187
191
  right: _unitized.Unitize.feet(5),
188
192
  up: _unitized.Unitize.feet(4),
189
- down: _unitized.Unitize.feet(4),
190
- excludeDistance: false,
191
- comment: 'SHORT CANYON AT THE BASE OF THE SECOND DROP'
192
- }]
193
- }, {
194
- header: {
195
- name: 'TRICKY TRAVERSE AND THEN FIRST SURVEY IN UPPER CROWLWAY',
196
- comment: null,
197
- section: undefined,
198
- date: undefined,
199
- team: undefined,
200
- distanceUnit: _unitized.Length.inches,
201
- azimuthUnit: _unitized.Angle.degrees,
202
- inclinationUnit: _unitized.Angle.degrees,
203
- backsightAzimuthCorrected: false,
204
- backsightInclinationCorrected: false,
205
- hasBacksightAzimuth: true,
206
- hasBacksightInclination: false
193
+ down: _unitized.Unitize.feet(4)
194
+ }
195
+ }]
196
+ }, {
197
+ header: {
198
+ name: 'TRICKY TRAVERSE AND THEN FIRST SURVEY IN UPPER CROWLWAY',
199
+ comment: null,
200
+ section: undefined,
201
+ date: undefined,
202
+ team: undefined,
203
+ distanceUnit: _unitized.Length.inches,
204
+ azimuthUnit: _unitized.Angle.degrees,
205
+ inclinationUnit: _unitized.Angle.degrees,
206
+ backsightAzimuthCorrected: false,
207
+ backsightInclinationCorrected: false,
208
+ hasBacksightAzimuth: true,
209
+ hasBacksightInclination: false
210
+ },
211
+ shots: [{
212
+ from: 'A1',
213
+ to: 'A2',
214
+ kind: _FrcsShot.FrcsShotKind.Normal,
215
+ distance: _unitized.Unitize.inches(48 * 12 + 10),
216
+ frontsightAzimuth: _unitized.Unitize.degrees(292),
217
+ backsightAzimuth: _unitized.Unitize.degrees(110),
218
+ frontsightInclination: _unitized.Unitize.degrees(-42),
219
+ backsightInclination: null,
220
+ excludeDistance: false,
221
+ comment: null,
222
+ fromLruds: {
223
+ left: _unitized.Unitize.feet(2),
224
+ right: _unitized.Unitize.feet(7),
225
+ up: _unitized.Unitize.feet(3),
226
+ down: _unitized.Unitize.feet(4.5)
207
227
  },
208
- shots: [{
209
- from: 'A1',
210
- to: 'A2',
211
- kind: _FrcsShot.FrcsShotKind.Normal,
212
- distance: _unitized.Unitize.inches(48 * 12 + 10),
213
- frontsightAzimuth: _unitized.Unitize.degrees(292),
214
- backsightAzimuth: _unitized.Unitize.degrees(110),
215
- frontsightInclination: _unitized.Unitize.degrees(-42),
216
- backsightInclination: null,
228
+ toLruds: {
217
229
  left: _unitized.Unitize.feet(5),
218
230
  right: _unitized.Unitize.feet(10),
219
231
  up: _unitized.Unitize.feet(35),
220
- down: _unitized.Unitize.feet(5),
221
- excludeDistance: false,
222
- comment: null
223
- }, {
224
- from: 'A2',
225
- to: 'A3',
226
- kind: _FrcsShot.FrcsShotKind.Normal,
227
- distance: _unitized.Unitize.inches(12 * 12 + 5),
228
- frontsightAzimuth: _unitized.Unitize.degrees(333.5),
229
- backsightAzimuth: _unitized.Unitize.degrees(153.5),
230
- frontsightInclination: _unitized.Unitize.degrees(35),
231
- backsightInclination: null,
232
+ down: _unitized.Unitize.feet(5)
233
+ }
234
+ }, {
235
+ from: 'A2',
236
+ to: 'A3',
237
+ kind: _FrcsShot.FrcsShotKind.Normal,
238
+ distance: _unitized.Unitize.inches(12 * 12 + 5),
239
+ frontsightAzimuth: _unitized.Unitize.degrees(333.5),
240
+ backsightAzimuth: _unitized.Unitize.degrees(153.5),
241
+ frontsightInclination: _unitized.Unitize.degrees(35),
242
+ backsightInclination: null,
243
+ excludeDistance: false,
244
+ comment: null,
245
+ toLruds: {
232
246
  left: _unitized.Unitize.feet(3),
233
247
  right: _unitized.Unitize.feet(1),
234
248
  up: _unitized.Unitize.feet(15),
235
- down: _unitized.Unitize.feet(5),
236
- excludeDistance: false,
237
- comment: null
238
- }, {
239
- from: 'A3',
240
- to: 'A4',
241
- kind: _FrcsShot.FrcsShotKind.Normal,
242
- distance: _unitized.Unitize.inches(4 * 12 + 2),
243
- frontsightAzimuth: _unitized.Unitize.degrees(0),
244
- backsightAzimuth: _unitized.Unitize.degrees(0),
245
- frontsightInclination: _unitized.Unitize.degrees(90),
246
- backsightInclination: null,
249
+ down: _unitized.Unitize.feet(5)
250
+ }
251
+ }, {
252
+ from: 'A3',
253
+ to: 'A4',
254
+ kind: _FrcsShot.FrcsShotKind.Normal,
255
+ distance: _unitized.Unitize.inches(4 * 12 + 2),
256
+ frontsightAzimuth: _unitized.Unitize.degrees(0),
257
+ backsightAzimuth: _unitized.Unitize.degrees(0),
258
+ frontsightInclination: _unitized.Unitize.degrees(90),
259
+ backsightInclination: null,
260
+ excludeDistance: false,
261
+ comment: null,
262
+ toLruds: {
247
263
  left: _unitized.Unitize.feet(3),
248
264
  right: _unitized.Unitize.feet(1),
249
265
  up: _unitized.Unitize.feet(10),
250
- down: _unitized.Unitize.feet(10),
251
- excludeDistance: false,
252
- comment: null
253
- }]
266
+ down: _unitized.Unitize.feet(10)
267
+ }
254
268
  }]
255
- });
256
-
257
- case 4:
258
- case "end":
259
- return _context.stop();
260
- }
269
+ }, {
270
+ header: {
271
+ azimuthUnit: _unitized.Angle.degrees,
272
+ backsightAzimuthCorrected: true,
273
+ backsightInclinationCorrected: false,
274
+ comment: null,
275
+ date: undefined,
276
+ distanceUnit: _unitized.Length.feet,
277
+ hasBacksightAzimuth: true,
278
+ hasBacksightInclination: false,
279
+ inclinationUnit: _unitized.Angle.degrees,
280
+ name: "DOUG'S DEMISE (50 FT DROP), CHRIS CROSS, CRAWL ABOVE DROP",
281
+ section: undefined,
282
+ team: undefined
283
+ },
284
+ shots: [{
285
+ backsightAzimuth: _unitized.Unitize.degrees(0),
286
+ backsightInclination: null,
287
+ comment: null,
288
+ distance: _unitized.Unitize.feet(13.7),
289
+ excludeDistance: false,
290
+ from: 'B30',
291
+ frontsightAzimuth: _unitized.Unitize.degrees(0),
292
+ frontsightInclination: _unitized.Unitize.degrees(40),
293
+ kind: ' ',
294
+ to: 'B31',
295
+ toLruds: {
296
+ left: _unitized.Unitize.feet(2),
297
+ right: _unitized.Unitize.feet(4),
298
+ up: _unitized.Unitize.feet(6),
299
+ down: null
300
+ }
301
+ }, {
302
+ backsightAzimuth: _unitized.Unitize.degrees(0),
303
+ backsightInclination: null,
304
+ comment: null,
305
+ distance: _unitized.Unitize.feet(13.7),
306
+ excludeDistance: true,
307
+ isSplay: true,
308
+ from: 'B30',
309
+ frontsightAzimuth: _unitized.Unitize.degrees(0),
310
+ frontsightInclination: _unitized.Unitize.degrees(40),
311
+ kind: ' ',
312
+ to: 'B30sp',
313
+ toLruds: {
314
+ left: _unitized.Unitize.feet(2),
315
+ right: _unitized.Unitize.feet(4),
316
+ up: _unitized.Unitize.feet(6),
317
+ down: null
318
+ }
319
+ }]
320
+ }]
321
+ });
322
+ case 4:
323
+ case "end":
324
+ return _context.stop();
261
325
  }
262
326
  }, _callee);
263
327
  })));
264
- (0, _mocha.it)('horizontal shots',
265
- /*#__PURE__*/
266
- (0, _asyncToGenerator2["default"])(
267
- /*#__PURE__*/
268
- _regenerator["default"].mark(function _callee2() {
328
+ (0, _mocha.it)('horizontal shots', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
269
329
  var data, parsed;
270
330
  return _regenerator["default"].wrap(function _callee2$(_context2) {
271
- while (1) {
272
- switch (_context2.prev = _context2.next) {
273
- case 0:
274
- data = "blah\n *\n *\nTEST\n *\nFT C DD\n E22 E21 36.2H 338.5 340.0 1.0 12 2 15 15\n";
275
- _context2.next = 3;
276
- return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
277
-
278
- case 3:
279
- parsed = _context2.sent;
280
- (0, _chai.expect)(parsed.trips[0].shots[0]).to.deep.equal({
281
- from: 'E21',
282
- to: 'E22',
283
- kind: _FrcsShot.FrcsShotKind.Horizontal,
284
- distance: _unitized.Unitize.feet(Math.sqrt(36.2 * 36.2 + 1)),
285
- horizontalDistance: _unitized.Unitize.feet(36.2),
286
- verticalDistance: _unitized.Unitize.feet(1),
287
- frontsightAzimuth: _unitized.Unitize.degrees(338.5),
288
- backsightAzimuth: _unitized.Unitize.degrees(340),
289
- frontsightInclination: _unitized.Angle.atan2(1, 36.2),
290
- backsightInclination: null,
331
+ while (1) switch (_context2.prev = _context2.next) {
332
+ case 0:
333
+ data = "blah\n *\n *\nTEST\n *\nFT C DD\n E22 E21 36.2H 338.5 340.0 1.0 12 2 15 15\n";
334
+ _context2.next = 3;
335
+ return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
336
+ case 3:
337
+ parsed = _context2.sent;
338
+ (0, _chai.expect)(parsed.trips[0].shots[0]).to.deep.equal({
339
+ from: 'E21',
340
+ to: 'E22',
341
+ kind: _FrcsShot.FrcsShotKind.Horizontal,
342
+ distance: _unitized.Unitize.feet(Math.sqrt(36.2 * 36.2 + 1)),
343
+ horizontalDistance: _unitized.Unitize.feet(36.2),
344
+ verticalDistance: _unitized.Unitize.feet(1),
345
+ frontsightAzimuth: _unitized.Unitize.degrees(338.5),
346
+ backsightAzimuth: _unitized.Unitize.degrees(340),
347
+ frontsightInclination: _unitized.Angle.atan2(1, 36.2),
348
+ backsightInclination: null,
349
+ excludeDistance: false,
350
+ comment: null,
351
+ toLruds: {
291
352
  left: _unitized.Unitize.feet(12),
292
353
  right: _unitized.Unitize.feet(2),
293
354
  up: _unitized.Unitize.feet(15),
294
- down: _unitized.Unitize.feet(15),
295
- excludeDistance: false,
296
- comment: null
297
- });
298
-
299
- case 5:
300
- case "end":
301
- return _context2.stop();
302
- }
355
+ down: _unitized.Unitize.feet(15)
356
+ }
357
+ });
358
+ case 5:
359
+ case "end":
360
+ return _context2.stop();
303
361
  }
304
362
  }, _callee2);
305
363
  })));
306
- (0, _mocha.it)('horizontal feet and inches shots',
307
- /*#__PURE__*/
308
- (0, _asyncToGenerator2["default"])(
309
- /*#__PURE__*/
310
- _regenerator["default"].mark(function _callee3() {
364
+ (0, _mocha.it)('horizontal feet and inches shots', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
311
365
  var data, parsed;
312
366
  return _regenerator["default"].wrap(function _callee3$(_context3) {
313
- while (1) {
314
- switch (_context3.prev = _context3.next) {
315
- case 0:
316
- data = "blah\n *\n *\nTEST\n *\nFI C DD\n A27 A26 16 9H 345.0 163.0 -1.0 0 3 5 4\n";
317
- _context3.next = 3;
318
- return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
319
-
320
- case 3:
321
- parsed = _context3.sent;
322
- (0, _chai.expect)(parsed.trips[0].shots[0]).to.deep.equal({
323
- from: 'A26',
324
- to: 'A27',
325
- kind: _FrcsShot.FrcsShotKind.Horizontal,
326
- distance: _unitized.Unitize.feet(Math.sqrt(16.75 * 16.75 + 1)),
327
- horizontalDistance: _unitized.Unitize.inches(16 * 12 + 9),
328
- verticalDistance: _unitized.Unitize.feet(-1),
329
- frontsightAzimuth: _unitized.Unitize.degrees(345),
330
- backsightAzimuth: _unitized.Unitize.degrees(163),
331
- frontsightInclination: _unitized.Angle.atan2(-1, 16.75),
332
- backsightInclination: null,
367
+ while (1) switch (_context3.prev = _context3.next) {
368
+ case 0:
369
+ data = "blah\n *\n *\nTEST\n *\nFI C DD\n A27 A26 16 9H 345.0 163.0 -1.0 0 3 5 4\n";
370
+ _context3.next = 3;
371
+ return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
372
+ case 3:
373
+ parsed = _context3.sent;
374
+ (0, _chai.expect)(parsed.trips[0].shots[0]).to.deep.equal({
375
+ from: 'A26',
376
+ to: 'A27',
377
+ kind: _FrcsShot.FrcsShotKind.Horizontal,
378
+ distance: _unitized.Unitize.feet(Math.sqrt(16.75 * 16.75 + 1)),
379
+ horizontalDistance: _unitized.Unitize.inches(16 * 12 + 9),
380
+ verticalDistance: _unitized.Unitize.feet(-1),
381
+ frontsightAzimuth: _unitized.Unitize.degrees(345),
382
+ backsightAzimuth: _unitized.Unitize.degrees(163),
383
+ frontsightInclination: _unitized.Angle.atan2(-1, 16.75),
384
+ backsightInclination: null,
385
+ excludeDistance: false,
386
+ comment: null,
387
+ toLruds: {
333
388
  left: _unitized.Unitize.feet(0),
334
389
  right: _unitized.Unitize.feet(3),
335
390
  up: _unitized.Unitize.feet(5),
336
- down: _unitized.Unitize.feet(4),
337
- excludeDistance: false,
338
- comment: null
339
- });
340
-
341
- case 5:
342
- case "end":
343
- return _context3.stop();
344
- }
391
+ down: _unitized.Unitize.feet(4)
392
+ }
393
+ });
394
+ case 5:
395
+ case "end":
396
+ return _context3.stop();
345
397
  }
346
398
  }, _callee3);
347
399
  })));
348
- (0, _mocha.it)('diagonal shots',
349
- /*#__PURE__*/
350
- (0, _asyncToGenerator2["default"])(
351
- /*#__PURE__*/
352
- _regenerator["default"].mark(function _callee4() {
400
+ (0, _mocha.it)('diagonal shots', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4() {
353
401
  var data, parsed;
354
402
  return _regenerator["default"].wrap(function _callee4$(_context4) {
355
- while (1) {
356
- switch (_context4.prev = _context4.next) {
357
- case 0:
358
- data = "blah\n *\n *\nTEST\n *\nFT C DD\n E37 E36 31.6D 231.0 232.0 2.0 3 10 20 32\n";
359
- _context4.next = 3;
360
- return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
361
-
362
- case 3:
363
- parsed = _context4.sent;
364
- (0, _chai.expect)(parsed.trips[0].shots[0]).to.deep.equal({
365
- from: 'E36',
366
- to: 'E37',
367
- kind: _FrcsShot.FrcsShotKind.Diagonal,
368
- distance: _unitized.Unitize.feet(31.6),
369
- verticalDistance: _unitized.Unitize.feet(2),
370
- frontsightAzimuth: _unitized.Unitize.degrees(231),
371
- backsightAzimuth: _unitized.Unitize.degrees(232),
372
- frontsightInclination: _unitized.Angle.asin(2 / 31.6),
373
- backsightInclination: null,
403
+ while (1) switch (_context4.prev = _context4.next) {
404
+ case 0:
405
+ data = "blah\n *\n *\nTEST\n *\nFT C DD\n E37 E36 31.6D 231.0 232.0 2.0 3 10 20 32\n";
406
+ _context4.next = 3;
407
+ return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
408
+ case 3:
409
+ parsed = _context4.sent;
410
+ (0, _chai.expect)(parsed.trips[0].shots[0]).to.deep.equal({
411
+ from: 'E36',
412
+ to: 'E37',
413
+ kind: _FrcsShot.FrcsShotKind.Diagonal,
414
+ distance: _unitized.Unitize.feet(31.6),
415
+ verticalDistance: _unitized.Unitize.feet(2),
416
+ frontsightAzimuth: _unitized.Unitize.degrees(231),
417
+ backsightAzimuth: _unitized.Unitize.degrees(232),
418
+ frontsightInclination: _unitized.Angle.asin(2 / 31.6),
419
+ backsightInclination: null,
420
+ excludeDistance: false,
421
+ comment: null,
422
+ toLruds: {
374
423
  left: _unitized.Unitize.feet(3),
375
424
  right: _unitized.Unitize.feet(10),
376
425
  up: _unitized.Unitize.feet(20),
377
- down: _unitized.Unitize.feet(32),
378
- excludeDistance: false,
379
- comment: null
380
- });
381
-
382
- case 5:
383
- case "end":
384
- return _context4.stop();
385
- }
426
+ down: _unitized.Unitize.feet(32)
427
+ }
428
+ });
429
+ case 5:
430
+ case "end":
431
+ return _context4.stop();
386
432
  }
387
433
  }, _callee4);
388
434
  })));
389
- (0, _mocha.it)('invalid distance unit',
390
- /*#__PURE__*/
391
- (0, _asyncToGenerator2["default"])(
392
- /*#__PURE__*/
393
- _regenerator["default"].mark(function _callee5() {
435
+ (0, _mocha.it)('invalid distance unit', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5() {
394
436
  var data;
395
437
  return _regenerator["default"].wrap(function _callee5$(_context5) {
396
- while (1) {
397
- switch (_context5.prev = _context5.next) {
398
- case 0:
399
- data = "blah\n *\n *\nTEST\n * \nFJ C DD\n";
400
- _context5.t0 = _chai.expect;
401
- _context5.next = 4;
402
- return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
403
-
404
- case 4:
405
- _context5.t1 = _context5.sent;
406
- _context5.t2 = {
407
- cave: 'blah',
408
- errors: [new _parseSegment.SegmentParseError('Invalid distance unit', new _parseSegment.Segment({
409
- value: 'FJ C DD',
410
- source: 'cdata.fr',
411
- startLine: 5,
412
- startCol: 0
413
- }).substring(0, 2))],
414
- location: null,
415
- trips: [{
416
- header: {
417
- azimuthUnit: _unitized.Angle.degrees,
418
- backsightAzimuthCorrected: true,
419
- backsightInclinationCorrected: false,
420
- comment: null,
421
- date: undefined,
422
- distanceUnit: _unitized.Length.feet,
423
- hasBacksightAzimuth: true,
424
- hasBacksightInclination: false,
425
- inclinationUnit: _unitized.Angle.degrees,
426
- name: 'TEST',
427
- section: undefined,
428
- team: undefined
429
- },
430
- shots: []
431
- }]
432
- };
433
- (0, _context5.t0)(_context5.t1).to.deep.equal(_context5.t2);
434
-
435
- case 7:
436
- case "end":
437
- return _context5.stop();
438
- }
438
+ while (1) switch (_context5.prev = _context5.next) {
439
+ case 0:
440
+ data = "blah\n *\n *\nTEST\n * \nFJ C DD\n";
441
+ _context5.t0 = _chai.expect;
442
+ _context5.next = 4;
443
+ return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
444
+ case 4:
445
+ _context5.t1 = _context5.sent;
446
+ (0, _context5.t0)(_context5.t1).to.deep.equal({
447
+ cave: 'blah',
448
+ errors: [new _parseSegment.SegmentParseError('Invalid distance unit', new _parseSegment.Segment({
449
+ value: 'FJ C DD',
450
+ source: 'cdata.fr',
451
+ startLine: 5,
452
+ startCol: 0
453
+ }).substring(0, 2))],
454
+ location: null,
455
+ trips: [{
456
+ header: {
457
+ azimuthUnit: _unitized.Angle.degrees,
458
+ backsightAzimuthCorrected: true,
459
+ backsightInclinationCorrected: false,
460
+ comment: null,
461
+ date: undefined,
462
+ distanceUnit: _unitized.Length.feet,
463
+ hasBacksightAzimuth: true,
464
+ hasBacksightInclination: false,
465
+ inclinationUnit: _unitized.Angle.degrees,
466
+ name: 'TEST',
467
+ section: undefined,
468
+ team: undefined
469
+ },
470
+ shots: []
471
+ }]
472
+ });
473
+ case 6:
474
+ case "end":
475
+ return _context5.stop();
439
476
  }
440
477
  }, _callee5);
441
478
  })));
442
- (0, _mocha.it)('meters',
443
- /*#__PURE__*/
444
- (0, _asyncToGenerator2["default"])(
445
- /*#__PURE__*/
446
- _regenerator["default"].mark(function _callee6() {
479
+ (0, _mocha.it)('meters', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6() {
447
480
  var data;
448
481
  return _regenerator["default"].wrap(function _callee6$(_context6) {
449
- while (1) {
450
- switch (_context6.prev = _context6.next) {
451
- case 0:
452
- data = "blah\n *\n *\nTEST\n * \nM CC DD\n E37 E36 31.6 231.0 232.0 2.0 3.0 3 10 20 32\n";
453
- _context6.t0 = _chai.expect;
454
- _context6.next = 4;
455
- return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
456
-
457
- case 4:
458
- _context6.t1 = _context6.sent;
459
- _context6.t2 = {
460
- cave: 'blah',
461
- errors: [],
462
- location: null,
463
- trips: [{
464
- header: {
465
- azimuthUnit: _unitized.Angle.degrees,
466
- backsightAzimuthCorrected: true,
467
- backsightInclinationCorrected: true,
468
- comment: null,
469
- date: undefined,
470
- distanceUnit: _unitized.Length.meters,
471
- hasBacksightAzimuth: true,
472
- hasBacksightInclination: true,
473
- inclinationUnit: _unitized.Angle.degrees,
474
- name: 'TEST',
475
- section: undefined,
476
- team: undefined
477
- },
478
- shots: [{
479
- from: 'E36',
480
- to: 'E37',
481
- kind: _FrcsShot.FrcsShotKind.Normal,
482
- distance: _unitized.Unitize.meters(31.6),
483
- frontsightAzimuth: _unitized.Unitize.degrees(231),
484
- backsightAzimuth: _unitized.Unitize.degrees(232),
485
- frontsightInclination: _unitized.Unitize.degrees(2),
486
- backsightInclination: _unitized.Unitize.degrees(3),
482
+ while (1) switch (_context6.prev = _context6.next) {
483
+ case 0:
484
+ data = "blah\n *\n *\nTEST\n * \nMT CC DD\n E37 E36 31.6 231.0 232.0 2.0 3.0 3 10 20 32\n";
485
+ _context6.t0 = _chai.expect;
486
+ _context6.next = 4;
487
+ return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
488
+ case 4:
489
+ _context6.t1 = _context6.sent;
490
+ (0, _context6.t0)(_context6.t1).to.deep.equal({
491
+ cave: 'blah',
492
+ errors: [],
493
+ location: null,
494
+ trips: [{
495
+ header: {
496
+ azimuthUnit: _unitized.Angle.degrees,
497
+ backsightAzimuthCorrected: true,
498
+ backsightInclinationCorrected: true,
499
+ comment: null,
500
+ date: undefined,
501
+ distanceUnit: _unitized.Length.meters,
502
+ hasBacksightAzimuth: true,
503
+ hasBacksightInclination: true,
504
+ inclinationUnit: _unitized.Angle.degrees,
505
+ name: 'TEST',
506
+ section: undefined,
507
+ team: undefined
508
+ },
509
+ shots: [{
510
+ from: 'E36',
511
+ to: 'E37',
512
+ kind: _FrcsShot.FrcsShotKind.Normal,
513
+ distance: _unitized.Unitize.meters(31.6),
514
+ frontsightAzimuth: _unitized.Unitize.degrees(231),
515
+ backsightAzimuth: _unitized.Unitize.degrees(232),
516
+ frontsightInclination: _unitized.Unitize.degrees(2),
517
+ backsightInclination: _unitized.Unitize.degrees(3),
518
+ excludeDistance: false,
519
+ comment: null,
520
+ toLruds: {
487
521
  left: _unitized.Unitize.meters(3),
488
522
  right: _unitized.Unitize.meters(10),
489
523
  up: _unitized.Unitize.meters(20),
490
- down: _unitized.Unitize.meters(32),
491
- excludeDistance: false,
492
- comment: null
493
- }]
524
+ down: _unitized.Unitize.meters(32)
525
+ }
494
526
  }]
495
- };
496
- (0, _context6.t0)(_context6.t1).to.deep.equal(_context6.t2);
497
-
498
- case 7:
499
- case "end":
500
- return _context6.stop();
501
- }
527
+ }]
528
+ });
529
+ case 6:
530
+ case "end":
531
+ return _context6.stop();
502
532
  }
503
533
  }, _callee6);
504
534
  })));
505
- (0, _mocha.it)('exclude length',
506
- /*#__PURE__*/
507
- (0, _asyncToGenerator2["default"])(
508
- /*#__PURE__*/
509
- _regenerator["default"].mark(function _callee7() {
535
+ (0, _mocha.it)('exclude length', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7() {
510
536
  var data, parsed;
511
537
  return _regenerator["default"].wrap(function _callee7$(_context7) {
512
- while (1) {
513
- switch (_context7.prev = _context7.next) {
514
- case 0:
515
- data = "blah\n *\n *\nTEST\n * \nM CC DD\n E37 E36 31.6 * 231.0 232.0 2.0 3.0 3 10 20 32\n";
516
- _context7.next = 3;
517
- return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
518
-
519
- case 3:
520
- parsed = _context7.sent;
521
- (0, _chai.expect)(parsed.trips[0].shots[0]).to.deep.equal({
522
- from: 'E36',
523
- to: 'E37',
524
- kind: _FrcsShot.FrcsShotKind.Normal,
525
- distance: _unitized.Unitize.meters(31.6),
526
- frontsightAzimuth: _unitized.Unitize.degrees(231),
527
- backsightAzimuth: _unitized.Unitize.degrees(232),
528
- frontsightInclination: _unitized.Unitize.degrees(2),
529
- backsightInclination: _unitized.Unitize.degrees(3),
538
+ while (1) switch (_context7.prev = _context7.next) {
539
+ case 0:
540
+ data = "blah\n *\n *\nTEST\n * \nMT CC DD\n E37 E36 31.6 * 231.0 232.0 2.0 3.0 3 10 20 32\n";
541
+ _context7.next = 3;
542
+ return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
543
+ case 3:
544
+ parsed = _context7.sent;
545
+ (0, _chai.expect)(parsed.trips[0].shots[0]).to.deep.equal({
546
+ from: 'E36',
547
+ to: 'E37',
548
+ kind: _FrcsShot.FrcsShotKind.Normal,
549
+ distance: _unitized.Unitize.meters(31.6),
550
+ frontsightAzimuth: _unitized.Unitize.degrees(231),
551
+ backsightAzimuth: _unitized.Unitize.degrees(232),
552
+ frontsightInclination: _unitized.Unitize.degrees(2),
553
+ backsightInclination: _unitized.Unitize.degrees(3),
554
+ excludeDistance: true,
555
+ comment: null,
556
+ toLruds: {
530
557
  left: _unitized.Unitize.meters(3),
531
558
  right: _unitized.Unitize.meters(10),
532
559
  up: _unitized.Unitize.meters(20),
533
- down: _unitized.Unitize.meters(32),
534
- excludeDistance: true,
535
- comment: null
536
- });
537
-
538
- case 5:
539
- case "end":
540
- return _context7.stop();
541
- }
560
+ down: _unitized.Unitize.meters(32)
561
+ }
562
+ });
563
+ case 5:
564
+ case "end":
565
+ return _context7.stop();
542
566
  }
543
567
  }, _callee7);
544
568
  })));
545
- (0, _mocha.it)('negative LRUD',
546
- /*#__PURE__*/
547
- (0, _asyncToGenerator2["default"])(
548
- /*#__PURE__*/
549
- _regenerator["default"].mark(function _callee8() {
569
+ (0, _mocha.it)('negative LRUD', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8() {
550
570
  var data, parsed;
551
571
  return _regenerator["default"].wrap(function _callee8$(_context8) {
552
- while (1) {
553
- switch (_context8.prev = _context8.next) {
554
- case 0:
555
- data = "blah\n *\n *\nTEST\n * \nM CC DD\n E37 E36 31.6 231.0 232.0 2.0 3.0 -3 10 20 32\n";
556
- _context8.next = 3;
557
- return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
558
-
559
- case 3:
560
- parsed = _context8.sent;
561
- (0, _chai.expect)(parsed.trips[0].shots[0]).to.deep.equal({
562
- from: 'E36',
563
- to: 'E37',
564
- kind: _FrcsShot.FrcsShotKind.Normal,
565
- distance: _unitized.Unitize.meters(31.6),
566
- frontsightAzimuth: _unitized.Unitize.degrees(231),
567
- backsightAzimuth: _unitized.Unitize.degrees(232),
568
- frontsightInclination: _unitized.Unitize.degrees(2),
569
- backsightInclination: _unitized.Unitize.degrees(3),
572
+ while (1) switch (_context8.prev = _context8.next) {
573
+ case 0:
574
+ data = "blah\n *\n *\nTEST\n * \nMT CC DD\n E37 E36 31.6 231.0 232.0 2.0 3.0 -3 10 20 32\n";
575
+ _context8.next = 3;
576
+ return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
577
+ case 3:
578
+ parsed = _context8.sent;
579
+ (0, _chai.expect)(parsed.trips[0].shots[0]).to.deep.equal({
580
+ from: 'E36',
581
+ to: 'E37',
582
+ kind: _FrcsShot.FrcsShotKind.Normal,
583
+ distance: _unitized.Unitize.meters(31.6),
584
+ frontsightAzimuth: _unitized.Unitize.degrees(231),
585
+ backsightAzimuth: _unitized.Unitize.degrees(232),
586
+ frontsightInclination: _unitized.Unitize.degrees(2),
587
+ backsightInclination: _unitized.Unitize.degrees(3),
588
+ excludeDistance: false,
589
+ comment: null,
590
+ toLruds: {
570
591
  left: null,
571
592
  right: _unitized.Unitize.meters(10),
572
593
  up: _unitized.Unitize.meters(20),
573
- down: _unitized.Unitize.meters(32),
574
- excludeDistance: false,
575
- comment: null
576
- });
577
-
578
- case 5:
579
- case "end":
580
- return _context8.stop();
581
- }
594
+ down: _unitized.Unitize.meters(32)
595
+ }
596
+ });
597
+ case 5:
598
+ case "end":
599
+ return _context8.stop();
582
600
  }
583
601
  }, _callee8);
584
602
  })));
585
- (0, _mocha.it)('- for no backsight',
586
- /*#__PURE__*/
587
- (0, _asyncToGenerator2["default"])(
588
- /*#__PURE__*/
589
- _regenerator["default"].mark(function _callee9() {
603
+ (0, _mocha.it)('- for no backsight', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9() {
590
604
  var data, parsed;
591
605
  return _regenerator["default"].wrap(function _callee9$(_context9) {
592
- while (1) {
593
- switch (_context9.prev = _context9.next) {
594
- case 0:
595
- data = "blah\n *\n *\nTEST\n * \nM B- DD \n ";
596
- _context9.next = 3;
597
- return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
598
-
599
- case 3:
600
- parsed = _context9.sent;
601
- (0, _chai.expect)(parsed.trips[0].header).to.deep.equal({
602
- name: 'TEST',
603
- comment: null,
604
- section: undefined,
605
- date: undefined,
606
- team: undefined,
607
- distanceUnit: _unitized.Length.meters,
608
- azimuthUnit: _unitized.Angle.degrees,
609
- inclinationUnit: _unitized.Angle.degrees,
610
- backsightAzimuthCorrected: false,
611
- backsightInclinationCorrected: false,
612
- hasBacksightAzimuth: true,
613
- hasBacksightInclination: false
614
- });
615
-
616
- case 5:
617
- case "end":
618
- return _context9.stop();
619
- }
606
+ while (1) switch (_context9.prev = _context9.next) {
607
+ case 0:
608
+ data = "blah\n *\n *\nTEST\n * \nMT B- DD \n ";
609
+ _context9.next = 3;
610
+ return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
611
+ case 3:
612
+ parsed = _context9.sent;
613
+ (0, _chai.expect)(parsed.trips[0].header).to.deep.equal({
614
+ name: 'TEST',
615
+ comment: null,
616
+ section: undefined,
617
+ date: undefined,
618
+ team: undefined,
619
+ distanceUnit: _unitized.Length.meters,
620
+ azimuthUnit: _unitized.Angle.degrees,
621
+ inclinationUnit: _unitized.Angle.degrees,
622
+ backsightAzimuthCorrected: false,
623
+ backsightInclinationCorrected: false,
624
+ hasBacksightAzimuth: true,
625
+ hasBacksightInclination: false
626
+ });
627
+ case 5:
628
+ case "end":
629
+ return _context9.stop();
620
630
  }
621
631
  }, _callee9);
622
632
  })));
623
- (0, _mocha.it)('missing both frontsight and backsight inclination',
624
- /*#__PURE__*/
625
- (0, _asyncToGenerator2["default"])(
626
- /*#__PURE__*/
627
- _regenerator["default"].mark(function _callee10() {
633
+ (0, _mocha.it)('missing both frontsight and backsight inclination', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10() {
628
634
  var data, parsed;
629
635
  return _regenerator["default"].wrap(function _callee10$(_context10) {
630
- while (1) {
631
- switch (_context10.prev = _context10.next) {
632
- case 0:
633
- data = "blah\n *\n *\nTEST\n * \nM B- DD \n E37 E36 31.6 231.0 232.0 -3 10 20 32\n ";
634
- _context10.next = 3;
635
- return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
636
-
637
- case 3:
638
- parsed = _context10.sent;
639
- (0, _chai.expect)(parsed.trips[0].shots[0]).to.deep.equal({
640
- from: 'E36',
641
- to: 'E37',
642
- kind: _FrcsShot.FrcsShotKind.Normal,
643
- distance: _unitized.Unitize.meters(31.6),
644
- frontsightAzimuth: _unitized.Unitize.degrees(231),
645
- backsightAzimuth: _unitized.Unitize.degrees(232),
646
- frontsightInclination: _unitized.Unitize.degrees(0),
647
- backsightInclination: null,
636
+ while (1) switch (_context10.prev = _context10.next) {
637
+ case 0:
638
+ data = "blah\n *\n *\nTEST\n * \nMT B- DD \n E37 E36 31.6 231.0 232.0 -3 10 20 32\n ";
639
+ _context10.next = 3;
640
+ return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
641
+ case 3:
642
+ parsed = _context10.sent;
643
+ (0, _chai.expect)(parsed.trips[0].shots[0]).to.deep.equal({
644
+ from: 'E36',
645
+ to: 'E37',
646
+ kind: _FrcsShot.FrcsShotKind.Normal,
647
+ distance: _unitized.Unitize.meters(31.6),
648
+ frontsightAzimuth: _unitized.Unitize.degrees(231),
649
+ backsightAzimuth: _unitized.Unitize.degrees(232),
650
+ frontsightInclination: _unitized.Unitize.degrees(0),
651
+ backsightInclination: null,
652
+ excludeDistance: false,
653
+ comment: null,
654
+ toLruds: {
648
655
  left: null,
649
656
  right: _unitized.Unitize.meters(10),
650
657
  up: _unitized.Unitize.meters(20),
651
- down: _unitized.Unitize.meters(32),
652
- excludeDistance: false,
653
- comment: null
654
- });
655
-
656
- case 5:
657
- case "end":
658
- return _context10.stop();
659
- }
658
+ down: _unitized.Unitize.meters(32)
659
+ }
660
+ });
661
+ case 5:
662
+ case "end":
663
+ return _context10.stop();
660
664
  }
661
665
  }, _callee10);
662
666
  })));