@speleotica/frcsdata 4.0.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +45 -95
- 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 +8 -14
- 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 +411 -452
- package/parseFrcsTripSummaryFile.js +102 -142
- package/string/index.js +10 -27
- package/string/parseFrcsPlotFile.spec.js +165 -180
- package/string/parseFrcsSurveyFile.spec.js +598 -689
- package/yarn.lock +1285 -702
|
@@ -1,196 +1,181 @@
|
|
|
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 data = " 123.182259\n AE20 1 1 0 0 0 153 -257 -51 85 0 20 1\n AE19 1 2 653 402 -548 1046 -587 -174 97 0 200 1\n AE18 2 3 669 449 -3002 995 94 -597 -56 250 0 1\n AE17 3 4 539 1217 -2770 497 47 -298 -28 0 0 1\n AE16 4 5 544 1230 -3441 411 -284 -246 170 60 10 1\n AE15 5 6 1679 1663 -3833 0 0 -282 283 20 10 1\n AE14 6 7 2026 2617 -3730 446 225 -446 -225 0 30 \n AE13 7 8 391 3152 -5788 -111 691 0 0 200 50 1\n AE12 8 9 -1019 2175 -4630 -369 336 221 -201 40 40 1\n AE11 9 10 -1516 1289 -3919 -348 195 610 -342 50 10 1\n";
|
|
18
11
|
(0, _mocha.describe)('parseFrcsPlotFile', function () {
|
|
19
|
-
(0, _mocha.it)('basic test',
|
|
20
|
-
/*#__PURE__*/
|
|
21
|
-
(0, _asyncToGenerator2["default"])(
|
|
22
|
-
/*#__PURE__*/
|
|
23
|
-
_regenerator["default"].mark(function _callee() {
|
|
12
|
+
(0, _mocha.it)('basic test', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
24
13
|
var parsed;
|
|
25
14
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
26
|
-
while (1) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
case 4:
|
|
191
|
-
case "end":
|
|
192
|
-
return _context.stop();
|
|
193
|
-
}
|
|
15
|
+
while (1) switch (_context.prev = _context.next) {
|
|
16
|
+
case 0:
|
|
17
|
+
_context.next = 2;
|
|
18
|
+
return (0, _index.parseFrcsPlotFile)('cdata.fr', data);
|
|
19
|
+
case 2:
|
|
20
|
+
parsed = _context.sent;
|
|
21
|
+
(0, _chai.expect)(parsed).to.deep.equal({
|
|
22
|
+
totalLength: _unitized.Unitize.feet(123.182259),
|
|
23
|
+
errors: [],
|
|
24
|
+
shots: [{
|
|
25
|
+
toName: 'AE20',
|
|
26
|
+
isSurface: false,
|
|
27
|
+
fromNumber: 1,
|
|
28
|
+
toNumber: 1,
|
|
29
|
+
easting: _unitized.Unitize.feet(0),
|
|
30
|
+
northing: _unitized.Unitize.feet(0),
|
|
31
|
+
elevation: _unitized.Unitize.feet(0),
|
|
32
|
+
leftEasting: _unitized.Unitize.feet(1.53),
|
|
33
|
+
leftNorthing: _unitized.Unitize.feet(-2.57),
|
|
34
|
+
rightEasting: _unitized.Unitize.feet(-0.51),
|
|
35
|
+
rightNorthing: _unitized.Unitize.feet(0.85),
|
|
36
|
+
up: _unitized.Unitize.feet(0),
|
|
37
|
+
down: _unitized.Unitize.feet(2),
|
|
38
|
+
tripNumber: 1
|
|
39
|
+
}, {
|
|
40
|
+
toName: 'AE19',
|
|
41
|
+
isSurface: false,
|
|
42
|
+
fromNumber: 1,
|
|
43
|
+
toNumber: 2,
|
|
44
|
+
easting: _unitized.Unitize.feet(6.53),
|
|
45
|
+
northing: _unitized.Unitize.feet(4.02),
|
|
46
|
+
elevation: _unitized.Unitize.feet(-5.48),
|
|
47
|
+
leftEasting: _unitized.Unitize.feet(10.46),
|
|
48
|
+
leftNorthing: _unitized.Unitize.feet(-5.87),
|
|
49
|
+
rightEasting: _unitized.Unitize.feet(-1.74),
|
|
50
|
+
rightNorthing: _unitized.Unitize.feet(0.97),
|
|
51
|
+
up: _unitized.Unitize.feet(0),
|
|
52
|
+
down: _unitized.Unitize.feet(20),
|
|
53
|
+
tripNumber: 1
|
|
54
|
+
}, {
|
|
55
|
+
toName: 'AE18',
|
|
56
|
+
isSurface: false,
|
|
57
|
+
fromNumber: 2,
|
|
58
|
+
toNumber: 3,
|
|
59
|
+
easting: _unitized.Unitize.feet(6.69),
|
|
60
|
+
northing: _unitized.Unitize.feet(4.49),
|
|
61
|
+
elevation: _unitized.Unitize.feet(-30.02),
|
|
62
|
+
leftEasting: _unitized.Unitize.feet(9.95),
|
|
63
|
+
leftNorthing: _unitized.Unitize.feet(0.94),
|
|
64
|
+
rightEasting: _unitized.Unitize.feet(-5.97),
|
|
65
|
+
rightNorthing: _unitized.Unitize.feet(-0.56),
|
|
66
|
+
up: _unitized.Unitize.feet(25),
|
|
67
|
+
down: _unitized.Unitize.feet(0),
|
|
68
|
+
tripNumber: 1
|
|
69
|
+
}, {
|
|
70
|
+
toName: 'AE17',
|
|
71
|
+
isSurface: false,
|
|
72
|
+
fromNumber: 3,
|
|
73
|
+
toNumber: 4,
|
|
74
|
+
easting: _unitized.Unitize.feet(5.39),
|
|
75
|
+
northing: _unitized.Unitize.feet(12.17),
|
|
76
|
+
elevation: _unitized.Unitize.feet(-27.7),
|
|
77
|
+
leftEasting: _unitized.Unitize.feet(4.97),
|
|
78
|
+
leftNorthing: _unitized.Unitize.feet(0.47),
|
|
79
|
+
rightEasting: _unitized.Unitize.feet(-2.98),
|
|
80
|
+
rightNorthing: _unitized.Unitize.feet(-0.28),
|
|
81
|
+
up: _unitized.Unitize.feet(0),
|
|
82
|
+
down: _unitized.Unitize.feet(0),
|
|
83
|
+
tripNumber: 1
|
|
84
|
+
}, {
|
|
85
|
+
toName: 'AE16',
|
|
86
|
+
isSurface: false,
|
|
87
|
+
fromNumber: 4,
|
|
88
|
+
toNumber: 5,
|
|
89
|
+
easting: _unitized.Unitize.feet(5.44),
|
|
90
|
+
northing: _unitized.Unitize.feet(12.3),
|
|
91
|
+
elevation: _unitized.Unitize.feet(-34.41),
|
|
92
|
+
leftEasting: _unitized.Unitize.feet(4.11),
|
|
93
|
+
leftNorthing: _unitized.Unitize.feet(-2.84),
|
|
94
|
+
rightEasting: _unitized.Unitize.feet(-2.46),
|
|
95
|
+
rightNorthing: _unitized.Unitize.feet(1.7),
|
|
96
|
+
up: _unitized.Unitize.feet(6),
|
|
97
|
+
down: _unitized.Unitize.feet(1),
|
|
98
|
+
tripNumber: 1
|
|
99
|
+
}, {
|
|
100
|
+
toName: 'AE15',
|
|
101
|
+
isSurface: false,
|
|
102
|
+
fromNumber: 5,
|
|
103
|
+
toNumber: 6,
|
|
104
|
+
easting: _unitized.Unitize.feet(16.79),
|
|
105
|
+
northing: _unitized.Unitize.feet(16.63),
|
|
106
|
+
elevation: _unitized.Unitize.feet(-38.33),
|
|
107
|
+
leftEasting: _unitized.Unitize.feet(0),
|
|
108
|
+
leftNorthing: _unitized.Unitize.feet(0),
|
|
109
|
+
rightEasting: _unitized.Unitize.feet(-2.82),
|
|
110
|
+
rightNorthing: _unitized.Unitize.feet(2.83),
|
|
111
|
+
up: _unitized.Unitize.feet(2),
|
|
112
|
+
down: _unitized.Unitize.feet(1),
|
|
113
|
+
tripNumber: 1
|
|
114
|
+
}, {
|
|
115
|
+
toName: 'AE14',
|
|
116
|
+
isSurface: false,
|
|
117
|
+
fromNumber: 6,
|
|
118
|
+
toNumber: 7,
|
|
119
|
+
easting: _unitized.Unitize.feet(20.26),
|
|
120
|
+
northing: _unitized.Unitize.feet(26.17),
|
|
121
|
+
elevation: _unitized.Unitize.feet(-37.3),
|
|
122
|
+
leftEasting: _unitized.Unitize.feet(4.46),
|
|
123
|
+
leftNorthing: _unitized.Unitize.feet(2.25),
|
|
124
|
+
rightEasting: _unitized.Unitize.feet(-4.46),
|
|
125
|
+
rightNorthing: _unitized.Unitize.feet(-2.25),
|
|
126
|
+
up: _unitized.Unitize.feet(0),
|
|
127
|
+
down: _unitized.Unitize.feet(3),
|
|
128
|
+
tripNumber: null
|
|
129
|
+
}, {
|
|
130
|
+
toName: 'AE13',
|
|
131
|
+
isSurface: false,
|
|
132
|
+
fromNumber: 7,
|
|
133
|
+
toNumber: 8,
|
|
134
|
+
easting: _unitized.Unitize.feet(3.91),
|
|
135
|
+
northing: _unitized.Unitize.feet(31.52),
|
|
136
|
+
elevation: _unitized.Unitize.feet(-57.88),
|
|
137
|
+
leftEasting: _unitized.Unitize.feet(-1.11),
|
|
138
|
+
leftNorthing: _unitized.Unitize.feet(6.91),
|
|
139
|
+
rightEasting: _unitized.Unitize.feet(0),
|
|
140
|
+
rightNorthing: _unitized.Unitize.feet(0),
|
|
141
|
+
up: _unitized.Unitize.feet(20),
|
|
142
|
+
down: _unitized.Unitize.feet(5),
|
|
143
|
+
tripNumber: 1
|
|
144
|
+
}, {
|
|
145
|
+
toName: 'AE12',
|
|
146
|
+
isSurface: false,
|
|
147
|
+
fromNumber: 8,
|
|
148
|
+
toNumber: 9,
|
|
149
|
+
easting: _unitized.Unitize.feet(-10.19),
|
|
150
|
+
northing: _unitized.Unitize.feet(21.75),
|
|
151
|
+
elevation: _unitized.Unitize.feet(-46.3),
|
|
152
|
+
leftEasting: _unitized.Unitize.feet(-3.69),
|
|
153
|
+
leftNorthing: _unitized.Unitize.feet(3.36),
|
|
154
|
+
rightEasting: _unitized.Unitize.feet(2.21),
|
|
155
|
+
rightNorthing: _unitized.Unitize.feet(-2.01),
|
|
156
|
+
up: _unitized.Unitize.feet(4),
|
|
157
|
+
down: _unitized.Unitize.feet(4),
|
|
158
|
+
tripNumber: 1
|
|
159
|
+
}, {
|
|
160
|
+
toName: 'AE11',
|
|
161
|
+
isSurface: false,
|
|
162
|
+
fromNumber: 9,
|
|
163
|
+
toNumber: 10,
|
|
164
|
+
easting: _unitized.Unitize.feet(-15.16),
|
|
165
|
+
northing: _unitized.Unitize.feet(12.89),
|
|
166
|
+
elevation: _unitized.Unitize.feet(-39.19),
|
|
167
|
+
leftEasting: _unitized.Unitize.feet(-3.48),
|
|
168
|
+
leftNorthing: _unitized.Unitize.feet(1.95),
|
|
169
|
+
rightEasting: _unitized.Unitize.feet(6.1),
|
|
170
|
+
rightNorthing: _unitized.Unitize.feet(-3.42),
|
|
171
|
+
up: _unitized.Unitize.feet(5),
|
|
172
|
+
down: _unitized.Unitize.feet(1),
|
|
173
|
+
tripNumber: 1
|
|
174
|
+
}]
|
|
175
|
+
});
|
|
176
|
+
case 4:
|
|
177
|
+
case "end":
|
|
178
|
+
return _context.stop();
|
|
194
179
|
}
|
|
195
180
|
}, _callee);
|
|
196
181
|
})));
|