@speleotica/frcsdata 4.0.0 → 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 (42) hide show
  1. package/FrcsPlotFile.js +5 -1
  2. package/FrcsPlotShot.js +5 -1
  3. package/FrcsShot.js +4 -5
  4. package/FrcsSurveyFile.js +5 -1
  5. package/FrcsTrip.js +5 -1
  6. package/FrcsTripSummary.js +5 -1
  7. package/FrcsTripSummaryFile.js +5 -1
  8. package/es/FrcsPlotFile.js +5 -1
  9. package/es/FrcsPlotShot.js +5 -1
  10. package/es/FrcsShot.js +5 -6
  11. package/es/FrcsSurveyFile.js +5 -1
  12. package/es/FrcsTrip.js +5 -1
  13. package/es/FrcsTripSummary.js +5 -1
  14. package/es/FrcsTripSummaryFile.js +5 -1
  15. package/es/formatFrcsShot.js +5 -19
  16. package/es/formatFrcsShot.spec.js +8 -17
  17. package/es/index.js +21 -33
  18. package/es/node/index.js +2 -10
  19. package/es/node/parseFrcsPlotFile.spec.js +1 -5
  20. package/es/node/parseFrcsSurveyFile.spec.js +2 -6
  21. package/es/node/parseFrcsTripSummaryFile.spec.js +1 -5
  22. package/es/parseFrcsPlotFile.js +1 -26
  23. package/es/parseFrcsSurveyFile.js +45 -95
  24. package/es/parseFrcsTripSummaryFile.js +1 -12
  25. package/es/string/index.js +2 -9
  26. package/es/string/parseFrcsPlotFile.spec.js +1 -5
  27. package/es/string/parseFrcsSurveyFile.spec.js +8 -14
  28. package/formatFrcsShot.js +5 -19
  29. package/formatFrcsShot.spec.js +4 -15
  30. package/index.js +20 -32
  31. package/node/index.js +1 -9
  32. package/node/parseFrcsPlotFile.spec.js +165 -180
  33. package/node/parseFrcsSurveyFile.spec.js +306 -321
  34. package/node/parseFrcsTripSummaryFile.spec.js +83 -106
  35. package/package.json +15 -15
  36. package/parseFrcsPlotFile.js +224 -318
  37. package/parseFrcsSurveyFile.js +411 -452
  38. package/parseFrcsTripSummaryFile.js +102 -142
  39. package/string/index.js +10 -27
  40. package/string/parseFrcsPlotFile.spec.js +165 -180
  41. package/string/parseFrcsSurveyFile.spec.js +598 -689
  42. package/yarn.lock +1285 -702
