raain-model 1.11.4 → 1.11.5
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/cartesian/CartesianMeasureValue.d.ts +41 -0
- package/{src/cartesian/CartesianMeasureValue.ts → cartesian/CartesianMeasureValue.js} +34 -64
- package/cartesian/CartesianMeasureValue.js.map +1 -0
- package/cartesian/CartesianValue.d.ts +9 -0
- package/cartesian/CartesianValue.js +12 -0
- package/cartesian/CartesianValue.js.map +1 -0
- package/cartesian/ICartesianMeasureValue.d.ts +29 -0
- package/cartesian/ICartesianMeasureValue.js +3 -0
- package/cartesian/ICartesianMeasureValue.js.map +1 -0
- package/cartesian/LatLng.d.ts +12 -0
- package/cartesian/LatLng.js +31 -0
- package/cartesian/LatLng.js.map +1 -0
- package/cartesian/RadarCartesianMeasureValue.d.ts +15 -0
- package/cartesian/RadarCartesianMeasureValue.js +22 -0
- package/cartesian/RadarCartesianMeasureValue.js.map +1 -0
- package/cartesian/RainCartesianMeasureValue.d.ts +17 -0
- package/cartesian/RainCartesianMeasureValue.js +25 -0
- package/cartesian/RainCartesianMeasureValue.js.map +1 -0
- package/gauge/GaugeMeasure.d.ts +20 -0
- package/gauge/GaugeMeasure.js +24 -0
- package/gauge/GaugeMeasure.js.map +1 -0
- package/gauge/GaugeNode.d.ts +24 -0
- package/gauge/GaugeNode.js +31 -0
- package/gauge/GaugeNode.js.map +1 -0
- package/gauge/GaugeNodeMap.d.ts +22 -0
- package/gauge/GaugeNodeMap.js +42 -0
- package/gauge/GaugeNodeMap.js.map +1 -0
- package/{src/index.ts → index.d.ts} +0 -6
- package/index.js +56 -0
- package/index.js.map +1 -0
- package/organization/EventNode.d.ts +22 -0
- package/organization/EventNode.js +30 -0
- package/organization/EventNode.js.map +1 -0
- package/organization/IVersion.js +3 -0
- package/organization/IVersion.js.map +1 -0
- package/organization/Link.d.ts +16 -0
- package/{src/organization/Link.ts → organization/Link.js} +13 -13
- package/organization/Link.js.map +1 -0
- package/organization/Measure.d.ts +20 -0
- package/organization/Measure.js +35 -0
- package/organization/Measure.js.map +1 -0
- package/organization/PeopleNode.d.ts +18 -0
- package/organization/PeopleNode.js +26 -0
- package/organization/PeopleNode.js.map +1 -0
- package/organization/RaainNode.d.ts +23 -0
- package/{src/organization/RaainNode.ts → organization/RaainNode.js} +29 -53
- package/organization/RaainNode.js.map +1 -0
- package/organization/TeamNode.d.ts +22 -0
- package/organization/TeamNode.js +32 -0
- package/organization/TeamNode.js.map +1 -0
- package/package.json +1 -1
- package/polar/AbstractPolarMeasureValue.d.ts +29 -0
- package/{src/polar/AbstractPolarMeasureValue.ts → polar/AbstractPolarMeasureValue.js} +29 -53
- package/polar/AbstractPolarMeasureValue.js.map +1 -0
- package/polar/GaugePolarMeasureValue.d.ts +11 -0
- package/polar/GaugePolarMeasureValue.js +14 -0
- package/polar/GaugePolarMeasureValue.js.map +1 -0
- package/polar/IPolarMeasureValue.d.ts +19 -0
- package/polar/IPolarMeasureValue.js +3 -0
- package/polar/IPolarMeasureValue.js.map +1 -0
- package/polar/MeasureValuePolarContainer.d.ts +11 -0
- package/polar/MeasureValuePolarContainer.js +22 -0
- package/polar/MeasureValuePolarContainer.js.map +1 -0
- package/polar/PolarMeasureValue.d.ts +26 -0
- package/{src/polar/PolarMeasureValue.ts → polar/PolarMeasureValue.js} +27 -46
- package/polar/PolarMeasureValue.js.map +1 -0
- package/polar/PolarValue.d.ts +10 -0
- package/polar/PolarValue.js +12 -0
- package/polar/PolarValue.js.map +1 -0
- package/polar/RadarPolarMeasureValue.d.ts +15 -0
- package/polar/RadarPolarMeasureValue.js +34 -0
- package/polar/RadarPolarMeasureValue.js.map +1 -0
- package/polar/RainPolarMeasureValue.d.ts +18 -0
- package/polar/RainPolarMeasureValue.js +42 -0
- package/polar/RainPolarMeasureValue.js.map +1 -0
- package/quality/QualityPoint.d.ts +35 -0
- package/{src/quality/QualityPoint.ts → quality/QualityPoint.js} +23 -48
- package/quality/QualityPoint.js.map +1 -0
- package/quality/SpeedMatrix.d.ts +81 -0
- package/{src/quality/SpeedMatrix.ts → quality/SpeedMatrix.js} +76 -116
- package/quality/SpeedMatrix.js.map +1 -0
- package/quality/SpeedMatrixContainer.d.ts +79 -0
- package/{src/quality/SpeedMatrixContainer.ts → quality/SpeedMatrixContainer.js} +76 -141
- package/quality/SpeedMatrixContainer.js.map +1 -0
- package/quality/history/CartesianGaugeHistory.d.ts +15 -0
- package/quality/history/CartesianGaugeHistory.js +14 -0
- package/quality/history/CartesianGaugeHistory.js.map +1 -0
- package/quality/history/CartesianRainHistory.d.ts +11 -0
- package/quality/history/CartesianRainHistory.js +12 -0
- package/quality/history/CartesianRainHistory.js.map +1 -0
- package/quality/history/PositionHistory.d.ts +20 -0
- package/quality/history/PositionHistory.js +17 -0
- package/quality/history/PositionHistory.js.map +1 -0
- package/quality/position/Position.d.ts +22 -0
- package/quality/position/Position.js +50 -0
- package/quality/position/Position.js.map +1 -0
- package/quality/position/PositionValue.d.ts +9 -0
- package/quality/position/PositionValue.js +12 -0
- package/quality/position/PositionValue.js.map +1 -0
- package/quality/tools/QualityTools.d.ts +24 -0
- package/{src/quality/tools/QualityTools.ts → quality/tools/QualityTools.js} +49 -82
- package/quality/tools/QualityTools.js.map +1 -0
- package/radar/RadarMeasure.d.ts +17 -0
- package/radar/RadarMeasure.js +18 -0
- package/radar/RadarMeasure.js.map +1 -0
- package/radar/RadarNode.d.ts +24 -0
- package/radar/RadarNode.js +31 -0
- package/radar/RadarNode.js.map +1 -0
- package/radar/RadarNodeMap.d.ts +28 -0
- package/radar/RadarNodeMap.js +46 -0
- package/radar/RadarNodeMap.js.map +1 -0
- package/rain/RainComputation.d.ts +34 -0
- package/rain/RainComputation.js +55 -0
- package/rain/RainComputation.js.map +1 -0
- package/rain/RainComputationAbstract.d.ts +41 -0
- package/rain/RainComputationAbstract.js +102 -0
- package/rain/RainComputationAbstract.js.map +1 -0
- package/rain/RainComputationMap.d.ts +32 -0
- package/rain/RainComputationMap.js +45 -0
- package/rain/RainComputationMap.js.map +1 -0
- package/rain/RainComputationQuality.d.ts +37 -0
- package/{src/rain/RainComputationQuality.ts → rain/RainComputationQuality.js} +20 -56
- package/rain/RainComputationQuality.js.map +1 -0
- package/rain/RainMeasure.d.ts +18 -0
- package/rain/RainMeasure.js +19 -0
- package/rain/RainMeasure.js.map +1 -0
- package/rain/RainNode.d.ts +38 -0
- package/{src/rain/RainNode.ts → rain/RainNode.js} +48 -76
- package/rain/RainNode.js.map +1 -0
- package/.travis.deploy.sh +0 -41
- package/.travis.yml +0 -22
- package/specs/cartesian/Cartesian.spec.ts +0 -56
- package/specs/gauge/Gauge.spec.ts +0 -19
- package/specs/organization/Organization.spec.ts +0 -32
- package/specs/polar/Polar.spec.ts +0 -25
- package/specs/quality/Position.spec.ts +0 -18
- package/specs/quality/QualityTools.spec.ts +0 -120
- package/specs/quality/SpeedMatrix.spec.ts +0 -125
- package/specs/radar/Radar.spec.ts +0 -18
- package/specs/rain/Rain.spec.ts +0 -71
- package/specs/tsconfig.json +0 -12
- package/src/cartesian/CartesianValue.ts +0 -17
- package/src/cartesian/ICartesianMeasureValue.ts +0 -27
- package/src/cartesian/LatLng.ts +0 -39
- package/src/cartesian/RadarCartesianMeasureValue.ts +0 -29
- package/src/cartesian/RainCartesianMeasureValue.ts +0 -33
- package/src/gauge/GaugeMeasure.ts +0 -36
- package/src/gauge/GaugeNode.ts +0 -46
- package/src/gauge/GaugeNodeMap.ts +0 -55
- package/src/organization/EventNode.ts +0 -44
- package/src/organization/Measure.ts +0 -49
- package/src/organization/PeopleNode.ts +0 -36
- package/src/organization/TeamNode.ts +0 -46
- package/src/polar/GaugePolarMeasureValue.ts +0 -15
- package/src/polar/IPolarMeasureValue.ts +0 -21
- package/src/polar/MeasureValuePolarContainer.ts +0 -28
- package/src/polar/PolarValue.ts +0 -16
- package/src/polar/RadarPolarMeasureValue.ts +0 -43
- package/src/polar/RainPolarMeasureValue.ts +0 -57
- package/src/quality/history/CartesianGaugeHistory.ts +0 -23
- package/src/quality/history/CartesianRainHistory.ts +0 -18
- package/src/quality/history/PositionHistory.ts +0 -31
- package/src/quality/position/Position.ts +0 -60
- package/src/quality/position/PositionValue.ts +0 -15
- package/src/radar/RadarMeasure.ts +0 -27
- package/src/radar/RadarNode.ts +0 -46
- package/src/radar/RadarNodeMap.ts +0 -65
- package/src/rain/RainComputation.ts +0 -82
- package/src/rain/RainComputationAbstract.ts +0 -137
- package/src/rain/RainComputationMap.ts +0 -68
- package/src/rain/RainMeasure.ts +0 -27
- package/tsconfig.json +0 -17
- package/tslint.json +0 -79
- /package/{src/organization/IVersion.ts → organization/IVersion.d.ts} +0 -0
|
@@ -1,121 +1,97 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
protected polars: PolarMeasureValue;
|
|
9
|
-
|
|
10
|
-
constructor(json: {
|
|
11
|
-
polars: AbstractPolarMeasureValue | PolarMeasureValue | string
|
|
12
|
-
}) {
|
|
13
|
-
|
|
14
|
-
if (!json?.polars) {
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AbstractPolarMeasureValue = void 0;
|
|
4
|
+
const PolarMeasureValue_1 = require("./PolarMeasureValue");
|
|
5
|
+
class AbstractPolarMeasureValue {
|
|
6
|
+
constructor(json) {
|
|
7
|
+
if (!(json === null || json === void 0 ? void 0 : json.polars)) {
|
|
15
8
|
throw new Error('PolarMeasureValue needs polars');
|
|
16
9
|
}
|
|
17
|
-
|
|
18
10
|
let polars = json.polars;
|
|
19
11
|
if (typeof polars === 'string') {
|
|
20
12
|
if (polars.indexOf('polars') > 0) {
|
|
21
13
|
polars = JSON.parse(polars);
|
|
22
|
-
}
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
23
16
|
this.setPolarsAsString(polars);
|
|
24
17
|
return;
|
|
25
18
|
}
|
|
26
19
|
}
|
|
27
|
-
|
|
28
|
-
if (polars instanceof PolarMeasureValue) {
|
|
20
|
+
if (polars instanceof PolarMeasureValue_1.PolarMeasureValue) {
|
|
29
21
|
this.setPolarsAsContainer(polars.getPolars());
|
|
30
22
|
return;
|
|
31
23
|
}
|
|
32
|
-
|
|
33
24
|
let polarMeasure = polars;
|
|
34
25
|
if (polars && typeof polars['polars'] !== 'undefined' && typeof polars['angle'] !== 'undefined') {
|
|
35
26
|
polarMeasure = polars['polars'];
|
|
36
27
|
}
|
|
37
|
-
|
|
38
28
|
let subPolars = polarMeasure;
|
|
39
29
|
if (polarMeasure && polarMeasure['polars']) {
|
|
40
30
|
subPolars = polarMeasure['polars'];
|
|
41
31
|
}
|
|
42
|
-
|
|
43
|
-
if (subPolars instanceof PolarMeasureValue) {
|
|
32
|
+
if (subPolars instanceof PolarMeasureValue_1.PolarMeasureValue) {
|
|
44
33
|
this.setPolarsAsContainer(subPolars.getPolars());
|
|
45
34
|
return;
|
|
46
35
|
}
|
|
47
|
-
|
|
48
36
|
if (typeof subPolars === 'string') {
|
|
49
37
|
this.setPolarsAsString(subPolars);
|
|
50
38
|
return;
|
|
51
39
|
}
|
|
52
|
-
|
|
53
40
|
if (Array.isArray(subPolars)) {
|
|
54
41
|
this.setPolarsAsContainer(subPolars);
|
|
55
42
|
return;
|
|
56
43
|
}
|
|
57
|
-
|
|
58
44
|
throw new Error('PolarMeasureValue needs valid typed polars');
|
|
59
45
|
}
|
|
60
|
-
|
|
61
|
-
getPolarsStringified(): string {
|
|
46
|
+
getPolarsStringified() {
|
|
62
47
|
return this.polars.getPolarsStringified();
|
|
63
48
|
}
|
|
64
|
-
|
|
65
|
-
getPolars(): MeasureValuePolarContainer[] {
|
|
49
|
+
getPolars() {
|
|
66
50
|
return this.polars.getPolars();
|
|
67
51
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
this.polars = new PolarMeasureValue({measureValuePolarContainers: s});
|
|
52
|
+
setPolarsAsString(s) {
|
|
53
|
+
this.polars = new PolarMeasureValue_1.PolarMeasureValue({ measureValuePolarContainers: s });
|
|
71
54
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
this.polars = new PolarMeasureValue({measureValuePolarContainers: s});
|
|
55
|
+
setPolarsAsContainer(s) {
|
|
56
|
+
this.polars = new PolarMeasureValue_1.PolarMeasureValue({ measureValuePolarContainers: s });
|
|
75
57
|
}
|
|
76
|
-
|
|
77
|
-
getPolarValue(json: { azimuthIndex: number, edgeIndex: number, strict?: boolean }): PolarValue {
|
|
58
|
+
getPolarValue(json) {
|
|
78
59
|
return this.polars.getPolarValue(json);
|
|
79
60
|
}
|
|
80
|
-
|
|
81
|
-
setPolarValue(json: { azimuthIndex: number, edgeIndex: number, value: number }): void {
|
|
61
|
+
setPolarValue(json) {
|
|
82
62
|
return this.polars.setPolarValue(json);
|
|
83
63
|
}
|
|
84
|
-
|
|
85
|
-
getAzimuthsCount(): number {
|
|
64
|
+
getAzimuthsCount() {
|
|
86
65
|
return this.polars.getPolars().length;
|
|
87
66
|
}
|
|
88
|
-
|
|
89
|
-
getPolarEdgesCount(): number {
|
|
67
|
+
getPolarEdgesCount() {
|
|
90
68
|
const polars = this.polars.getPolars();
|
|
91
69
|
if (polars.length > 0) {
|
|
92
70
|
return polars[0].polarEdges.length;
|
|
93
71
|
}
|
|
94
72
|
return 0;
|
|
95
73
|
}
|
|
96
|
-
|
|
97
|
-
getDistance(): number {
|
|
74
|
+
getDistance() {
|
|
98
75
|
const polars = this.polars.getPolars();
|
|
99
76
|
if (polars.length > 0) {
|
|
100
77
|
return polars[0].distance;
|
|
101
78
|
}
|
|
102
79
|
return 1;
|
|
103
80
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
let polars: any = this.polars;
|
|
81
|
+
toJSON(stringify = false) {
|
|
82
|
+
let polars = this.polars;
|
|
107
83
|
if (stringify) {
|
|
108
84
|
polars = this.polars.toJSONWithPolarStringified();
|
|
109
85
|
}
|
|
110
|
-
|
|
111
|
-
const json: any = {
|
|
86
|
+
const json = {
|
|
112
87
|
polars,
|
|
113
88
|
};
|
|
114
89
|
return json;
|
|
115
90
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
const json: any = this.polars.toJSONWithPolarStringified();
|
|
91
|
+
toJSONWithPolarStringified() {
|
|
92
|
+
const json = this.polars.toJSONWithPolarStringified();
|
|
119
93
|
return json;
|
|
120
94
|
}
|
|
121
95
|
}
|
|
96
|
+
exports.AbstractPolarMeasureValue = AbstractPolarMeasureValue;
|
|
97
|
+
//# sourceMappingURL=AbstractPolarMeasureValue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AbstractPolarMeasureValue.js","sourceRoot":"","sources":["../../src/polar/AbstractPolarMeasureValue.ts"],"names":[],"mappings":";;;AAEA,2DAAsD;AAGtD,MAAa,yBAAyB;IAIlC,YAAY,IAEX;QAEG,IAAI,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,MAAM,CAAA,EAAE;YACf,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;SACrD;QAED,IAAI,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QACzB,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;YAC5B,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;gBAC9B,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;aAC/B;iBAAM;gBACH,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;gBAC/B,OAAO;aACV;SACJ;QAED,IAAI,MAAM,YAAY,qCAAiB,EAAE;YACrC,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC;YAC9C,OAAO;SACV;QAED,IAAI,YAAY,GAAG,MAAM,CAAC;QAC1B,IAAI,MAAM,IAAI,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,W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E;QAC1E,OAAO,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;IAED,gBAAgB;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,MAAM,CAAC;IAC1C,CAAC;IAED,kBAAkB;QACd,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;QACvC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;YACnB,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC;SACtC;QACD,OAAO,CAAC,CAAC;IACb,CAAC;IAED,WAAW;QACP,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;QACvC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;YACnB,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;SAC7B;QACD,OAAO,CAAC,CAAC;IACb,CAAC;IAEM,MAAM,CAAC,SAAS,GAAG,KAAK;QAC3B,IAAI,MAAM,GAAQ,IAAI,CAAC,MAAM,CAAC;QAC9B,IAAI,SAAS,EAAE;YACX,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,0BAA0B,EAAE,CAAC;SACrD;QAED,MAAM,IAAI,GAAQ;YACd,MAAM;SACT,CAAC;QACF,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,0BAA0B;QAC7B,MAAM,IAAI,GAAQ,IAAI,CAAC,MAAM,CAAC,0BAA0B,EAAE,CAAC;QAC3D,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAnHD,8DAmHC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IPolarMeasureValue } from './IPolarMeasureValue';
|
|
2
|
+
import { AbstractPolarMeasureValue } from './AbstractPolarMeasureValue';
|
|
3
|
+
import { PolarMeasureValue } from './PolarMeasureValue';
|
|
4
|
+
/**
|
|
5
|
+
* Gauge with single polar value container
|
|
6
|
+
*/
|
|
7
|
+
export declare class GaugePolarMeasureValue extends AbstractPolarMeasureValue implements IPolarMeasureValue {
|
|
8
|
+
constructor(json: {
|
|
9
|
+
polars: string | PolarMeasureValue | AbstractPolarMeasureValue;
|
|
10
|
+
});
|
|
11
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GaugePolarMeasureValue = void 0;
|
|
4
|
+
const AbstractPolarMeasureValue_1 = require("./AbstractPolarMeasureValue");
|
|
5
|
+
/**
|
|
6
|
+
* Gauge with single polar value container
|
|
7
|
+
*/
|
|
8
|
+
class GaugePolarMeasureValue extends AbstractPolarMeasureValue_1.AbstractPolarMeasureValue {
|
|
9
|
+
constructor(json) {
|
|
10
|
+
super(json);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.GaugePolarMeasureValue = GaugePolarMeasureValue;
|
|
14
|
+
//# sourceMappingURL=GaugePolarMeasureValue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GaugePolarMeasureValue.js","sourceRoot":"","sources":["../../src/polar/GaugePolarMeasureValue.ts"],"names":[],"mappings":";;;AACA,2EAAsE;AAGtE;;GAEG;AACH,MAAa,sBAAuB,SAAQ,qDAAyB;IAEjE,YAAY,IAEX;QACG,KAAK,CAAC,IAAI,CAAC,CAAC;IAChB,CAAC;CACJ;AAPD,wDAOC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { MeasureValuePolarContainer } from './MeasureValuePolarContainer';
|
|
2
|
+
import { PolarValue } from './PolarValue';
|
|
3
|
+
export interface IPolarMeasureValue {
|
|
4
|
+
getPolarsStringified(): string;
|
|
5
|
+
getPolars(): MeasureValuePolarContainer[];
|
|
6
|
+
setPolarsAsString(s: string): void;
|
|
7
|
+
setPolarsAsContainer(s: MeasureValuePolarContainer[]): void;
|
|
8
|
+
toJSON(): JSON;
|
|
9
|
+
toJSONWithPolarStringified(): JSON;
|
|
10
|
+
getPolarValue(json: {
|
|
11
|
+
azimuthIndex: number;
|
|
12
|
+
edgeIndex: number;
|
|
13
|
+
}): PolarValue;
|
|
14
|
+
setPolarValue(json: {
|
|
15
|
+
azimuthIndex: number;
|
|
16
|
+
edgeIndex: number;
|
|
17
|
+
value: number;
|
|
18
|
+
}): void;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IPolarMeasureValue.js","sourceRoot":"","sources":["../../src/polar/IPolarMeasureValue.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MeasureValuePolarContainer = void 0;
|
|
4
|
+
class MeasureValuePolarContainer {
|
|
5
|
+
constructor(json) {
|
|
6
|
+
if (typeof (json === null || json === void 0 ? void 0 : json.azimuth) === 'undefined') {
|
|
7
|
+
throw new Error('MeasureValuePolarContainer needs a valid Object');
|
|
8
|
+
}
|
|
9
|
+
this.azimuth = json.azimuth;
|
|
10
|
+
this.distance = json.distance;
|
|
11
|
+
this.polarEdges = json.polarEdges;
|
|
12
|
+
}
|
|
13
|
+
toJSON() {
|
|
14
|
+
return {
|
|
15
|
+
azimuth: this.azimuth,
|
|
16
|
+
distance: this.distance,
|
|
17
|
+
polarEdges: this.polarEdges,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.MeasureValuePolarContainer = MeasureValuePolarContainer;
|
|
22
|
+
//# sourceMappingURL=MeasureValuePolarContainer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MeasureValuePolarContainer.js","sourceRoot":"","sources":["../../src/polar/MeasureValuePolarContainer.ts"],"names":[],"mappings":";;;AAAA,MAAa,0BAA0B;IAKnC,YAAY,IAIX;QAEG,IAAI,OAAO,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,CAAA,KAAK,WAAW,EAAE;YACtC,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;SACtE;QAED,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC9B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;IACtC,CAAC;IAEM,MAAM;QACT,OAAO;YACH,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,UAAU,EAAE,IAAI,CAAC,UAAU;SACvB,CAAC;IACb,CAAC;CACJ;AA3BD,gEA2BC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { MeasureValuePolarContainer } from './MeasureValuePolarContainer';
|
|
2
|
+
import { IPolarMeasureValue } from './IPolarMeasureValue';
|
|
3
|
+
import { PolarValue } from './PolarValue';
|
|
4
|
+
export declare class PolarMeasureValue implements IPolarMeasureValue {
|
|
5
|
+
private polars;
|
|
6
|
+
constructor(json: {
|
|
7
|
+
measureValuePolarContainers: MeasureValuePolarContainer[] | string;
|
|
8
|
+
});
|
|
9
|
+
getPolarsStringified(): string;
|
|
10
|
+
getPolars(): MeasureValuePolarContainer[];
|
|
11
|
+
setPolarsAsString(s: string): void;
|
|
12
|
+
setPolarsAsContainer(measureValuePolarContainers: MeasureValuePolarContainer[]): void;
|
|
13
|
+
getPolarValue(json: {
|
|
14
|
+
azimuthIndex: number;
|
|
15
|
+
edgeIndex: number;
|
|
16
|
+
strict?: boolean;
|
|
17
|
+
}): PolarValue;
|
|
18
|
+
setPolarValue(json: {
|
|
19
|
+
azimuthIndex: number;
|
|
20
|
+
edgeIndex: number;
|
|
21
|
+
value: number;
|
|
22
|
+
}): void;
|
|
23
|
+
toJSON(): JSON;
|
|
24
|
+
toJSONWithPolarStringified(): JSON;
|
|
25
|
+
protected updateIndex(array: Array<any>, index: number): number;
|
|
26
|
+
}
|
|
@@ -1,62 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
constructor(json: {
|
|
9
|
-
measureValuePolarContainers: MeasureValuePolarContainer[] | string
|
|
10
|
-
}) {
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PolarMeasureValue = void 0;
|
|
4
|
+
const MeasureValuePolarContainer_1 = require("./MeasureValuePolarContainer");
|
|
5
|
+
const PolarValue_1 = require("./PolarValue");
|
|
6
|
+
class PolarMeasureValue {
|
|
7
|
+
constructor(json) {
|
|
11
8
|
if (typeof json.measureValuePolarContainers === 'string') {
|
|
12
9
|
this.setPolarsAsString(json.measureValuePolarContainers);
|
|
13
10
|
return;
|
|
14
11
|
}
|
|
15
|
-
|
|
16
12
|
if (json.measureValuePolarContainers instanceof PolarMeasureValue && json.measureValuePolarContainers.getPolars()) {
|
|
17
13
|
this.setPolarsAsContainer(json.measureValuePolarContainers.getPolars());
|
|
18
14
|
return;
|
|
19
15
|
}
|
|
20
|
-
|
|
21
16
|
this.setPolarsAsContainer(json.measureValuePolarContainers);
|
|
22
17
|
}
|
|
23
|
-
|
|
24
|
-
getPolarsStringified(): string {
|
|
18
|
+
getPolarsStringified() {
|
|
25
19
|
return JSON.stringify(this.getPolars());
|
|
26
20
|
}
|
|
27
|
-
|
|
28
|
-
getPolars(): MeasureValuePolarContainer[] {
|
|
21
|
+
getPolars() {
|
|
29
22
|
return this.polars;
|
|
30
23
|
}
|
|
31
|
-
|
|
32
|
-
setPolarsAsString(s: string): void {
|
|
24
|
+
setPolarsAsString(s) {
|
|
33
25
|
try {
|
|
34
26
|
let polars = JSON.parse(s);
|
|
35
|
-
|
|
36
27
|
if (polars && polars.polars) {
|
|
37
28
|
polars = polars.polars;
|
|
38
29
|
}
|
|
39
|
-
|
|
40
30
|
if (typeof polars === 'string') {
|
|
41
31
|
polars = JSON.parse(polars);
|
|
42
32
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
33
|
+
this.polars = polars.map(convertedPolar => new MeasureValuePolarContainer_1.MeasureValuePolarContainer(convertedPolar));
|
|
34
|
+
}
|
|
35
|
+
catch (e) {
|
|
46
36
|
console.warn('setPolarsAsString pb: ', e, typeof s, s);
|
|
47
37
|
this.polars = [];
|
|
48
38
|
}
|
|
49
39
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
let parsed: any = measureValuePolarContainers ? measureValuePolarContainers : [];
|
|
40
|
+
setPolarsAsContainer(measureValuePolarContainers) {
|
|
41
|
+
let parsed = measureValuePolarContainers ? measureValuePolarContainers : [];
|
|
53
42
|
if (!('length' in parsed)) {
|
|
54
43
|
parsed = [];
|
|
55
44
|
}
|
|
56
45
|
this.polars = parsed;
|
|
57
46
|
}
|
|
58
|
-
|
|
59
|
-
getPolarValue(json: { azimuthIndex: number, edgeIndex: number, strict?: boolean }): PolarValue {
|
|
47
|
+
getPolarValue(json) {
|
|
60
48
|
let azimuthIndex = json.azimuthIndex;
|
|
61
49
|
if (!json.strict) {
|
|
62
50
|
azimuthIndex = this.updateIndex(this.polars, json.azimuthIndex);
|
|
@@ -65,7 +53,6 @@ export class PolarMeasureValue implements IPolarMeasureValue {
|
|
|
65
53
|
if (!azimuthContainer) {
|
|
66
54
|
return null;
|
|
67
55
|
}
|
|
68
|
-
|
|
69
56
|
let edgeIndex = json.edgeIndex;
|
|
70
57
|
if (!json.strict) {
|
|
71
58
|
edgeIndex = this.updateIndex(azimuthContainer.polarEdges, json.edgeIndex);
|
|
@@ -74,19 +61,13 @@ export class PolarMeasureValue implements IPolarMeasureValue {
|
|
|
74
61
|
if (typeof edgeValue === 'undefined') {
|
|
75
62
|
return null;
|
|
76
63
|
}
|
|
77
|
-
|
|
78
|
-
return new PolarValue({
|
|
64
|
+
return new PolarValue_1.PolarValue({
|
|
79
65
|
value: edgeValue,
|
|
80
66
|
polarAzimuthInDegrees: azimuthContainer.azimuth,
|
|
81
67
|
polarDistanceInMeters: azimuthContainer.distance * edgeIndex
|
|
82
68
|
});
|
|
83
69
|
}
|
|
84
|
-
|
|
85
|
-
setPolarValue(json: {
|
|
86
|
-
azimuthIndex: number,
|
|
87
|
-
edgeIndex: number,
|
|
88
|
-
value: number
|
|
89
|
-
}): void {
|
|
70
|
+
setPolarValue(json) {
|
|
90
71
|
const azimuthIndex = this.updateIndex(this.polars, json.azimuthIndex);
|
|
91
72
|
const azimuthContainer = this.polars[azimuthIndex];
|
|
92
73
|
if (!azimuthContainer) {
|
|
@@ -95,25 +76,25 @@ export class PolarMeasureValue implements IPolarMeasureValue {
|
|
|
95
76
|
const edgeIndex = this.updateIndex(azimuthContainer.polarEdges, json.edgeIndex);
|
|
96
77
|
azimuthContainer.polarEdges[edgeIndex] = json.value;
|
|
97
78
|
}
|
|
98
|
-
|
|
99
|
-
public toJSON(): JSON {
|
|
79
|
+
toJSON() {
|
|
100
80
|
return {
|
|
101
81
|
polars: this.polars
|
|
102
|
-
}
|
|
82
|
+
};
|
|
103
83
|
}
|
|
104
|
-
|
|
105
|
-
public toJSONWithPolarStringified(): JSON {
|
|
84
|
+
toJSONWithPolarStringified() {
|
|
106
85
|
return {
|
|
107
86
|
polars: this.getPolarsStringified()
|
|
108
|
-
}
|
|
87
|
+
};
|
|
109
88
|
}
|
|
110
|
-
|
|
111
|
-
protected updateIndex(array: Array<any>, index: number): number {
|
|
89
|
+
updateIndex(array, index) {
|
|
112
90
|
if (array.length <= index) {
|
|
113
91
|
index = index - array.length;
|
|
114
|
-
}
|
|
92
|
+
}
|
|
93
|
+
else if (index < 0) {
|
|
115
94
|
index = array.length + index;
|
|
116
95
|
}
|
|
117
96
|
return index;
|
|
118
97
|
}
|
|
119
98
|
}
|
|
99
|
+
exports.PolarMeasureValue = PolarMeasureValue;
|
|
100
|
+
//# sourceMapping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,QAAQ,GAAG,SAAS;SAC/D,CAAC,CAAC;IACP,CAAC;IAED,aAAa,CAAC,IAIb;QACG,MAAM,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QACtE,MAAM,gBAAgB,GAAG,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;QACnD,IAAI,CAAC,gBAAgB,EAAE;YACnB,OAAO,IAAI,CAAC;SACf;QACD,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;QAChF,gBAAgB,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC;IACxD,CAAC;IAEM,MAAM;QACT,OAAO;YACH,MAAM,EAAE,IAAI,CAAC,MAAM;SACf,CAAC;IACb,CAAC;IAEM,0BAA0B;QAC7B,OAAO;YACH,MAAM,EAAE,IAAI,CAAC,oBAAoB,EAAE;SAC/B,CAAC;IACb,CAAC;IAES,WAAW,CAAC,KAAiB,EAAE,KAAa;QAClD,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,EAAE;YACvB,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC;SAChC;aAAM,IAAI,KAAK,GAAG,CAAC,EAAE;YAClB,KAAK,GAAG,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC;SAChC;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ;AAlHD,8CAkHC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PolarValue = void 0;
|
|
4
|
+
class PolarValue {
|
|
5
|
+
constructor(json) {
|
|
6
|
+
this.value = json.value;
|
|
7
|
+
this.polarAzimuthInDegrees = json.polarAzimuthInDegrees;
|
|
8
|
+
this.polarDistanceInMeters = json.polarDistanceInMeters;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.PolarValue = PolarValue;
|
|
12
|
+
//# sourceMappingURL=PolarValue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PolarValue.js","sourceRoot":"","sources":["../../src/polar/PolarValue.ts"],"names":[],"mappings":";;;AAAA,MAAa,UAAU;IAKnB,YAAY,IAIX;QACG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACxB,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC,qBAAqB,CAAC;QACxD,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC,qBAAqB,CAAC;IAC5D,CAAC;CACJ;AAdD,gCAcC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IPolarMeasureValue } from './IPolarMeasureValue';
|
|
2
|
+
import { AbstractPolarMeasureValue } from './AbstractPolarMeasureValue';
|
|
3
|
+
import { PolarMeasureValue } from './PolarMeasureValue';
|
|
4
|
+
/**
|
|
5
|
+
* Radar with polar value containers
|
|
6
|
+
*/
|
|
7
|
+
export declare class RadarPolarMeasureValue extends AbstractPolarMeasureValue implements IPolarMeasureValue {
|
|
8
|
+
angle: number;
|
|
9
|
+
constructor(json: {
|
|
10
|
+
polars: RadarPolarMeasureValue | PolarMeasureValue | string;
|
|
11
|
+
angle?: number;
|
|
12
|
+
});
|
|
13
|
+
toJSON(stringify?: boolean): JSON;
|
|
14
|
+
toJSONWithPolarStringified(): JSON;
|
|
15
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RadarPolarMeasureValue = void 0;
|
|
4
|
+
const AbstractPolarMeasureValue_1 = require("./AbstractPolarMeasureValue");
|
|
5
|
+
/**
|
|
6
|
+
* Radar with polar value containers
|
|
7
|
+
*/
|
|
8
|
+
class RadarPolarMeasureValue extends AbstractPolarMeasureValue_1.AbstractPolarMeasureValue {
|
|
9
|
+
constructor(json) {
|
|
10
|
+
super(json);
|
|
11
|
+
if (json.polars instanceof RadarPolarMeasureValue) {
|
|
12
|
+
this.angle = json.polars.angle;
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
if (typeof json.polars === 'string') {
|
|
16
|
+
const object = JSON.parse(json.polars);
|
|
17
|
+
this.angle = json.angle ? json.angle : object.angle;
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
this.angle = json.angle;
|
|
21
|
+
}
|
|
22
|
+
toJSON(stringify = false) {
|
|
23
|
+
const json = super.toJSON(stringify);
|
|
24
|
+
json.angle = this.angle;
|
|
25
|
+
return json;
|
|
26
|
+
}
|
|
27
|
+
toJSONWithPolarStringified() {
|
|
28
|
+
const json = super.toJSONWithPolarStringified();
|
|
29
|
+
json.angle = this.angle;
|
|
30
|
+
return json;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.RadarPolarMeasureValue = RadarPolarMeasureValue;
|
|
34
|
+
//# sourceMappingURL=RadarPolarMeasureValue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadarPolarMeasureValue.js","sourceRoot":"","sources":["../../src/polar/RadarPolarMeasureValue.ts"],"names":[],"mappings":";;;AACA,2EAAsE;AAGtE;;GAEG;AACH,MAAa,sBAAuB,SAAQ,qDAAyB;IAIjE,YAAY,IAGX;QACG,KAAK,CAAC,IAAI,CAAC,CAAC;QAEZ,IAAI,IAAI,CAAC,MAAM,YAAY,sBAAsB,EAAE;YAC/C,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;YAC/B,OAAO;SACV;QAED,IAAI,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ,EAAE;YACjC,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACvC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;YACpD,OAAO;SACV;QAED,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;IAC5B,CAAC;IAEM,MAAM,CAAC,SAAS,GAAG,KAAK;QAC3B,MAAM,IAAI,GAAQ,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAC1C,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACxB,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,0BAA0B;QAC7B,MAAM,IAAI,GAAQ,KAAK,CAAC,0BAA0B,EAAE,CAAC;QACrD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACxB,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAnCD,wDAmCC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IPolarMeasureValue } from './IPolarMeasureValue';
|
|
2
|
+
import { IVersion } from '../organization/IVersion';
|
|
3
|
+
import { AbstractPolarMeasureValue } from './AbstractPolarMeasureValue';
|
|
4
|
+
import { PolarMeasureValue } from './PolarMeasureValue';
|
|
5
|
+
/**
|
|
6
|
+
* Computed Rain with polar value containers
|
|
7
|
+
*/
|
|
8
|
+
export declare class RainPolarMeasureValue extends AbstractPolarMeasureValue implements IPolarMeasureValue, IVersion {
|
|
9
|
+
private readonly version;
|
|
10
|
+
constructor(json: {
|
|
11
|
+
polars: RainPolarMeasureValue | PolarMeasureValue | string;
|
|
12
|
+
version?: string;
|
|
13
|
+
});
|
|
14
|
+
static From(obj: any): RainPolarMeasureValue;
|
|
15
|
+
toJSON(stringify?: boolean): JSON;
|
|
16
|
+
toJSONWithPolarStringified(): JSON;
|
|
17
|
+
getVersion(): string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RainPolarMeasureValue = void 0;
|
|
4
|
+
const AbstractPolarMeasureValue_1 = require("./AbstractPolarMeasureValue");
|
|
5
|
+
/**
|
|
6
|
+
* Computed Rain with polar value containers
|
|
7
|
+
*/
|
|
8
|
+
class RainPolarMeasureValue extends AbstractPolarMeasureValue_1.AbstractPolarMeasureValue {
|
|
9
|
+
constructor(json) {
|
|
10
|
+
super(json);
|
|
11
|
+
if (json.polars instanceof RainPolarMeasureValue) {
|
|
12
|
+
this.version = json.polars.version;
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
this.version = json.version;
|
|
16
|
+
}
|
|
17
|
+
static From(obj) {
|
|
18
|
+
let version, polars;
|
|
19
|
+
if (typeof obj.version === 'string') {
|
|
20
|
+
version = obj.version;
|
|
21
|
+
}
|
|
22
|
+
if (typeof obj.polars !== 'undefined') {
|
|
23
|
+
polars = obj.polars;
|
|
24
|
+
}
|
|
25
|
+
return new RainPolarMeasureValue({ polars, version });
|
|
26
|
+
}
|
|
27
|
+
toJSON(stringify = false) {
|
|
28
|
+
const json = super.toJSON(stringify);
|
|
29
|
+
json.version = this.version;
|
|
30
|
+
return json;
|
|
31
|
+
}
|
|
32
|
+
toJSONWithPolarStringified() {
|
|
33
|
+
const json = super.toJSONWithPolarStringified();
|
|
34
|
+
json.version = this.version;
|
|
35
|
+
return json;
|
|
36
|
+
}
|
|
37
|
+
getVersion() {
|
|
38
|
+
return this.version;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.RainPolarMeasureValue = RainPolarMeasureValue;
|
|
42
|
+
//# sourceMappingURL=RainPolarMeasureValue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RainPolarMeasureValue.js","sourceRoot":"","sources":["../../src/polar/RainPolarMeasureValue.ts"],"names":[],"mappings":";;;AAEA,2EAAsE;AAGtE;;GAEG;AACH,MAAa,qBAAsB,SAAQ,qDAAyB;IAIhE,YAAY,IAGX;QACG,KAAK,CAAC,IAAI,CAAC,CAAC;QAEZ,IAAI,IAAI,CAAC,MAAM,YAAY,qBAAqB,EAAE;YAC9C,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;YACnC,OAAO;SACV;QAED,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;IAChC,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,GAAQ;QAChB,IAAI,OAAe,EACf,MAAyB,CAAC;QAE9B,IAAI,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ,EAAE;YACjC,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC;SACzB;QAED,IAAI,OAAO,GAAG,CAAC,MAAM,KAAK,WAAW,EAAE;YACnC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;SACvB;QAED,OAAO,IAAI,qBAAqB,CAAC,EAAC,MAAM,EAAE,OAAO,EAAC,CAAC,CAAC;IACxD,CAAC;IAEM,MAAM,CAAC,SAAS,GAAG,KAAK;QAC3B,MAAM,IAAI,GAAQ,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAC1C,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,0BAA0B;QAC7B,MAAM,IAAI,GAAQ,KAAK,CAAC,0BAA0B,EAAE,CAAC;QACrD,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,UAAU;QACb,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;CACJ;AAhDD,sDAgDC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { CartesianValue } from '../cartesian/CartesianValue';
|
|
2
|
+
export declare class QualityPoint {
|
|
3
|
+
gaugeId: string;
|
|
4
|
+
gaugeLabel: string;
|
|
5
|
+
gaugeDate: Date;
|
|
6
|
+
rainDate: Date;
|
|
7
|
+
gaugeCartesianValue: CartesianValue;
|
|
8
|
+
rainCartesianValues: CartesianValue[];
|
|
9
|
+
speed: {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
};
|
|
13
|
+
remark: string;
|
|
14
|
+
constructor(json: {
|
|
15
|
+
gaugeId: string;
|
|
16
|
+
gaugeLabel: string;
|
|
17
|
+
gaugeDate: Date;
|
|
18
|
+
rainDate: Date;
|
|
19
|
+
gaugeCartesianValue: CartesianValue;
|
|
20
|
+
rainCartesianValues: CartesianValue[];
|
|
21
|
+
speed: {
|
|
22
|
+
x: number;
|
|
23
|
+
y: number;
|
|
24
|
+
};
|
|
25
|
+
remark: string;
|
|
26
|
+
});
|
|
27
|
+
getGaugeValue(): number;
|
|
28
|
+
getRainValue(): number;
|
|
29
|
+
getRainLat(): number;
|
|
30
|
+
getRainLng(): number;
|
|
31
|
+
getDelta(): number;
|
|
32
|
+
getRatio(): number;
|
|
33
|
+
getTimeDeltaInMinutes(): number;
|
|
34
|
+
private getMiddleValue;
|
|
35
|
+
}
|