@speleotica/frcsdata 4.0.0 → 4.0.2

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 +73 -96
  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 +18 -16
  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 +437 -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 +604 -689
  42. package/yarn.lock +1285 -702
@@ -1,757 +1,672 @@
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 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";
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*\n* A1 2 7 3 4.5\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 *\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 B30 8 3 5 1.2\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
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
+ }
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: {
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)
225
227
  },
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
- }]
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
+ }
284
251
  }, {
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
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
+ }
268
+ }]
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
+ fromLruds: {
296
+ left: _unitized.Unitize.feet(8),
297
+ right: _unitized.Unitize.feet(3),
298
+ up: _unitized.Unitize.feet(5),
299
+ down: _unitized.Unitize.feet(1.2)
298
300
  },
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
- }]
301
+ toLruds: {
302
+ left: _unitized.Unitize.feet(2),
303
+ right: _unitized.Unitize.feet(4),
304
+ up: _unitized.Unitize.feet(6),
305
+ down: null
306
+ }
307
+ }, {
308
+ backsightAzimuth: _unitized.Unitize.degrees(0),
309
+ backsightInclination: null,
310
+ comment: null,
311
+ distance: _unitized.Unitize.feet(13.7),
312
+ excludeDistance: true,
313
+ isSplay: true,
314
+ from: 'B30',
315
+ frontsightAzimuth: _unitized.Unitize.degrees(0),
316
+ frontsightInclination: _unitized.Unitize.degrees(40),
317
+ kind: ' ',
318
+ to: 'B30sp',
319
+ toLruds: {
320
+ left: _unitized.Unitize.feet(2),
321
+ right: _unitized.Unitize.feet(4),
322
+ up: _unitized.Unitize.feet(6),
323
+ down: null
324
+ }
335
325
  }]
336
- });
337
-
338
- case 4:
339
- case "end":
340
- return _context.stop();
341
- }
326
+ }]
327
+ });
328
+ case 4:
329
+ case "end":
330
+ return _context.stop();
342
331
  }
343
332
  }, _callee);
344
333
  })));
345
- (0, _mocha.it)('horizontal shots',
346
- /*#__PURE__*/
347
- (0, _asyncToGenerator2["default"])(
348
- /*#__PURE__*/
349
- _regenerator["default"].mark(function _callee2() {
334
+ (0, _mocha.it)('horizontal shots', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
350
335
  var data, parsed;
351
336
  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
- }
337
+ while (1) switch (_context2.prev = _context2.next) {
338
+ case 0:
339
+ 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";
340
+ _context2.next = 3;
341
+ return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
342
+ case 3:
343
+ parsed = _context2.sent;
344
+ (0, _chai.expect)(parsed.trips[0].shots[0]).to.deep.equal({
345
+ from: 'E21',
346
+ to: 'E22',
347
+ kind: _FrcsShot.FrcsShotKind.Horizontal,
348
+ distance: _unitized.Unitize.feet(Math.sqrt(36.2 * 36.2 + 1)),
349
+ horizontalDistance: _unitized.Unitize.feet(36.2),
350
+ verticalDistance: _unitized.Unitize.feet(1),
351
+ frontsightAzimuth: _unitized.Unitize.degrees(338.5),
352
+ backsightAzimuth: _unitized.Unitize.degrees(340),
353
+ frontsightInclination: _unitized.Angle.atan2(1, 36.2),
354
+ backsightInclination: null,
355
+ excludeDistance: false,
356
+ comment: null,
357
+ toLruds: {
358
+ left: _unitized.Unitize.feet(12),
359
+ right: _unitized.Unitize.feet(2),
360
+ up: _unitized.Unitize.feet(15),
361
+ down: _unitized.Unitize.feet(15)
362
+ }
363
+ });
364
+ case 5:
365
+ case "end":
366
+ return _context2.stop();
386
367
  }
387
368
  }, _callee2);
388
369
  })));