@@ -1,757 +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
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
- excludeDistance: true,
63
- from: 'AE20',
64
- frontsightAzimuth: null,
65
- frontsightInclination: null,
66
- kind: _FrcsShot.FrcsShotKind.Normal,
67
- to: null,
68
- fromLruds: {
69
- left: _unitized.Unitize.feet(1),
70
- right: _unitized.Unitize.feet(3),
71
- up: _unitized.Unitize.feet(0),
72
- down: _unitized.Unitize.feet(2)
73
- }
74
- }, {
75
- from: 'AE20',
76
- to: 'AE19',
77
- kind: _FrcsShot.FrcsShotKind.Normal,
78
- distance: _unitized.Unitize.feet(9.3),
79
- frontsightAzimuth: _unitized.Unitize.degrees(60),
80
- backsightAzimuth: _unitized.Unitize.degrees(60),
81
- frontsightInclination: _unitized.Unitize.degrees(-36),
82
- backsightInclination: null,
83
- excludeDistance: false,
84
- comment: "AE20 0 0 0 Bug-can't put before so put after-so can't make 2 fixed 10/28/12",
85
- toLruds: {
86
- left: _unitized.Unitize.feet(2),
87
- right: _unitized.Unitize.feet(12),
88
- up: _unitized.Unitize.feet(0),
89
- down: _unitized.Unitize.feet(20)
90
- }
91
- }, {
92
- from: 'AE19',
93
- to: 'AE18',
94
- kind: _FrcsShot.FrcsShotKind.Normal,
95
- distance: _unitized.Unitize.feet(24.5),
96
- frontsightAzimuth: _unitized.Unitize.degrees(0),
97
- backsightAzimuth: _unitized.Unitize.degrees(0),
98
- frontsightInclination: _unitized.Unitize.degrees(-90),
99
- backsightInclination: null,
100
- excludeDistance: false,
101
- comment: null,
102
- toLruds: {
103
- left: _unitized.Unitize.feet(6),
104
- right: _unitized.Unitize.feet(10),
105
- up: _unitized.Unitize.feet(25),
106
- down: _unitized.Unitize.feet(0)
107
- }
108
- }, {
109
- from: 'AE18',
110
- to: 'AE17',
111
- kind: _FrcsShot.FrcsShotKind.Normal,
112
- distance: _unitized.Unitize.feet(8),
113
- frontsightAzimuth: _unitized.Unitize.degrees(350.5),
114
- backsightAzimuth: _unitized.Unitize.degrees(350.5),
115
- frontsightInclination: _unitized.Unitize.degrees(17),
116
- backsightInclination: null,
117
- excludeDistance: false,
118
- comment: null,
119
- toLruds: {
120
- left: _unitized.Unitize.feet(3),
121
- right: _unitized.Unitize.feet(5),
122
- up: _unitized.Unitize.feet(0),
123
- down: _unitized.Unitize.feet(0)
124
- }
125
- }, {
126
- from: 'AE17',
127
- to: 'AE16',
128
- kind: _FrcsShot.FrcsShotKind.Normal,
129
- distance: _unitized.Unitize.feet(6.7),
130
- frontsightAzimuth: _unitized.Unitize.degrees(0),
131
- backsightAzimuth: _unitized.Unitize.degrees(0),
132
- frontsightInclination: _unitized.Unitize.degrees(-90),
133
- backsightInclination: null,
134
- excludeDistance: false,
135
- comment: null,
136
- toLruds: {
137
- left: _unitized.Unitize.feet(3),
138
- right: _unitized.Unitize.feet(5),
139
- up: _unitized.Unitize.feet(6),
140
- down: _unitized.Unitize.feet(1)
141
- }
142
- }, {
143
- from: 'AE16',
144
- to: 'AE15',
145
- kind: _FrcsShot.FrcsShotKind.Normal,
146
- distance: _unitized.Unitize.feet(12.6),
147
- frontsightAzimuth: _unitized.Unitize.degrees(70.5),
148
- backsightAzimuth: _unitized.Unitize.degrees(71),
149
- frontsightInclination: _unitized.Unitize.degrees(-18),
150
- backsightInclination: null,
151
- excludeDistance: false,
152
- comment: null,
153
- toLruds: {
154
- left: _unitized.Unitize.feet(4),
155
- right: _unitized.Unitize.feet(0),
156
- up: _unitized.Unitize.feet(2),
157
- down: _unitized.Unitize.feet(1)
158
- }
159
- }, {
160
- from: 'AE15',
161
- to: 'AE14',
162
- kind: _FrcsShot.FrcsShotKind.Normal,
163
- distance: _unitized.Unitize.feet(10),
164
- frontsightAzimuth: _unitized.Unitize.degrees(21.5),
165
- backsightAzimuth: _unitized.Unitize.degrees(20),
166
- frontsightInclination: _unitized.Unitize.degrees(6),
167
- backsightInclination: null,
168
- excludeDistance: false,
169
- comment: null,
170
- toLruds: {
171
- left: _unitized.Unitize.feet(5),
172
- right: _unitized.Unitize.feet(5),
173
- up: _unitized.Unitize.feet(0),
174
- down: _unitized.Unitize.feet(3)
175
- }
176
- }, {
177
- from: 'AE14',
178
- to: 'AE13',
179
- kind: _FrcsShot.FrcsShotKind.Normal,
180
- distance: _unitized.Unitize.feet(26.8),
181
- frontsightAzimuth: _unitized.Unitize.degrees(288),
182
- backsightAzimuth: _unitized.Unitize.degrees(286),
183
- frontsightInclination: _unitized.Unitize.degrees(-50),
184
- backsightInclination: null,
185
- excludeDistance: false,
186
- comment: null,
187
- toLruds: {
188
- left: _unitized.Unitize.feet(0),
189
- right: _unitized.Unitize.feet(7),
190
- up: _unitized.Unitize.feet(20),
191
- down: _unitized.Unitize.feet(5)
192
- }
193
- }, {
194
- from: 'AE13',
195
- to: 'AE12',
196
- kind: _FrcsShot.FrcsShotKind.Normal,
197
- distance: _unitized.Unitize.feet(20.7),
198
- frontsightAzimuth: _unitized.Unitize.degrees(236),
199
- backsightAzimuth: _unitized.Unitize.degrees(236),
200
- frontsightInclination: _unitized.Unitize.degrees(34),
201
- backsightInclination: null,
202
- excludeDistance: false,
203
- comment: 'SHORT CANYON AT THE BASE OF THE SECOND DROP',
204
- toLruds: {
205
- left: _unitized.Unitize.feet(3),
206
- right: _unitized.Unitize.feet(5),
207
- up: _unitized.Unitize.feet(4),
208
- down: _unitized.Unitize.feet(4)
209
- }
210
- }]
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: {
54
+ left: _unitized.Unitize.feet(1),
55
+ right: _unitized.Unitize.feet(3),
56
+ up: _unitized.Unitize.feet(0),
57
+ down: _unitized.Unitize.feet(2)
58
+ }
211
59
  }, {
212
- header: {
213
- name: 'TRICKY TRAVERSE AND THEN FIRST SURVEY IN UPPER CROWLWAY',
214
- comment: null,
215
- section: undefined,
216
- date: undefined,
217
- team: undefined,
218
- distanceUnit: _unitized.Length.inches,
219
- azimuthUnit: _unitized.Angle.degrees,
220
- inclinationUnit: _unitized.Angle.degrees,
221
- backsightAzimuthCorrected: false,
222
- backsightInclinationCorrected: false,
223
- hasBacksightAzimuth: true,
224
- hasBacksightInclination: false
225
- },
226
- shots: [{
227
- from: 'A1',
228
- to: 'A2',
229
- kind: _FrcsShot.FrcsShotKind.Normal,
230
- distance: _unitized.Unitize.inches(48 * 12 + 10),
231
- frontsightAzimuth: _unitized.Unitize.degrees(292),
232
- backsightAzimuth: _unitized.Unitize.degrees(110),
233
- frontsightInclination: _unitized.Unitize.degrees(-42),
234
- backsightInclination: null,
235
- excludeDistance: false,
236
- comment: null,
237
- fromLruds: {
238
- left: _unitized.Unitize.feet(2),
239
- right: _unitized.Unitize.feet(7),
240
- up: _unitized.Unitize.feet(3),
241
- down: _unitized.Unitize.feet(4.5)
242
- },
243
- toLruds: {
244
- left: _unitized.Unitize.feet(5),
245
- right: _unitized.Unitize.feet(10),
246
- up: _unitized.Unitize.feet(35),
247
- down: _unitized.Unitize.feet(5)
248
- }
249
- }, {
250
- from: 'A2',
251
- to: 'A3',
252
- kind: _FrcsShot.FrcsShotKind.Normal,
253
- distance: _unitized.Unitize.inches(12 * 12 + 5),
254
- frontsightAzimuth: _unitized.Unitize.degrees(333.5),
255
- backsightAzimuth: _unitized.Unitize.degrees(153.5),
256
- frontsightInclination: _unitized.Unitize.degrees(35),
257
- backsightInclination: null,
258
- excludeDistance: false,
259
- comment: null,
260
- toLruds: {
261
- left: _unitized.Unitize.feet(3),
262
- right: _unitized.Unitize.feet(1),
263
- up: _unitized.Unitize.feet(15),
264
- down: _unitized.Unitize.feet(5)
265
- }
266
- }, {
267
- from: 'A3',
268
- to: 'A4',
269
- kind: _FrcsShot.FrcsShotKind.Normal,
270
- distance: _unitized.Unitize.inches(4 * 12 + 2),
271
- frontsightAzimuth: _unitized.Unitize.degrees(0),
272
- backsightAzimuth: _unitized.Unitize.degrees(0),
273
- frontsightInclination: _unitized.Unitize.degrees(90),
274
- backsightInclination: null,
275
- excludeDistance: false,
276
- comment: null,
277
- toLruds: {
278
- left: _unitized.Unitize.feet(3),
279
- right: _unitized.Unitize.feet(1),
280
- up: _unitized.Unitize.feet(10),
281
- down: _unitized.Unitize.feet(10)
282
- }
283
- }]
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: {
71
+ left: _unitized.Unitize.feet(2),
72
+ right: _unitized.Unitize.feet(12),
73
+ up: _unitized.Unitize.feet(0),
74
+ down: _unitized.Unitize.feet(20)
75
+ }
284
76
  }, {
285
- header: {
286
- azimuthUnit: _unitized.Angle.degrees,
287
- backsightAzimuthCorrected: true,
288
- backsightInclinationCorrected: false,
289
- comment: null,
290
- date: undefined,
291
- distanceUnit: _unitized.Length.feet,
292
- hasBacksightAzimuth: true,
293
- hasBacksightInclination: false,
294
- inclinationUnit: _unitized.Angle.degrees,
295
- name: "DOUG'S DEMISE (50 FT DROP), CHRIS CROSS, CRAWL ABOVE DROP",
296
- section: undefined,
297
- team: undefined
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: {
88
+ left: _unitized.Unitize.feet(6),
89
+ right: _unitized.Unitize.feet(10),
90
+ up: _unitized.Unitize.feet(25),
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: {
105
+ left: _unitized.Unitize.feet(3),
106
+ right: _unitized.Unitize.feet(5),
107
+ up: _unitized.Unitize.feet(0),
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: {
122
+ left: _unitized.Unitize.feet(3),
123
+ right: _unitized.Unitize.feet(5),
124
+ up: _unitized.Unitize.feet(6),
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: {
139
+ left: _unitized.Unitize.feet(4),
140
+ right: _unitized.Unitize.feet(0),
141
+ up: _unitized.Unitize.feet(2),
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
+ left: _unitized.Unitize.feet(5),
157
+ right: _unitized.Unitize.feet(5),
158
+ up: _unitized.Unitize.feet(0),
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: {
173
+ left: _unitized.Unitize.feet(0),
174
+ right: _unitized.Unitize.feet(7),
175
+ up: _unitized.Unitize.feet(20),
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: {
190
+ left: _unitized.Unitize.feet(3),
191
+ right: _unitized.Unitize.feet(5),
192
+ up: _unitized.Unitize.feet(4),
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)
298
227
  },
299
- shots: [{
300
- backsightAzimuth: _unitized.Unitize.degrees(0),
301
- backsightInclination: null,
302
- comment: null,
303
- distance: _unitized.Unitize.feet(13.7),
304
- excludeDistance: false,
305
- from: 'B30',
306
- frontsightAzimuth: _unitized.Unitize.degrees(0),
307
- frontsightInclination: _unitized.Unitize.degrees(40),
308
- kind: ' ',
309
- to: 'B31',
310
- toLruds: {
311
- left: _unitized.Unitize.feet(2),
312
- right: _unitized.Unitize.feet(4),
313
- up: _unitized.Unitize.feet(6),
314
- down: null
315
- }
316
- }, {
317
- backsightAzimuth: _unitized.Unitize.degrees(0),
318
- backsightInclination: null,
319
- comment: null,
320
- distance: _unitized.Unitize.feet(13.7),
321
- excludeDistance: true,
322
- isSplay: true,
323
- from: 'B30',
324
- frontsightAzimuth: _unitized.Unitize.degrees(0),
325
- frontsightInclination: _unitized.Unitize.degrees(40),
326
- kind: ' ',
327
- to: 'B30sp',
328
- toLruds: {
329
- left: _unitized.Unitize.feet(2),
330
- right: _unitized.Unitize.feet(4),
331
- up: _unitized.Unitize.feet(6),
332
- down: null
333
- }
334
- }]
228
+ toLruds: {
229
+ left: _unitized.Unitize.feet(5),
230
+ right: _unitized.Unitize.feet(10),
231
+ up: _unitized.Unitize.feet(35),
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: {
246
+ left: _unitized.Unitize.feet(3),
247
+ right: _unitized.Unitize.feet(1),
248
+ up: _unitized.Unitize.feet(15),
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: {
263
+ left: _unitized.Unitize.feet(3),
264
+ right: _unitized.Unitize.feet(1),
265
+ up: _unitized.Unitize.feet(10),
266
+ down: _unitized.Unitize.feet(10)
267
+ }
335
268
  }]
336
- });
337
-
338
- case 4:
339
- case "end":
340
- return _context.stop();
341
- }
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();
342
325
  }
343
326
  }, _callee);
