@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
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = formatFrcsShot;
|
|
7
|
+
var _FrcsShot = require("./FrcsShot");
|
|
8
|
+
var _unitized = require("@speleotica/unitized");
|
|
9
|
+
var STATION_WIDTH = 5;
|
|
10
|
+
var EMPTY_STATION = ' '.repeat(STATION_WIDTH);
|
|
11
|
+
function formatStation(station) {
|
|
12
|
+
if (station.length > STATION_WIDTH) {
|
|
13
|
+
throw new Error("station is too long: ".concat(station));
|
|
14
|
+
}
|
|
15
|
+
return station.padStart(STATION_WIDTH, ' ');
|
|
16
|
+
}
|
|
17
|
+
function trimZeroes(str) {
|
|
18
|
+
var match = /(-?\d+)(\.[1-9]*)0+$/.exec(str);
|
|
19
|
+
if (!match) return str;
|
|
20
|
+
return match[2].length > 1 ? match[1] + match[2] : match[1];
|
|
21
|
+
}
|
|
22
|
+
var formatNumber = function formatNumber(width) {
|
|
23
|
+
return function (num) {
|
|
24
|
+
if (num == null || !Number.isFinite(num)) return ' '.repeat(width);
|
|
25
|
+
var formatted = trimZeroes(num.toFixed(2));
|
|
26
|
+
if (formatted.length <= width) return formatted.padStart(width, ' ');
|
|
27
|
+
if (formatted.length > width + 2) return formatted.substring(0, width);
|
|
28
|
+
return trimZeroes(num.toFixed(2 - formatted.length + width)).padStart(width, ' ');
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
var LRUD_WIDTH = 3;
|
|
32
|
+
var formatLrud = formatNumber(LRUD_WIDTH);
|
|
33
|
+
var DISTANCE_WIDTH = 6;
|
|
34
|
+
var EMPTY_DISTANCE = ' '.repeat(DISTANCE_WIDTH);
|
|
35
|
+
var formatDistance = formatNumber(DISTANCE_WIDTH);
|
|
36
|
+
var AZIMUTH_WIDTH = 6;
|
|
37
|
+
var EMPTY_AZIMUTH = ' '.repeat(AZIMUTH_WIDTH);
|
|
38
|
+
var formatAzimuth = formatNumber(AZIMUTH_WIDTH);
|
|
39
|
+
var INCLINATION_WIDTH = 5;
|
|
40
|
+
var EMPTY_INCLINATION = ' '.repeat(INCLINATION_WIDTH);
|
|
41
|
+
var formatInclination = formatNumber(INCLINATION_WIDTH);
|
|
42
|
+
var formatVerticalDistance = formatNumber(INCLINATION_WIDTH);
|
|
43
|
+
var FEET_WIDTH = 4;
|
|
44
|
+
var EMPTY_FEET = ' '.repeat(FEET_WIDTH);
|
|
45
|
+
function formatFeet(distance) {
|
|
46
|
+
if (!distance) return EMPTY_FEET;
|
|
47
|
+
return formatNumber(FEET_WIDTH)(Math.trunc(distance.get(_unitized.Length.feet)));
|
|
48
|
+
}
|
|
49
|
+
var INCHES_WIDTH = 3;
|
|
50
|
+
var EMPTY_INCHES = ' '.repeat(INCHES_WIDTH);
|
|
51
|
+
function formatInches(distance) {
|
|
52
|
+
if (!distance) return EMPTY_INCHES;
|
|
53
|
+
return formatNumber(INCHES_WIDTH)(Math.round(distance.get(_unitized.Length.inches) % 12));
|
|
54
|
+
}
|
|
55
|
+
function formatFrcsShot(shot, header) {
|
|
56
|
+
var _shot$frontsightAzimu, _shot$backsightAzimut, _shot$frontsightIncli, _shot$verticalDistanc, _shot$backsightInclin, _shot$toLruds, _shot$toLruds$left, _shot$toLruds2, _shot$toLruds2$right, _shot$toLruds3, _shot$toLruds3$up, _shot$toLruds4, _shot$toLruds4$down;
|
|
57
|
+
var azimuthUnit = header.azimuthUnit,
|
|
58
|
+
inclinationUnit = header.inclinationUnit;
|
|
59
|
+
var distanceUnit = header.distanceUnit;
|
|
60
|
+
var inches = distanceUnit === _unitized.Length.inches;
|
|
61
|
+
if (inches) distanceUnit = _unitized.Length.feet;
|
|
62
|
+
if (!shot.to) {
|
|
63
|
+
var _shot$fromLruds, _shot$fromLruds$left, _shot$fromLruds2, _shot$fromLruds2$righ, _shot$fromLruds3, _shot$fromLruds3$up, _shot$fromLruds4, _shot$fromLruds4$down;
|
|
64
|
+
return [formatStation(shot.from), EMPTY_STATION, EMPTY_DISTANCE, ' ',
|
|
65
|
+
// kind
|
|
66
|
+
' ',
|
|
67
|
+
// exclude
|
|
68
|
+
EMPTY_AZIMUTH, EMPTY_AZIMUTH, EMPTY_INCLINATION, EMPTY_INCLINATION, formatLrud((_shot$fromLruds = shot.fromLruds) === null || _shot$fromLruds === void 0 ? void 0 : (_shot$fromLruds$left = _shot$fromLruds.left) === null || _shot$fromLruds$left === void 0 ? void 0 : _shot$fromLruds$left.get(distanceUnit)), formatLrud((_shot$fromLruds2 = shot.fromLruds) === null || _shot$fromLruds2 === void 0 ? void 0 : (_shot$fromLruds2$righ = _shot$fromLruds2.right) === null || _shot$fromLruds2$righ === void 0 ? void 0 : _shot$fromLruds2$righ.get(distanceUnit)), formatLrud((_shot$fromLruds3 = shot.fromLruds) === null || _shot$fromLruds3 === void 0 ? void 0 : (_shot$fromLruds3$up = _shot$fromLruds3.up) === null || _shot$fromLruds3$up === void 0 ? void 0 : _shot$fromLruds3$up.get(distanceUnit)), formatLrud((_shot$fromLruds4 = shot.fromLruds) === null || _shot$fromLruds4 === void 0 ? void 0 : (_shot$fromLruds4$down = _shot$fromLruds4.down) === null || _shot$fromLruds4$down === void 0 ? void 0 : _shot$fromLruds4$down.get(distanceUnit))].join('');
|
|
69
|
+
}
|
|
70
|
+
var distColumnValue = shot.kind === _FrcsShot.FrcsShotKind.Horizontal ? shot.horizontalDistance : shot.distance;
|
|
71
|
+
return [formatStation(shot.to), formatStation(shot.from), inches ? formatFeet(distColumnValue) : formatDistance(distColumnValue === null || distColumnValue === void 0 ? void 0 : distColumnValue.get(distanceUnit)), inches ? formatInches(distColumnValue) : shot.kind, inches ? shot.kind : shot.excludeDistance ? '*' : ' ', formatAzimuth((_shot$frontsightAzimu = shot.frontsightAzimuth) === null || _shot$frontsightAzimu === void 0 ? void 0 : _shot$frontsightAzimu.get(azimuthUnit)), formatAzimuth((_shot$backsightAzimut = shot.backsightAzimuth) === null || _shot$backsightAzimut === void 0 ? void 0 : _shot$backsightAzimut.get(azimuthUnit)), shot.kind === _FrcsShot.FrcsShotKind.Normal ? formatInclination((_shot$frontsightIncli = shot.frontsightInclination) === null || _shot$frontsightIncli === void 0 ? void 0 : _shot$frontsightIncli.get(inclinationUnit)) : formatVerticalDistance((_shot$verticalDistanc = shot.verticalDistance) === null || _shot$verticalDistanc === void 0 ? void 0 : _shot$verticalDistanc.get(distanceUnit)), shot.kind === _FrcsShot.FrcsShotKind.Normal ? formatInclination((_shot$backsightInclin = shot.backsightInclination) === null || _shot$backsightInclin === void 0 ? void 0 : _shot$backsightInclin.get(inclinationUnit)) : EMPTY_INCLINATION, formatLrud((_shot$toLruds = shot.toLruds) === null || _shot$toLruds === void 0 ? void 0 : (_shot$toLruds$left = _shot$toLruds.left) === null || _shot$toLruds$left === void 0 ? void 0 : _shot$toLruds$left.get(distanceUnit)), formatLrud((_shot$toLruds2 = shot.toLruds) === null || _shot$toLruds2 === void 0 ? void 0 : (_shot$toLruds2$right = _shot$toLruds2.right) === null || _shot$toLruds2$right === void 0 ? void 0 : _shot$toLruds2$right.get(distanceUnit)), formatLrud((_shot$toLruds3 = shot.toLruds) === null || _shot$toLruds3 === void 0 ? void 0 : (_shot$toLruds3$up = _shot$toLruds3.up) === null || _shot$toLruds3$up === void 0 ? void 0 : _shot$toLruds3$up.get(distanceUnit)), formatLrud((_shot$toLruds4 = shot.toLruds) === null || _shot$toLruds4 === void 0 ? void 0 : (_shot$toLruds4$down = _shot$toLruds4.down) === null || _shot$toLruds4$down === void 0 ? void 0 : _shot$toLruds4$down.get(distanceUnit))].join('');
|
|
72
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
5
|
+
var _mocha = require("mocha");
|
|
6
|
+
var _chai = require("chai");
|
|
7
|
+
var _formatFrcsShot = _interopRequireDefault(require("./formatFrcsShot"));
|
|
8
|
+
var _unitized = require("@speleotica/unitized");
|
|
9
|
+
var _FrcsShot = require("./FrcsShot");
|
|
10
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12
|
+
(0, _mocha.describe)("formatFrcsShot", function () {
|
|
13
|
+
var defaultHeader = {
|
|
14
|
+
name: 'Foo',
|
|
15
|
+
distanceUnit: _unitized.Length.feet,
|
|
16
|
+
azimuthUnit: _unitized.Angle.degrees,
|
|
17
|
+
inclinationUnit: _unitized.Angle.degrees,
|
|
18
|
+
backsightAzimuthCorrected: true,
|
|
19
|
+
backsightInclinationCorrected: true
|
|
20
|
+
};
|
|
21
|
+
function testCase(desc, shot, expected) {
|
|
22
|
+
var header = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : defaultHeader;
|
|
23
|
+
(0, _mocha.it)(desc, function () {
|
|
24
|
+
(0, _chai.expect)((0, _formatFrcsShot["default"])(shot, header)).to.equal(expected);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
testCase('normal shot', {
|
|
28
|
+
kind: _FrcsShot.FrcsShotKind.Normal,
|
|
29
|
+
to: 'PDF28',
|
|
30
|
+
from: 'PDF27',
|
|
31
|
+
distance: _unitized.Unitize.feet(31.7),
|
|
32
|
+
frontsightAzimuth: _unitized.Unitize.degrees(174.3),
|
|
33
|
+
backsightAzimuth: _unitized.Unitize.degrees(174.1),
|
|
34
|
+
frontsightInclination: _unitized.Unitize.degrees(-1.2),
|
|
35
|
+
backsightInclination: _unitized.Unitize.degrees(-1.6),
|
|
36
|
+
toLruds: {
|
|
37
|
+
left: _unitized.Unitize.feet(2),
|
|
38
|
+
right: _unitized.Unitize.feet(3),
|
|
39
|
+
up: _unitized.Unitize.feet(0.5),
|
|
40
|
+
down: _unitized.Unitize.feet(1.5)
|
|
41
|
+
}
|
|
42
|
+
}, 'PDF28PDF27 31.7 174.3 174.1 -1.2 -1.6 2 30.51.5');
|
|
43
|
+
testCase('excluded shot', {
|
|
44
|
+
kind: _FrcsShot.FrcsShotKind.Normal,
|
|
45
|
+
to: 'PDF28',
|
|
46
|
+
from: 'PDF27',
|
|
47
|
+
distance: _unitized.Unitize.feet(31.7),
|
|
48
|
+
excludeDistance: true,
|
|
49
|
+
frontsightAzimuth: _unitized.Unitize.degrees(174.3),
|
|
50
|
+
backsightAzimuth: _unitized.Unitize.degrees(174.1),
|
|
51
|
+
frontsightInclination: _unitized.Unitize.degrees(-1.2),
|
|
52
|
+
backsightInclination: _unitized.Unitize.degrees(-1.6),
|
|
53
|
+
toLruds: {
|
|
54
|
+
left: _unitized.Unitize.feet(2),
|
|
55
|
+
right: _unitized.Unitize.feet(3),
|
|
56
|
+
up: _unitized.Unitize.feet(0.5),
|
|
57
|
+
down: _unitized.Unitize.feet(1.5)
|
|
58
|
+
}
|
|
59
|
+
}, 'PDF28PDF27 31.7 * 174.3 174.1 -1.2 -1.6 2 30.51.5');
|
|
60
|
+
testCase('excluded horizontal shot', {
|
|
61
|
+
kind: _FrcsShot.FrcsShotKind.Horizontal,
|
|
62
|
+
to: 'PDF28',
|
|
63
|
+
from: 'PDF27',
|
|
64
|
+
distance: null,
|
|
65
|
+
horizontalDistance: _unitized.Unitize.feet(31.7),
|
|
66
|
+
verticalDistance: _unitized.Unitize.feet(5),
|
|
67
|
+
excludeDistance: true,
|
|
68
|
+
frontsightAzimuth: _unitized.Unitize.degrees(174.3),
|
|
69
|
+
backsightAzimuth: _unitized.Unitize.degrees(174.1),
|
|
70
|
+
toLruds: {
|
|
71
|
+
left: _unitized.Unitize.feet(2),
|
|
72
|
+
right: _unitized.Unitize.feet(3),
|
|
73
|
+
up: _unitized.Unitize.feet(0.5),
|
|
74
|
+
down: _unitized.Unitize.feet(1.5)
|
|
75
|
+
}
|
|
76
|
+
}, 'PDF28PDF27 31.7H* 174.3 174.1 5 2 30.51.5');
|
|
77
|
+
testCase('excluded diagonal shot', {
|
|
78
|
+
kind: _FrcsShot.FrcsShotKind.Diagonal,
|
|
79
|
+
to: 'PDF28',
|
|
80
|
+
from: 'PDF27',
|
|
81
|
+
distance: _unitized.Unitize.feet(31.7),
|
|
82
|
+
verticalDistance: _unitized.Unitize.feet(5),
|
|
83
|
+
excludeDistance: true,
|
|
84
|
+
frontsightAzimuth: _unitized.Unitize.degrees(174.3),
|
|
85
|
+
backsightAzimuth: _unitized.Unitize.degrees(174.1),
|
|
86
|
+
toLruds: {
|
|
87
|
+
left: _unitized.Unitize.feet(2),
|
|
88
|
+
right: _unitized.Unitize.feet(3),
|
|
89
|
+
up: _unitized.Unitize.feet(0.5),
|
|
90
|
+
down: _unitized.Unitize.feet(1.5)
|
|
91
|
+
}
|
|
92
|
+
}, 'PDF28PDF27 31.7D* 174.3 174.1 5 2 30.51.5');
|
|
93
|
+
testCase('horizontal feet and inches shot', {
|
|
94
|
+
to: 'A27',
|
|
95
|
+
from: 'A26',
|
|
96
|
+
kind: _FrcsShot.FrcsShotKind.Horizontal,
|
|
97
|
+
distance: null,
|
|
98
|
+
horizontalDistance: _unitized.Unitize.inches(16 * 12 + 9.6),
|
|
99
|
+
frontsightAzimuth: _unitized.Unitize.degrees(345),
|
|
100
|
+
backsightAzimuth: _unitized.Unitize.degrees(163),
|
|
101
|
+
verticalDistance: _unitized.Unitize.feet(-1),
|
|
102
|
+
toLruds: {
|
|
103
|
+
left: _unitized.Unitize.feet(0),
|
|
104
|
+
right: _unitized.Unitize.feet(3),
|
|
105
|
+
up: _unitized.Unitize.feet(5),
|
|
106
|
+
down: _unitized.Unitize.feet(4)
|
|
107
|
+
}
|
|
108
|
+
}, ' A27 A26 16 10H 345 163 -1 0 3 5 4', _objectSpread(_objectSpread({}, defaultHeader), {}, {
|
|
109
|
+
distanceUnit: _unitized.Length.inches
|
|
110
|
+
}));
|
|
111
|
+
testCase('diagonal feet and inches shot', {
|
|
112
|
+
to: 'A27',
|
|
113
|
+
from: 'A26',
|
|
114
|
+
kind: _FrcsShot.FrcsShotKind.Diagonal,
|
|
115
|
+
distance: _unitized.Unitize.inches(16 * 12 + 9.6),
|
|
116
|
+
frontsightAzimuth: _unitized.Unitize.degrees(345),
|
|
117
|
+
backsightAzimuth: _unitized.Unitize.degrees(163),
|
|
118
|
+
verticalDistance: _unitized.Unitize.feet(-1),
|
|
119
|
+
toLruds: {
|
|
120
|
+
left: _unitized.Unitize.feet(0),
|
|
121
|
+
right: _unitized.Unitize.feet(3),
|
|
122
|
+
up: _unitized.Unitize.feet(5),
|
|
123
|
+
down: _unitized.Unitize.feet(4)
|
|
124
|
+
}
|
|
125
|
+
}, ' A27 A26 16 10D 345 163 -1 0 3 5 4', _objectSpread(_objectSpread({}, defaultHeader), {}, {
|
|
126
|
+
distanceUnit: _unitized.Length.inches
|
|
127
|
+
}));
|
|
128
|
+
testCase('lrud-only shot', {
|
|
129
|
+
kind: _FrcsShot.FrcsShotKind.Normal,
|
|
130
|
+
from: 'A27',
|
|
131
|
+
distance: null,
|
|
132
|
+
fromLruds: {
|
|
133
|
+
left: _unitized.Unitize.feet(0),
|
|
134
|
+
right: _unitized.Unitize.feet(3),
|
|
135
|
+
up: _unitized.Unitize.feet(5),
|
|
136
|
+
down: _unitized.Unitize.feet(4)
|
|
137
|
+
}
|
|
138
|
+
}, ' A27 0 3 5 4');
|
|
139
|
+
});
|
package/index.d.ts
CHANGED
|
@@ -8,4 +8,5 @@ import parseFrcsPlotFile from './parseFrcsPlotFile';
|
|
|
8
8
|
import { FrcsTripSummary } from './FrcsTripSummary';
|
|
9
9
|
import { FrcsTripSummaryFile } from './FrcsTripSummaryFile';
|
|
10
10
|
import parseFrcsTripSummaryFile from './parseFrcsTripSummaryFile';
|
|
11
|
-
|
|
11
|
+
import formatFrcsShot from './formatFrcsShot';
|
|
12
|
+
export { FrcsShot, FrcsShotKind, FrcsSurveyFile, FrcsTrip, FrcsTripHeader, parseFrcsSurveyFile, FrcsPlotShot, FrcsPlotFile, parseFrcsPlotFile, FrcsTripSummary, FrcsTripSummaryFile, parseFrcsTripSummaryFile, formatFrcsShot, };
|
package/index.js
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
|
-
Object.defineProperty(exports, "
|
|
7
|
+
Object.defineProperty(exports, "FrcsPlotFile", {
|
|
9
8
|
enumerable: true,
|
|
10
9
|
get: function get() {
|
|
11
|
-
return
|
|
10
|
+
return _FrcsPlotFile.FrcsPlotFile;
|
|
12
11
|
}
|
|
13
12
|
});
|
|
14
|
-
Object.defineProperty(exports, "
|
|
13
|
+
Object.defineProperty(exports, "FrcsPlotShot", {
|
|
15
14
|
enumerable: true,
|
|
16
15
|
get: function get() {
|
|
17
|
-
return
|
|
16
|
+
return _FrcsPlotShot.FrcsPlotShot;
|
|
18
17
|
}
|
|
19
18
|
});
|
|
20
19
|
Object.defineProperty(exports, "FrcsShot", {
|
|
@@ -35,40 +34,46 @@ Object.defineProperty(exports, "FrcsSurveyFile", {
|
|
|
35
34
|
return _FrcsSurveyFile.FrcsSurveyFile;
|
|
36
35
|
}
|
|
37
36
|
});
|
|
38
|
-
Object.defineProperty(exports, "
|
|
37
|
+
Object.defineProperty(exports, "FrcsTrip", {
|
|
39
38
|
enumerable: true,
|
|
40
39
|
get: function get() {
|
|
41
|
-
return
|
|
40
|
+
return _FrcsTrip.FrcsTrip;
|
|
42
41
|
}
|
|
43
42
|
});
|
|
44
|
-
Object.defineProperty(exports, "
|
|
43
|
+
Object.defineProperty(exports, "FrcsTripHeader", {
|
|
45
44
|
enumerable: true,
|
|
46
45
|
get: function get() {
|
|
47
|
-
return
|
|
46
|
+
return _FrcsTrip.FrcsTripHeader;
|
|
48
47
|
}
|
|
49
48
|
});
|
|
50
|
-
Object.defineProperty(exports, "
|
|
49
|
+
Object.defineProperty(exports, "FrcsTripSummary", {
|
|
51
50
|
enumerable: true,
|
|
52
51
|
get: function get() {
|
|
53
|
-
return
|
|
52
|
+
return _FrcsTripSummary.FrcsTripSummary;
|
|
54
53
|
}
|
|
55
54
|
});
|
|
56
|
-
Object.defineProperty(exports, "
|
|
55
|
+
Object.defineProperty(exports, "FrcsTripSummaryFile", {
|
|
57
56
|
enumerable: true,
|
|
58
57
|
get: function get() {
|
|
59
|
-
return
|
|
58
|
+
return _FrcsTripSummaryFile.FrcsTripSummaryFile;
|
|
60
59
|
}
|
|
61
60
|
});
|
|
62
|
-
Object.defineProperty(exports, "
|
|
61
|
+
Object.defineProperty(exports, "formatFrcsShot", {
|
|
63
62
|
enumerable: true,
|
|
64
63
|
get: function get() {
|
|
65
|
-
return
|
|
64
|
+
return _formatFrcsShot["default"];
|
|
66
65
|
}
|
|
67
66
|
});
|
|
68
|
-
Object.defineProperty(exports, "
|
|
67
|
+
Object.defineProperty(exports, "parseFrcsPlotFile", {
|
|
69
68
|
enumerable: true,
|
|
70
69
|
get: function get() {
|
|
71
|
-
return
|
|
70
|
+
return _parseFrcsPlotFile["default"];
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
Object.defineProperty(exports, "parseFrcsSurveyFile", {
|
|
74
|
+
enumerable: true,
|
|
75
|
+
get: function get() {
|
|
76
|
+
return _parseFrcsSurveyFile["default"];
|
|
72
77
|
}
|
|
73
78
|
});
|
|
74
79
|
Object.defineProperty(exports, "parseFrcsTripSummaryFile", {
|
|
@@ -77,23 +82,14 @@ Object.defineProperty(exports, "parseFrcsTripSummaryFile", {
|
|
|
77
82
|
return _parseFrcsTripSummaryFile["default"];
|
|
78
83
|
}
|
|
79
84
|
});
|
|
80
|
-
|
|
81
85
|
var _FrcsTrip = require("./FrcsTrip");
|
|
82
|
-
|
|
83
86
|
var _FrcsShot = require("./FrcsShot");
|
|
84
|
-
|
|
85
87
|
var _FrcsSurveyFile = require("./FrcsSurveyFile");
|
|
86
|
-
|
|
87
88
|
var _parseFrcsSurveyFile = _interopRequireDefault(require("./parseFrcsSurveyFile"));
|
|
88
|
-
|
|
89
89
|
var _FrcsPlotShot = require("./FrcsPlotShot");
|
|
90
|
-
|
|
91
90
|
var _FrcsPlotFile = require("./FrcsPlotFile");
|
|
92
|
-
|
|
93
91
|
var _parseFrcsPlotFile = _interopRequireDefault(require("./parseFrcsPlotFile"));
|
|
94
|
-
|
|
95
92
|
var _FrcsTripSummary = require("./FrcsTripSummary");
|
|
96
|
-
|
|
97
93
|
var _FrcsTripSummaryFile = require("./FrcsTripSummaryFile");
|
|
98
|
-
|
|
99
|
-
var
|
|
94
|
+
var _parseFrcsTripSummaryFile = _interopRequireDefault(require("./parseFrcsTripSummaryFile"));
|
|
95
|
+
var _formatFrcsShot = _interopRequireDefault(require("./formatFrcsShot"));
|
package/node/index.js
CHANGED
|
@@ -1,28 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
|
-
exports.parseFrcsTripSummaryFile = exports.
|
|
9
|
-
|
|
7
|
+
exports.parseFrcsTripSummaryFile = exports.parseFrcsSurveyFile = exports.parseFrcsPlotFile = void 0;
|
|
10
8
|
var _fs = _interopRequireDefault(require("fs"));
|
|
11
|
-
|
|
12
9
|
var _readline = _interopRequireDefault(require("readline"));
|
|
13
|
-
|
|
14
10
|
var _parseFrcsSurveyFile2 = _interopRequireDefault(require("../parseFrcsSurveyFile"));
|
|
15
|
-
|
|
16
11
|
var _parseFrcsPlotFile2 = _interopRequireDefault(require("../parseFrcsPlotFile"));
|
|
17
|
-
|
|
18
12
|
var _parseFrcsTripSummaryFile2 = _interopRequireDefault(require("../parseFrcsTripSummaryFile"));
|
|
19
|
-
|
|
20
13
|
var convert = function convert(fn) {
|
|
21
14
|
return function (file) {
|
|
22
15
|
return fn(file, _readline["default"].createInterface(_fs["default"].createReadStream(file)));
|
|
23
16
|
};
|
|
24
17
|
};
|
|
25
|
-
|
|
26
18
|
var parseFrcsSurveyFile = convert(_parseFrcsSurveyFile2["default"]);
|
|
27
19
|
exports.parseFrcsSurveyFile = parseFrcsSurveyFile;
|
|
28
20
|
var parseFrcsPlotFile = convert(_parseFrcsPlotFile2["default"]);
|