389
- (0, _mocha.it)('horizontal feet and inches shots',
390
- /*#__PURE__*/
391
- (0, _asyncToGenerator2["default"])(
392
- /*#__PURE__*/
393
- _regenerator["default"].mark(function _callee3() {
370
+ (0, _mocha.it)('horizontal feet and inches shots', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
394
371
  var data, parsed;
395
372
  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
- }
373
+ while (1) switch (_context3.prev = _context3.next) {
374
+ case 0:
375
+ 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";
376
+ _context3.next = 3;
377
+ return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
378
+ case 3:
379
+ parsed = _context3.sent;
380
+ (0, _chai.expect)(parsed.trips[0].shots[0]).to.deep.equal({
381
+ from: 'A26',
382
+ to: 'A27',
383
+ kind: _FrcsShot.FrcsShotKind.Horizontal,
384
+ distance: _unitized.Unitize.feet(Math.sqrt(16.75 * 16.75 + 1)),
385
+ horizontalDistance: _unitized.Unitize.inches(16 * 12 + 9),
386
+ verticalDistance: _unitized.Unitize.feet(-1),
387
+ frontsightAzimuth: _unitized.Unitize.degrees(345),
388
+ backsightAzimuth: _unitized.Unitize.degrees(163),
389
+ frontsightInclination: _unitized.Angle.atan2(-1, 16.75),
390
+ backsightInclination: null,
391
+ excludeDistance: false,
392
+ comment: null,
393
+ toLruds: {
394
+ left: _unitized.Unitize.feet(0),
395
+ right: _unitized.Unitize.feet(3),
396
+ up: _unitized.Unitize.feet(5),
397
+ down: _unitized.Unitize.feet(4)
398
+ }
399
+ });
400
+ case 5:
401
+ case "end":
402
+ return _context3.stop();
430
403
  }
431
404
  }, _callee3);
432
405
  })));
433
- (0, _mocha.it)('diagonal shots',
434
- /*#__PURE__*/
435
- (0, _asyncToGenerator2["default"])(
436
- /*#__PURE__*/
437
- _regenerator["default"].mark(function _callee4() {
406
+ (0, _mocha.it)('diagonal shots', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4() {
438
407
  var data, parsed;
439
408
  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
- }
409
+ while (1) switch (_context4.prev = _context4.next) {
410
+ case 0:
411
+ 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";
412
+ _context4.next = 3;
413
+ return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
414
+ case 3:
415
+ parsed = _context4.sent;
416
+ (0, _chai.expect)(parsed.trips[0].shots[0]).to.deep.equal({
417
+ from: 'E36',
418
+ to: 'E37',
419
+ kind: _FrcsShot.FrcsShotKind.Diagonal,
420
+ distance: _unitized.Unitize.feet(31.6),
421
+ verticalDistance: _unitized.Unitize.feet(2),
422
+ frontsightAzimuth: _unitized.Unitize.degrees(231),
423
+ backsightAzimuth: _unitized.Unitize.degrees(232),
424
+ frontsightInclination: _unitized.Angle.asin(2 / 31.6),
425
+ backsightInclination: null,
426
+ excludeDistance: false,
427
+ comment: null,
428
+ toLruds: {
429
+ left: _unitized.Unitize.feet(3),
430
+ right: _unitized.Unitize.feet(10),
431
+ up: _unitized.Unitize.feet(20),
432
+ down: _unitized.Unitize.feet(32)
433
+ }
434
+ });
435
+ case 5:
436
+ case "end":
437
+ return _context4.stop();
473
438
  }
474
439
  }, _callee4);
475
440
  })));
476
- (0, _mocha.it)('invalid distance unit',
477
- /*#__PURE__*/
478
- (0, _asyncToGenerator2["default"])(
479
- /*#__PURE__*/
480
- _regenerator["default"].mark(function _callee5() {
441
+ (0, _mocha.it)('invalid distance unit', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5() {
481
442
  var data;
482
443
  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
- }
444
+ while (1) switch (_context5.prev = _context5.next) {
445
+ case 0:
446
+ data = "blah\n *\n *\nTEST\n * \nFJ C DD\n";
447
+ _context5.t0 = _chai.expect;
448
+ _context5.next = 4;
449
+ return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
450
+ case 4:
451
+ _context5.t1 = _context5.sent;
452
+ (0, _context5.t0)(_context5.t1).to.deep.equal({
453
+ cave: 'blah',
454
+ errors: [new _parseSegment.SegmentParseError('Invalid distance unit', new _parseSegment.Segment({
455
+ value: 'FJ C DD',
456
+ source: 'cdata.fr',
457
+ startLine: 5,
458
+ startCol: 0
459
+ }).substring(0, 2))],
460
+ location: null,
461
+ trips: [{
462
+ header: {
463
+ azimuthUnit: _unitized.Angle.degrees,
464
+ backsightAzimuthCorrected: true,
465
+ backsightInclinationCorrected: false,
466
+ comment: null,
467
+ date: undefined,
468
+ distanceUnit: _unitized.Length.feet,
469
+ hasBacksightAzimuth: true,
470
+ hasBacksightInclination: false,
471
+ inclinationUnit: _unitized.Angle.degrees,
472
+ name: 'TEST',
473
+ section: undefined,
474
+ team: undefined
475
+ },
476
+ shots: []
477
+ }]
478
+ });
479
+ case 6:
480
+ case "end":
481
+ return _context5.stop();
526
482
  }
527
483
  }, _callee5);
528
484
  })));