344
327
  })));
345
- (0, _mocha.it)('horizontal shots',
346
- /*#__PURE__*/
347
- (0, _asyncToGenerator2["default"])(
348
- /*#__PURE__*/
349
- _regenerator["default"].mark(function _callee2() {
328
+ (0, _mocha.it)('horizontal shots', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
350
329
  var data, parsed;
351
330
  return _regenerator["default"].wrap(function _callee2$(_context2) {
352
- while (1) {
353
- switch (_context2.prev = _context2.next) {
354
- case 0:
355
- 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";
356
- _context2.next = 3;
357
- return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
358
-
359
- case 3:
360
- parsed = _context2.sent;
361
- (0, _chai.expect)(parsed.trips[0].shots[0]).to.deep.equal({
362
- from: 'E21',
363
- to: 'E22',
364
- kind: _FrcsShot.FrcsShotKind.Horizontal,
365
- distance: _unitized.Unitize.feet(Math.sqrt(36.2 * 36.2 + 1)),
366
- horizontalDistance: _unitized.Unitize.feet(36.2),
367
- verticalDistance: _unitized.Unitize.feet(1),
368
- frontsightAzimuth: _unitized.Unitize.degrees(338.5),
369
- backsightAzimuth: _unitized.Unitize.degrees(340),
370
- frontsightInclination: _unitized.Angle.atan2(1, 36.2),
371
- backsightInclination: null,
372
- excludeDistance: false,
373
- comment: null,
374
- toLruds: {
375
- left: _unitized.Unitize.feet(12),
376
- right: _unitized.Unitize.feet(2),
377
- up: _unitized.Unitize.feet(15),
378
- down: _unitized.Unitize.feet(15)
379
- }
380
- });
381
-
382
- case 5:
383
- case "end":
384
- return _context2.stop();
385
- }
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: {
352
+ left: _unitized.Unitize.feet(12),
353
+ right: _unitized.Unitize.feet(2),
354
+ up: _unitized.Unitize.feet(15),
355
+ down: _unitized.Unitize.feet(15)
356
+ }
357
+ });
358
+ case 5:
359
+ case "end":
360
+ return _context2.stop();
386
361
  }
387
362
  }, _callee2);
388
363
  })));
