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