529
- (0, _mocha.it)('meters',
530
- /*#__PURE__*/
531
- (0, _asyncToGenerator2["default"])(
532
- /*#__PURE__*/
533
- _regenerator["default"].mark(function _callee6() {
485
+ (0, _mocha.it)('meters', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6() {
534
486
  var data;
535
487
  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
- }]
488
+ while (1) switch (_context6.prev = _context6.next) {
489
+ case 0:
490
+ 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";
491
+ _context6.t0 = _chai.expect;
492
+ _context6.next = 4;
493
+ return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
494
+ case 4:
495
+ _context6.t1 = _context6.sent;
496
+ (0, _context6.t0)(_context6.t1).to.deep.equal({
497
+ cave: 'blah',
498
+ errors: [],
499
+ location: null,
500
+ trips: [{
501
+ header: {
502
+ azimuthUnit: _unitized.Angle.degrees,
503
+ backsightAzimuthCorrected: true,
504
+ backsightInclinationCorrected: true,
505
+ comment: null,
506
+ date: undefined,
507
+ distanceUnit: _unitized.Length.meters,
508
+ hasBacksightAzimuth: true,
509
+ hasBacksightInclination: true,
510
+ inclinationUnit: _unitized.Angle.degrees,
511
+ name: 'TEST',
512
+ section: undefined,
513
+ team: undefined
514
+ },
515
+ shots: [{
516
+ from: 'E36',
517
+ to: 'E37',
518
+ kind: _FrcsShot.FrcsShotKind.Normal,
519
+ distance: _unitized.Unitize.meters(31.6),
520
+ frontsightAzimuth: _unitized.Unitize.degrees(231),
521
+ backsightAzimuth: _unitized.Unitize.degrees(232),
522
+ frontsightInclination: _unitized.Unitize.degrees(2),
523
+ backsightInclination: _unitized.Unitize.degrees(3),
524
+ excludeDistance: false,
525
+ comment: null,
526
+ toLruds: {
527
+ left: _unitized.Unitize.meters(3),
528
+ right: _unitized.Unitize.meters(10),
529
+ up: _unitized.Unitize.meters(20),
530
+ down: _unitized.Unitize.meters(32)
531
+ }
583
532
  }]
584
- };
585
- (0, _context6.t0)(_context6.t1).to.deep.equal(_context6.t2);
586
-
587
- case 7:
588
- case "end":
589
- return _context6.stop();
590
- }
533
+ }]
534
+ });
535
+ case 6:
536
+ case "end":
537
+ return _context6.stop();
591
538
  }
592
539
  }, _callee6);
593
540
  })));
594
- (0, _mocha.it)('exclude length',
595
- /*#__PURE__*/
596
- (0, _asyncToGenerator2["default"])(
597
- /*#__PURE__*/
598
- _regenerator["default"].mark(function _callee7() {
541
+ (0, _mocha.it)('exclude length', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7() {
599
542
  var data, parsed;
600
543
  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
- }
544
+ while (1) switch (_context7.prev = _context7.next) {
545
+ case 0:
546
+ 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";
547
+ _context7.next = 3;
548
+ return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
549
+ case 3:
550
+ parsed = _context7.sent;
551
+ (0, _chai.expect)(parsed.trips[0].shots[0]).to.deep.equal({
552
+ from: 'E36',
553
+ to: 'E37',
554
+ kind: _FrcsShot.FrcsShotKind.Normal,
555
+ distance: _unitized.Unitize.meters(31.6),
556
+ frontsightAzimuth: _unitized.Unitize.degrees(231),
557
+ backsightAzimuth: _unitized.Unitize.degrees(232),
558
+ frontsightInclination: _unitized.Unitize.degrees(2),
559
+ backsightInclination: _unitized.Unitize.degrees(3),
560
+ excludeDistance: true,
561
+ comment: null,
562
+ toLruds: {
563
+ left: _unitized.Unitize.meters(3),
564
+ right: _unitized.Unitize.meters(10),
565
+ up: _unitized.Unitize.meters(20),
566
+ down: _unitized.Unitize.meters(32)
567
+ }
568
+ });
569
+ case 5:
570
+ case "end":
571
+ return _context7.stop();
633
572
  }
634
573
  }, _callee7);
635
574
  })));