389
- (0, _mocha.it)('horizontal feet and inches shots',
390
- /*#__PURE__*/
391
- (0, _asyncToGenerator2["default"])(
392
- /*#__PURE__*/
393
- _regenerator["default"].mark(function _callee3() {
364
+ (0, _mocha.it)('horizontal feet and inches shots', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
394
365
  var data, parsed;
395
366
  return _regenerator["default"].wrap(function _callee3$(_context3) {
396
- while (1) {
397
- switch (_context3.prev = _context3.next) {
398
- case 0:
399
- 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";
400
- _context3.next = 3;
401
- return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
402
-
403
- case 3:
404
- parsed = _context3.sent;
405
- (0, _chai.expect)(parsed.trips[0].shots[0]).to.deep.equal({
406
- from: 'A26',
407
- to: 'A27',
408
- kind: _FrcsShot.FrcsShotKind.Horizontal,
409
- distance: _unitized.Unitize.feet(Math.sqrt(16.75 * 16.75 + 1)),
410
- horizontalDistance: _unitized.Unitize.inches(16 * 12 + 9),
411
- verticalDistance: _unitized.Unitize.feet(-1),
412
- frontsightAzimuth: _unitized.Unitize.degrees(345),
413
- backsightAzimuth: _unitized.Unitize.degrees(163),
414
- frontsightInclination: _unitized.Angle.atan2(-1, 16.75),
415
- backsightInclination: null,
416
- excludeDistance: false,
417
- comment: null,
418
- toLruds: {
419
- left: _unitized.Unitize.feet(0),
420
- right: _unitized.Unitize.feet(3),
421
- up: _unitized.Unitize.feet(5),
422
- down: _unitized.Unitize.feet(4)
423
- }
424
- });
425
-
426
- case 5:
427
- case "end":
428
- return _context3.stop();
429
- }
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: {
388
+ left: _unitized.Unitize.feet(0),
389
+ right: _unitized.Unitize.feet(3),
390
+ up: _unitized.Unitize.feet(5),
391
+ down: _unitized.Unitize.feet(4)
392
+ }
393
+ });
394
+ case 5:
395
+ case "end":
396
+ return _context3.stop();
430
397
  }
431
398
  }, _callee3);
432
399
  })));
