@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.
- package/FrcsPlotFile.js +5 -1
- package/FrcsPlotShot.js +5 -1
- package/FrcsShot.js +4 -5
- package/FrcsSurveyFile.js +5 -1
- package/FrcsTrip.js +5 -1
- package/FrcsTripSummary.js +5 -1
- package/FrcsTripSummaryFile.js +5 -1
- package/es/FrcsPlotFile.js +5 -1
- package/es/FrcsPlotShot.js +5 -1
- package/es/FrcsShot.js +5 -6
- package/es/FrcsSurveyFile.js +5 -1
- package/es/FrcsTrip.js +5 -1
- package/es/FrcsTripSummary.js +5 -1
- package/es/FrcsTripSummaryFile.js +5 -1
- package/es/formatFrcsShot.js +5 -19
- package/es/formatFrcsShot.spec.js +8 -17
- package/es/index.js +21 -33
- package/es/node/index.js +2 -10
- package/es/node/parseFrcsPlotFile.spec.js +1 -5
- package/es/node/parseFrcsSurveyFile.spec.js +2 -6
- package/es/node/parseFrcsTripSummaryFile.spec.js +1 -5
- package/es/parseFrcsPlotFile.js +1 -26
- package/es/parseFrcsSurveyFile.js +73 -96
- package/es/parseFrcsTripSummaryFile.js +1 -12
- package/es/string/index.js +2 -9
- package/es/string/parseFrcsPlotFile.spec.js +1 -5
- package/es/string/parseFrcsSurveyFile.spec.js +18 -16
- package/formatFrcsShot.js +5 -19
- package/formatFrcsShot.spec.js +4 -15
- package/index.js +20 -32
- package/node/index.js +1 -9
- package/node/parseFrcsPlotFile.spec.js +165 -180
- package/node/parseFrcsSurveyFile.spec.js +306 -321
- package/node/parseFrcsTripSummaryFile.spec.js +83 -106
- package/package.json +15 -15
- package/parseFrcsPlotFile.js +224 -318
- package/parseFrcsSurveyFile.js +437 -452
- package/parseFrcsTripSummaryFile.js +102 -142
- package/string/index.js +10 -27
- package/string/parseFrcsPlotFile.spec.js +165 -180
- package/string/parseFrcsSurveyFile.spec.js +604 -689
- 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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
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
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
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
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
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
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
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
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
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
|
-
|
|
339
|
-
|
|
340
|
-
|
|
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
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
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
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
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
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
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
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
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
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
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
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
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
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
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
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
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
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
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
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
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
|
})));
|