636
- (0, _mocha.it)('negative LRUD',
637
- /*#__PURE__*/
638
- (0, _asyncToGenerator2["default"])(
639
- /*#__PURE__*/
640
- _regenerator["default"].mark(function _callee8() {
575
+ (0, _mocha.it)('negative LRUD', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8() {
641
576
  var data, parsed;
642
577
  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
- }
578
+ while (1) switch (_context8.prev = _context8.next) {
579
+ case 0:
580
+ 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";
581
+ _context8.next = 3;
582
+ return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
583
+ case 3:
584
+ parsed = _context8.sent;
585
+ (0, _chai.expect)(parsed.trips[0].shots[0]).to.deep.equal({
586
+ from: 'E36',
587
+ to: 'E37',
588
+ kind: _FrcsShot.FrcsShotKind.Normal,
589
+ distance: _unitized.Unitize.meters(31.6),
590
+ frontsightAzimuth: _unitized.Unitize.degrees(231),
591
+ backsightAzimuth: _unitized.Unitize.degrees(232),
592
+ frontsightInclination: _unitized.Unitize.degrees(2),
593
+ backsightInclination: _unitized.Unitize.degrees(3),
594
+ excludeDistance: false,
595
+ comment: null,
596
+ toLruds: {
597
+ left: null,
598
+ right: _unitized.Unitize.meters(10),
599
+ up: _unitized.Unitize.meters(20),
600
+ down: _unitized.Unitize.meters(32)
601
+ }
602
+ });
603
+ case 5:
604
+ case "end":
605
+ return _context8.stop();
675
606
  }
676
607
  }, _callee8);
677
608
  })));
678
- (0, _mocha.it)('- for no backsight',
679
- /*#__PURE__*/
680
- (0, _asyncToGenerator2["default"])(
681
- /*#__PURE__*/
682
- _regenerator["default"].mark(function _callee9() {
609
+ (0, _mocha.it)('- for no backsight', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9() {
683
610
  var data, parsed;
684
611
  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
- }
612
+ while (1) switch (_context9.prev = _context9.next) {
613
+ case 0:
614
+ data = "blah\n *\n *\nTEST\n * \nMT B- DD \n ";
615
+ _context9.next = 3;
616
+ return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
617
+ case 3:
618
+ parsed = _context9.sent;
619
+ (0, _chai.expect)(parsed.trips[0].header).to.deep.equal({
620
+ name: 'TEST',
621
+ comment: null,
622
+ section: undefined,
623
+ date: undefined,
624
+ team: undefined,
625
+ distanceUnit: _unitized.Length.meters,
626
+ azimuthUnit: _unitized.Angle.degrees,
627
+ inclinationUnit: _unitized.Angle.degrees,
628
+ backsightAzimuthCorrected: false,
629
+ backsightInclinationCorrected: false,
630
+ hasBacksightAzimuth: true,
631
+ hasBacksightInclination: false
632
+ });
633
+ case 5:
634
+ case "end":
635
+ return _context9.stop();
713
636
  }
714
637
  }, _callee9);
715
638
  })));
716
- (0, _mocha.it)('missing both frontsight and backsight inclination',
717
- /*#__PURE__*/
718
- (0, _asyncToGenerator2["default"])(
719
- /*#__PURE__*/
720
- _regenerator["default"].mark(function _callee10() {
639
+ (0, _mocha.it)('missing both frontsight and backsight inclination', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10() {
721
640
  var data, parsed;
722
641
  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
- }
642
+ while (1) switch (_context10.prev = _context10.next) {
643
+ case 0:
644
+ data = "blah\n *\n *\nTEST\n * \nMT B- DD \n E37 E36 31.6 231.0 232.0 -3 10 20 32\n ";
645
+ _context10.next = 3;
646
+ return (0, _index.parseFrcsSurveyFile)('cdata.fr', data);
647
+ case 3:
648
+ parsed = _context10.sent;
649
+ (0, _chai.expect)(parsed.trips[0].shots[0]).to.deep.equal({
650
+ from: 'E36',
651
+ to: 'E37',
652
+ kind: _FrcsShot.FrcsShotKind.Normal,
653
+ distance: _unitized.Unitize.meters(31.6),
654
+ frontsightAzimuth: _unitized.Unitize.degrees(231),
655
+ backsightAzimuth: _unitized.Unitize.degrees(232),
656
+ frontsightInclination: _unitized.Unitize.degrees(0),
657
+ backsightInclination: null,
658
+ excludeDistance: false,
659
+ comment: null,
660
+ toLruds: {
661
+ left: null,
662
+ right: _unitized.Unitize.meters(10),
663
+ up: _unitized.Unitize.meters(20),
664
+ down: _unitized.Unitize.meters(32)
665
+ }
666
+ });
667
+ case 5:
668
+ case "end":
669
+ return _context10.stop();
755
670
  }
756
671
  }, _callee10);
757
672
  })));