433
- (0, _mocha.it)('diagonal shots',
434
- /*#__PURE__*/
435
- (0, _asyncToGenerator2["default"])(
436
- /*#__PURE__*/
437
- _regenerator["default"].mark(function _callee4() {
400
+ (0, _mocha.it)('diagonal shots', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4() {
438
401
  var data, parsed;
439
402
  return _regenerator["default"].wrap(function _callee4$(_context4) {
440
- while (1) {
441
- switch (_context4.prev = _context4.next) {
442
- case 0:
443
- 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";
444
- _context4.next = 3;
445
- return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
446
-
447
- case 3:
448
- parsed = _context4.sent;
449
- (0, _chai.expect)(parsed.trips[0].shots[0]).to.deep.equal({
450
- from: 'E36',
451
- to: 'E37',
452
- kind: _FrcsShot.FrcsShotKind.Diagonal,
453
- distance: _unitized.Unitize.feet(31.6),
454
- verticalDistance: _unitized.Unitize.feet(2),
455
- frontsightAzimuth: _unitized.Unitize.degrees(231),
456
- backsightAzimuth: _unitized.Unitize.degrees(232),
457
- frontsightInclination: _unitized.Angle.asin(2 / 31.6),
458
- backsightInclination: null,
459
- excludeDistance: false,
460
- comment: null,
461
- toLruds: {
462
- left: _unitized.Unitize.feet(3),
463
- right: _unitized.Unitize.feet(10),
464
- up: _unitized.Unitize.feet(20),
465
- down: _unitized.Unitize.feet(32)
466
- }
467
- });
468
-
469
- case 5:
470
- case "end":
471
- return _context4.stop();
472
- }
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: {
423
+ left: _unitized.Unitize.feet(3),
424
+ right: _unitized.Unitize.feet(10),
425
+ up: _unitized.Unitize.feet(20),
426
+ down: _unitized.Unitize.feet(32)
427
+ }
428
+ });
429
+ case 5:
430
+ case "end":
431
+ return _context4.stop();
473
432
  }
474
433
  }, _callee4);
475
434
  })));
476
- (0, _mocha.it)('invalid distance unit',
477
- /*#__PURE__*/
478
- (0, _asyncToGenerator2["default"])(
479
- /*#__PURE__*/
480
- _regenerator["default"].mark(function _callee5() {
435
+ (0, _mocha.it)('invalid distance unit', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5() {
481
436
  var data;
482
437
  return _regenerator["default"].wrap(function _callee5$(_context5) {
483
- while (1) {
484
- switch (_context5.prev = _context5.next) {
485
- case 0:
486
- data = "blah\n *\n *\nTEST\n * \nFJ C DD\n";
487
- _context5.t0 = _chai.expect;
488
- _context5.next = 4;
489
- return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
490
-
491
- case 4:
492
- _context5.t1 = _context5.sent;
493
- _context5.t2 = {
494
- cave: 'blah',
495
- errors: [new _parseSegment.SegmentParseError('Invalid distance unit', new _parseSegment.Segment({
496
- value: 'FJ C DD',
497
- source: 'cdata.fr',
498
- startLine: 5,
499
- startCol: 0
500
- }).substring(0, 2))],
501
- location: null,
502
- trips: [{
503
- header: {
504
- azimuthUnit: _unitized.Angle.degrees,
505
- backsightAzimuthCorrected: true,
506
- backsightInclinationCorrected: false,
507
- comment: null,
508
- date: undefined,
509
- distanceUnit: _unitized.Length.feet,
510
- hasBacksightAzimuth: true,
511
- hasBacksightInclination: false,
512
- inclinationUnit: _unitized.Angle.degrees,
513
- name: 'TEST',
514
- section: undefined,
515
- team: undefined
516
- },
517
- shots: []
518
- }]
519
- };
520
- (0, _context5.t0)(_context5.t1).to.deep.equal(_context5.t2);
521
-
522
- case 7:
523
- case "end":
524
- return _context5.stop();
525
- }
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();
526
476
  }
527
477
  }, _callee5);
528
478
  })));
529
- (0, _mocha.it)('meters',
530
- /*#__PURE__*/
531
- (0, _asyncToGenerator2["default"])(
532
- /*#__PURE__*/
533
- _regenerator["default"].mark(function _callee6() {
479
+ (0, _mocha.it)('meters', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6() {
534
480
  var data;
535
481
  return _regenerator["default"].wrap(function _callee6$(_context6) {
536
- while (1) {
537
- switch (_context6.prev = _context6.next) {
538
- case 0:
539
- 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";
540
- _context6.t0 = _chai.expect;
541
- _context6.next = 4;
542
- return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
543
-
544
- case 4:
545
- _context6.t1 = _context6.sent;
546
- _context6.t2 = {
547
- cave: 'blah',
548
- errors: [],
549
- location: null,
550
- trips: [{
551
- header: {
552
- azimuthUnit: _unitized.Angle.degrees,
553
- backsightAzimuthCorrected: true,
554
- backsightInclinationCorrected: true,
555
- comment: null,
556
- date: undefined,
557
- distanceUnit: _unitized.Length.meters,
558
- hasBacksightAzimuth: true,
559
- hasBacksightInclination: true,
560
- inclinationUnit: _unitized.Angle.degrees,
561
- name: 'TEST',
562
- section: undefined,
563
- team: undefined
564
- },
565
- shots: [{
566
- from: 'E36',
567
- to: 'E37',
568
- kind: _FrcsShot.FrcsShotKind.Normal,
569
- distance: _unitized.Unitize.meters(31.6),
570
- frontsightAzimuth: _unitized.Unitize.degrees(231),
571
- backsightAzimuth: _unitized.Unitize.degrees(232),
572
- frontsightInclination: _unitized.Unitize.degrees(2),
573
- backsightInclination: _unitized.Unitize.degrees(3),
574
- excludeDistance: false,
575
- comment: null,
576
- toLruds: {
577
- left: _unitized.Unitize.meters(3),
578
- right: _unitized.Unitize.meters(10),
579
- up: _unitized.Unitize.meters(20),
580
- down: _unitized.Unitize.meters(32)
581
- }
582
- }]
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: {
521
+ left: _unitized.Unitize.meters(3),
522
+ right: _unitized.Unitize.meters(10),
523
+ up: _unitized.Unitize.meters(20),
524
+ down: _unitized.Unitize.meters(32)
525
+ }
583
526
  }]
584
- };
585
- (0, _context6.t0)(_context6.t1).to.deep.equal(_context6.t2);
586
-
587
- case 7:
588
- case "end":
589
- return _context6.stop();
590
- }
527
+ }]
528
+ });
529
+ case 6:
530
+ case "end":
531
+ return _context6.stop();
591
532
  }
592
533
  }, _callee6);
593
534
  })));
594
- (0, _mocha.it)('exclude length',
595
- /*#__PURE__*/
596
- (0, _asyncToGenerator2["default"])(
597
- /*#__PURE__*/
598
- _regenerator["default"].mark(function _callee7() {
535
+ (0, _mocha.it)('exclude length', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7() {
599
536
  var data, parsed;
600
537
  return _regenerator["default"].wrap(function _callee7$(_context7) {
601
- while (1) {
602
- switch (_context7.prev = _context7.next) {
603
- case 0:
604
- 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";
605
- _context7.next = 3;
606
- return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
607
-
608
- case 3:
609
- parsed = _context7.sent;
610
- (0, _chai.expect)(parsed.trips[0].shots[0]).to.deep.equal({
611
- from: 'E36',
612
- to: 'E37',
613
- kind: _FrcsShot.FrcsShotKind.Normal,
614
- distance: _unitized.Unitize.meters(31.6),
615
- frontsightAzimuth: _unitized.Unitize.degrees(231),
616
- backsightAzimuth: _unitized.Unitize.degrees(232),
617
- frontsightInclination: _unitized.Unitize.degrees(2),
618
- backsightInclination: _unitized.Unitize.degrees(3),
619
- excludeDistance: true,
620
- comment: null,
621
- toLruds: {
622
- left: _unitized.Unitize.meters(3),
623
- right: _unitized.Unitize.meters(10),
624
- up: _unitized.Unitize.meters(20),
625
- down: _unitized.Unitize.meters(32)
626
- }
627
- });
628
-
629
- case 5:
630
- case "end":
631
- return _context7.stop();
632
- }
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: {
557
+ left: _unitized.Unitize.meters(3),
558
+ right: _unitized.Unitize.meters(10),
559
+ up: _unitized.Unitize.meters(20),
560
+ down: _unitized.Unitize.meters(32)
561
+ }
562
+ });
563
+ case 5:
564
+ case "end":
565
+ return _context7.stop();
633
566
  }
634
567
  }, _callee7);
635
568
  })));
636
- (0, _mocha.it)('negative LRUD',
637
- /*#__PURE__*/
638
- (0, _asyncToGenerator2["default"])(
639
- /*#__PURE__*/
640
- _regenerator["default"].mark(function _callee8() {
569
+ (0, _mocha.it)('negative LRUD', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8() {
641
570
  var data, parsed;
642
571
  return _regenerator["default"].wrap(function _callee8$(_context8) {
643
- while (1) {
644
- switch (_context8.prev = _context8.next) {
645
- case 0:
646
- 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";
647
- _context8.next = 3;
648
- return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
649
-
650
- case 3:
651
- parsed = _context8.sent;
652
- (0, _chai.expect)(parsed.trips[0].shots[0]).to.deep.equal({
653
- from: 'E36',
654
- to: 'E37',
655
- kind: _FrcsShot.FrcsShotKind.Normal,
656
- distance: _unitized.Unitize.meters(31.6),
657
- frontsightAzimuth: _unitized.Unitize.degrees(231),
658
- backsightAzimuth: _unitized.Unitize.degrees(232),
659
- frontsightInclination: _unitized.Unitize.degrees(2),
660
- backsightInclination: _unitized.Unitize.degrees(3),
661
- excludeDistance: false,
662
- comment: null,
663
- toLruds: {
664
- left: null,
665
- right: _unitized.Unitize.meters(10),
666
- up: _unitized.Unitize.meters(20),
667
- down: _unitized.Unitize.meters(32)
668
- }
669
- });
670
-
671
- case 5:
672
- case "end":
673
- return _context8.stop();
674
- }
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: {
591
+ left: null,
592
+ right: _unitized.Unitize.meters(10),
593
+ up: _unitized.Unitize.meters(20),
594
+ down: _unitized.Unitize.meters(32)
595
+ }
596
+ });
597
+ case 5:
598
+ case "end":
599
+ return _context8.stop();
675
600
  }
676
601
  }, _callee8);
677
602
  })));
678
- (0, _mocha.it)('- for no backsight',
679
- /*#__PURE__*/
680
- (0, _asyncToGenerator2["default"])(
681
- /*#__PURE__*/
682
- _regenerator["default"].mark(function _callee9() {
603
+ (0, _mocha.it)('- for no backsight', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9() {
683
604
  var data, parsed;
684
605
  return _regenerator["default"].wrap(function _callee9$(_context9) {
685
- while (1) {
686
- switch (_context9.prev = _context9.next) {
687
- case 0:
688
- data = "blah\n *\n *\nTEST\n * \nM B- DD \n ";
689
- _context9.next = 3;
690
- return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
691
-
692
- case 3:
693
- parsed = _context9.sent;
694
- (0, _chai.expect)(parsed.trips[0].header).to.deep.equal({
695
- name: 'TEST',
696
- comment: null,
697
- section: undefined,
698
- date: undefined,
699
- team: undefined,
700
- distanceUnit: _unitized.Length.meters,
701
- azimuthUnit: _unitized.Angle.degrees,
702
- inclinationUnit: _unitized.Angle.degrees,
703
- backsightAzimuthCorrected: false,
704
- backsightInclinationCorrected: false,
705
- hasBacksightAzimuth: true,
706
- hasBacksightInclination: false
707
- });
708
-
709
- case 5:
710
- case "end":
711
- return _context9.stop();
712
- }
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();
713
630
  }
714
631
  }, _callee9);
715
632
  })));
716
- (0, _mocha.it)('missing both frontsight and backsight inclination',
717
- /*#__PURE__*/
718
- (0, _asyncToGenerator2["default"])(
719
- /*#__PURE__*/
720
- _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() {
721
634
  var data, parsed;
722
635
  return _regenerator["default"].wrap(function _callee10$(_context10) {
723
- while (1) {
724
- switch (_context10.prev = _context10.next) {
725
- case 0:
726
- data = "blah\n *\n *\nTEST\n * \nM B- DD \n E37 E36 31.6 231.0 232.0 -3 10 20 32\n ";
727
- _context10.next = 3;
728
- return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
729
-
730
- case 3:
731
- parsed = _context10.sent;
732
- (0, _chai.expect)(parsed.trips[0].shots[0]).to.deep.equal({
733
- from: 'E36',
734
- to: 'E37',
735
- kind: _FrcsShot.FrcsShotKind.Normal,
736
- distance: _unitized.Unitize.meters(31.6),
737
- frontsightAzimuth: _unitized.Unitize.degrees(231),
738
- backsightAzimuth: _unitized.Unitize.degrees(232),
739
- frontsightInclination: _unitized.Unitize.degrees(0),
740
- backsightInclination: null,
741
- excludeDistance: false,
742
- comment: null,
743
- toLruds: {
744
- left: null,
745
- right: _unitized.Unitize.meters(10),
746
- up: _unitized.Unitize.meters(20),
747
- down: _unitized.Unitize.meters(32)
748
- }
749
- });
750
-
751
- case 5:
752
- case "end":
753
- return _context10.stop();
754
- }
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: {
655
+ left: null,
656
+ right: _unitized.Unitize.meters(10),
657
+ up: _unitized.Unitize.meters(20),
658
+ down: _unitized.Unitize.meters(32)
659
+ }
660
+ });
661
+ case 5:
662
+ case "end":
663
+ return _context10.stop();
755
664
  }
756
665
  }, _callee10);
757
666
  })));