@xyo-network/location-certainty-plugin 2.99.4 → 2.99.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/dist/browser/Diviner/Diviner.d.cts +1 -1
- package/dist/browser/Diviner/Diviner.d.cts.map +1 -1
- package/dist/browser/Diviner/Diviner.d.mts +1 -1
- package/dist/browser/Diviner/Diviner.d.mts.map +1 -1
- package/dist/browser/Diviner/Diviner.d.ts +1 -1
- package/dist/browser/Diviner/Diviner.d.ts.map +1 -1
- package/dist/browser/Diviner/index.d.cts +2 -2
- package/dist/browser/Diviner/index.d.mts +2 -2
- package/dist/browser/Diviner/index.d.ts +2 -2
- package/dist/browser/Plugin.d.cts +2 -2
- package/dist/browser/Plugin.d.mts +2 -2
- package/dist/browser/Plugin.d.ts +2 -2
- package/dist/browser/index.cjs +48 -31
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.d.cts +2 -2
- package/dist/browser/index.d.mts +2 -2
- package/dist/browser/index.d.ts +2 -2
- package/dist/browser/{index.js → index.mjs} +51 -32
- package/dist/browser/index.mjs.map +1 -0
- package/dist/neutral/Diviner/Diviner.d.cts +1 -1
- package/dist/neutral/Diviner/Diviner.d.cts.map +1 -1
- package/dist/neutral/Diviner/Diviner.d.mts +1 -1
- package/dist/neutral/Diviner/Diviner.d.mts.map +1 -1
- package/dist/neutral/Diviner/Diviner.d.ts +1 -1
- package/dist/neutral/Diviner/Diviner.d.ts.map +1 -1
- package/dist/neutral/Diviner/index.d.cts +2 -2
- package/dist/neutral/Diviner/index.d.mts +2 -2
- package/dist/neutral/Diviner/index.d.ts +2 -2
- package/dist/neutral/Plugin.d.cts +2 -2
- package/dist/neutral/Plugin.d.mts +2 -2
- package/dist/neutral/Plugin.d.ts +2 -2
- package/dist/neutral/index.cjs +48 -31
- package/dist/neutral/index.cjs.map +1 -1
- package/dist/neutral/index.d.cts +2 -2
- package/dist/neutral/index.d.mts +2 -2
- package/dist/neutral/index.d.ts +2 -2
- package/dist/neutral/{index.js → index.mjs} +51 -32
- package/dist/neutral/index.mjs.map +1 -0
- package/dist/node/Diviner/Diviner.d.cts +1 -1
- package/dist/node/Diviner/Diviner.d.cts.map +1 -1
- package/dist/node/Diviner/Diviner.d.mts +1 -1
- package/dist/node/Diviner/Diviner.d.mts.map +1 -1
- package/dist/node/Diviner/Diviner.d.ts +1 -1
- package/dist/node/Diviner/Diviner.d.ts.map +1 -1
- package/dist/node/Diviner/index.d.cts +2 -2
- package/dist/node/Diviner/index.d.mts +2 -2
- package/dist/node/Diviner/index.d.ts +2 -2
- package/dist/node/Plugin.d.cts +2 -2
- package/dist/node/Plugin.d.mts +2 -2
- package/dist/node/Plugin.d.ts +2 -2
- package/dist/node/index.cjs +55 -34
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.d.cts +2 -2
- package/dist/node/index.d.mts +2 -2
- package/dist/node/index.d.ts +2 -2
- package/dist/node/{index.js → index.mjs} +58 -35
- package/dist/node/index.mjs.map +1 -0
- package/package.json +21 -21
- package/src/Diviner/Diviner.ts +13 -10
- package/src/Diviner/index.ts +2 -2
- package/src/Plugin.ts +1 -1
- package/src/index.ts +2 -2
- package/dist/browser/index.js.map +0 -1
- package/dist/neutral/index.js.map +0 -1
- package/dist/node/index.js.map +0 -1
|
@@ -2,7 +2,7 @@ import { AbstractDiviner } from '@xyo-network/diviner-abstract';
|
|
|
2
2
|
import { DivinerModule, DivinerParams } from '@xyo-network/diviner-model';
|
|
3
3
|
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
4
4
|
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
5
|
-
import { LocationCertaintyDivinerConfig } from './Config.
|
|
5
|
+
import { LocationCertaintyDivinerConfig } from './Config.ts';
|
|
6
6
|
export type LocationCertaintyDivinerParams = DivinerParams<AnyConfigSchema<LocationCertaintyDivinerConfig>>;
|
|
7
7
|
export declare class LocationCertaintyDiviner<TParam extends LocationCertaintyDivinerParams = LocationCertaintyDivinerParams> extends AbstractDiviner<TParam> implements DivinerModule {
|
|
8
8
|
static readonly configSchemas: Schema[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../../src/Diviner/Diviner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAKzE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAE5D,OAAO,EAAE,8BAA8B,EAAwC,MAAM,aAAa,CAAA;AAElG,MAAM,MAAM,8BAA8B,GAAG,aAAa,CAAC,eAAe,CAAC,8BAA8B,CAAC,CAAC,CAAA;AAE3G,qBAAa,wBAAwB,CAAC,MAAM,SAAS,8BAA8B,GAAG,8BAA8B,CAClH,SAAQ,eAAe,CAAC,MAAM,CAC9B,YAAW,aAAa;
|
|
1
|
+
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../../src/Diviner/Diviner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAKzE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAE5D,OAAO,EAAE,8BAA8B,EAAwC,MAAM,aAAa,CAAA;AAElG,MAAM,MAAM,8BAA8B,GAAG,aAAa,CAAC,eAAe,CAAC,8BAA8B,CAAC,CAAC,CAAA;AAE3G,qBAAa,wBAAwB,CAAC,MAAM,SAAS,8BAA8B,GAAG,8BAA8B,CAClH,SAAQ,eAAe,CAAC,MAAM,CAC9B,YAAW,aAAa;IACxB,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAiE;IACjH,gBAAyB,mBAAmB,EAAE,MAAM,CAAuC;IAC3F,OAAgB,YAAY,mCAA0B;IAGtD,OAAO,CAAC,MAAM,CAAC,aAAa;IAoC5B,OAAO,CAAC,MAAM,CAAC,qBAAqB;cAoBX,aAAa,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CA4BjF"}
|
|
@@ -2,7 +2,7 @@ import { AbstractDiviner } from '@xyo-network/diviner-abstract';
|
|
|
2
2
|
import { DivinerModule, DivinerParams } from '@xyo-network/diviner-model';
|
|
3
3
|
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
4
4
|
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
5
|
-
import { LocationCertaintyDivinerConfig } from './Config.
|
|
5
|
+
import { LocationCertaintyDivinerConfig } from './Config.ts';
|
|
6
6
|
export type LocationCertaintyDivinerParams = DivinerParams<AnyConfigSchema<LocationCertaintyDivinerConfig>>;
|
|
7
7
|
export declare class LocationCertaintyDiviner<TParam extends LocationCertaintyDivinerParams = LocationCertaintyDivinerParams> extends AbstractDiviner<TParam> implements DivinerModule {
|
|
8
8
|
static readonly configSchemas: Schema[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../../src/Diviner/Diviner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAKzE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAE5D,OAAO,EAAE,8BAA8B,EAAwC,MAAM,aAAa,CAAA;AAElG,MAAM,MAAM,8BAA8B,GAAG,aAAa,CAAC,eAAe,CAAC,8BAA8B,CAAC,CAAC,CAAA;AAE3G,qBAAa,wBAAwB,CAAC,MAAM,SAAS,8BAA8B,GAAG,8BAA8B,CAClH,SAAQ,eAAe,CAAC,MAAM,CAC9B,YAAW,aAAa;
|
|
1
|
+
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../../src/Diviner/Diviner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAKzE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAE5D,OAAO,EAAE,8BAA8B,EAAwC,MAAM,aAAa,CAAA;AAElG,MAAM,MAAM,8BAA8B,GAAG,aAAa,CAAC,eAAe,CAAC,8BAA8B,CAAC,CAAC,CAAA;AAE3G,qBAAa,wBAAwB,CAAC,MAAM,SAAS,8BAA8B,GAAG,8BAA8B,CAClH,SAAQ,eAAe,CAAC,MAAM,CAC9B,YAAW,aAAa;IACxB,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAiE;IACjH,gBAAyB,mBAAmB,EAAE,MAAM,CAAuC;IAC3F,OAAgB,YAAY,mCAA0B;IAGtD,OAAO,CAAC,MAAM,CAAC,aAAa;IAoC5B,OAAO,CAAC,MAAM,CAAC,qBAAqB;cAoBX,aAAa,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CA4BjF"}
|
|
@@ -2,7 +2,7 @@ import { AbstractDiviner } from '@xyo-network/diviner-abstract';
|
|
|
2
2
|
import { DivinerModule, DivinerParams } from '@xyo-network/diviner-model';
|
|
3
3
|
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
4
4
|
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
5
|
-
import { LocationCertaintyDivinerConfig } from './Config.
|
|
5
|
+
import { LocationCertaintyDivinerConfig } from './Config.ts';
|
|
6
6
|
export type LocationCertaintyDivinerParams = DivinerParams<AnyConfigSchema<LocationCertaintyDivinerConfig>>;
|
|
7
7
|
export declare class LocationCertaintyDiviner<TParam extends LocationCertaintyDivinerParams = LocationCertaintyDivinerParams> extends AbstractDiviner<TParam> implements DivinerModule {
|
|
8
8
|
static readonly configSchemas: Schema[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../../src/Diviner/Diviner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAKzE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAE5D,OAAO,EAAE,8BAA8B,EAAwC,MAAM,aAAa,CAAA;AAElG,MAAM,MAAM,8BAA8B,GAAG,aAAa,CAAC,eAAe,CAAC,8BAA8B,CAAC,CAAC,CAAA;AAE3G,qBAAa,wBAAwB,CAAC,MAAM,SAAS,8BAA8B,GAAG,8BAA8B,CAClH,SAAQ,eAAe,CAAC,MAAM,CAC9B,YAAW,aAAa;
|
|
1
|
+
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../../src/Diviner/Diviner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAKzE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAE5D,OAAO,EAAE,8BAA8B,EAAwC,MAAM,aAAa,CAAA;AAElG,MAAM,MAAM,8BAA8B,GAAG,aAAa,CAAC,eAAe,CAAC,8BAA8B,CAAC,CAAC,CAAA;AAE3G,qBAAa,wBAAwB,CAAC,MAAM,SAAS,8BAA8B,GAAG,8BAA8B,CAClH,SAAQ,eAAe,CAAC,MAAM,CAC9B,YAAW,aAAa;IACxB,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAiE;IACjH,gBAAyB,mBAAmB,EAAE,MAAM,CAAuC;IAC3F,OAAgB,YAAY,mCAA0B;IAGtD,OAAO,CAAC,MAAM,CAAC,aAAa;IAoC5B,OAAO,CAAC,MAAM,CAAC,qBAAqB;cAoBX,aAAa,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CA4BjF"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './Config.
|
|
2
|
-
export * from './Diviner.
|
|
1
|
+
export * from './Config.ts';
|
|
2
|
+
export * from './Diviner.ts';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './Config.
|
|
2
|
-
export * from './Diviner.
|
|
1
|
+
export * from './Config.ts';
|
|
2
|
+
export * from './Diviner.ts';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './Config.
|
|
2
|
-
export * from './Diviner.
|
|
1
|
+
export * from './Config.ts';
|
|
2
|
+
export * from './Diviner.ts';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LocationCertaintySchema } from '@xyo-network/location-certainty-payload-plugin';
|
|
2
|
-
import { LocationCertaintyDiviner } from './Diviner/index.
|
|
2
|
+
import { LocationCertaintyDiviner } from './Diviner/index.ts';
|
|
3
3
|
export declare const LocationCertaintyPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetDivinerPlugin<LocationCertaintyDiviner<import("@xylabs/object").BaseParamsFields & {
|
|
4
4
|
account?: import("@xyo-network/account-model").AccountInstance | "random";
|
|
5
5
|
addToResolvers?: boolean;
|
|
@@ -10,7 +10,7 @@ export declare const LocationCertaintyPlugin: () => import("@xyo-network/payload
|
|
|
10
10
|
} & {
|
|
11
11
|
schema: string;
|
|
12
12
|
} & import("@xyo-network/payload-model").PayloadFields & {
|
|
13
|
-
schema: import("./Diviner/Config.
|
|
13
|
+
schema: import("./Diviner/Config.ts").LocationCertaintyDivinerConfigSchema;
|
|
14
14
|
targetSchema?: LocationCertaintySchema;
|
|
15
15
|
}, "schema"> & {
|
|
16
16
|
schema: "network.xyo.location.elevation.diviner.config";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LocationCertaintySchema } from '@xyo-network/location-certainty-payload-plugin';
|
|
2
|
-
import { LocationCertaintyDiviner } from './Diviner/index.
|
|
2
|
+
import { LocationCertaintyDiviner } from './Diviner/index.ts';
|
|
3
3
|
export declare const LocationCertaintyPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetDivinerPlugin<LocationCertaintyDiviner<import("@xylabs/object").BaseParamsFields & {
|
|
4
4
|
account?: import("@xyo-network/account-model").AccountInstance | "random";
|
|
5
5
|
addToResolvers?: boolean;
|
|
@@ -10,7 +10,7 @@ export declare const LocationCertaintyPlugin: () => import("@xyo-network/payload
|
|
|
10
10
|
} & {
|
|
11
11
|
schema: string;
|
|
12
12
|
} & import("@xyo-network/payload-model").PayloadFields & {
|
|
13
|
-
schema: import("./Diviner/Config.
|
|
13
|
+
schema: import("./Diviner/Config.ts").LocationCertaintyDivinerConfigSchema;
|
|
14
14
|
targetSchema?: LocationCertaintySchema;
|
|
15
15
|
}, "schema"> & {
|
|
16
16
|
schema: "network.xyo.location.elevation.diviner.config";
|
package/dist/browser/Plugin.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LocationCertaintySchema } from '@xyo-network/location-certainty-payload-plugin';
|
|
2
|
-
import { LocationCertaintyDiviner } from './Diviner/index.
|
|
2
|
+
import { LocationCertaintyDiviner } from './Diviner/index.ts';
|
|
3
3
|
export declare const LocationCertaintyPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetDivinerPlugin<LocationCertaintyDiviner<import("@xylabs/object").BaseParamsFields & {
|
|
4
4
|
account?: import("@xyo-network/account-model").AccountInstance | "random";
|
|
5
5
|
addToResolvers?: boolean;
|
|
@@ -10,7 +10,7 @@ export declare const LocationCertaintyPlugin: () => import("@xyo-network/payload
|
|
|
10
10
|
} & {
|
|
11
11
|
schema: string;
|
|
12
12
|
} & import("@xyo-network/payload-model").PayloadFields & {
|
|
13
|
-
schema: import("./Diviner/Config.
|
|
13
|
+
schema: import("./Diviner/Config.ts").LocationCertaintyDivinerConfigSchema;
|
|
14
14
|
targetSchema?: LocationCertaintySchema;
|
|
15
15
|
}, "schema"> & {
|
|
16
16
|
schema: "network.xyo.location.elevation.diviner.config";
|
package/dist/browser/index.cjs
CHANGED
|
@@ -3,6 +3,7 @@ var __defProp = Object.defineProperty;
|
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
7
|
var __export = (target, all) => {
|
|
7
8
|
for (var name in all)
|
|
8
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -37,7 +38,13 @@ var import_location_certainty_payload_plugin = require("@xyo-network/location-ce
|
|
|
37
38
|
var import_location_payload_plugin = require("@xyo-network/location-payload-plugin");
|
|
38
39
|
var import_payload_builder = require("@xyo-network/payload-builder");
|
|
39
40
|
var LocationCertaintyDiviner = class _LocationCertaintyDiviner extends import_diviner_abstract.AbstractDiviner {
|
|
40
|
-
static
|
|
41
|
+
static {
|
|
42
|
+
__name(this, "LocationCertaintyDiviner");
|
|
43
|
+
}
|
|
44
|
+
static configSchemas = [
|
|
45
|
+
...super.configSchemas,
|
|
46
|
+
LocationCertaintyDivinerConfigSchema
|
|
47
|
+
];
|
|
41
48
|
static defaultConfigSchema = LocationCertaintyDivinerConfigSchema;
|
|
42
49
|
static targetSchema = import_location_certainty_payload_plugin.LocationCertaintySchema;
|
|
43
50
|
/* Given an array of numbers, find the min/max/mean */
|
|
@@ -48,12 +55,15 @@ var LocationCertaintyDiviner = class _LocationCertaintyDiviner extends import_di
|
|
|
48
55
|
return value === null ? prev : value > prev ? value : prev;
|
|
49
56
|
}, Number.NEGATIVE_INFINITY),
|
|
50
57
|
mean: (() => {
|
|
51
|
-
const values = heuristic.reduce(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
58
|
+
const values = heuristic.reduce((prev, value) => {
|
|
59
|
+
return value === null ? prev : [
|
|
60
|
+
value + prev[0],
|
|
61
|
+
prev[1] + 1
|
|
62
|
+
];
|
|
63
|
+
}, [
|
|
64
|
+
0,
|
|
65
|
+
0
|
|
66
|
+
]);
|
|
57
67
|
return values[0] / values[1];
|
|
58
68
|
})(),
|
|
59
69
|
// eslint-disable-next-line unicorn/no-array-reduce
|
|
@@ -64,20 +74,21 @@ var LocationCertaintyDiviner = class _LocationCertaintyDiviner extends import_di
|
|
|
64
74
|
}
|
|
65
75
|
/* Given elevation and location payloads, generate heuristic arrays */
|
|
66
76
|
static locationsToHeuristics(elevations, locations) {
|
|
67
|
-
const heuristics = elevations.reduce(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
77
|
+
const heuristics = elevations.reduce((prev, elev, index) => {
|
|
78
|
+
const elevation = elev.elevation;
|
|
79
|
+
if (elevation === void 0 || elevation === null) {
|
|
80
|
+
throw new Error("Invalid Elevation");
|
|
81
|
+
}
|
|
82
|
+
const altitude = locations[index].altitude;
|
|
83
|
+
prev.altitude.push(altitude ?? null);
|
|
84
|
+
prev.elevation.push(elevation);
|
|
85
|
+
prev.variance.push(altitude !== void 0 && altitude !== null ? altitude - elevation : null);
|
|
86
|
+
return prev;
|
|
87
|
+
}, {
|
|
88
|
+
altitude: [],
|
|
89
|
+
elevation: [],
|
|
90
|
+
variance: []
|
|
91
|
+
});
|
|
81
92
|
return heuristics;
|
|
82
93
|
}
|
|
83
94
|
/** @description Given a set of locations, get the expected elevations (witness if needed), and return score/variance */
|
|
@@ -93,13 +104,17 @@ var LocationCertaintyDiviner = class _LocationCertaintyDiviner extends import_di
|
|
|
93
104
|
});
|
|
94
105
|
const elevations = await elevationWitness.observe();
|
|
95
106
|
const heuristics = _LocationCertaintyDiviner.locationsToHeuristics(elevations, locations);
|
|
96
|
-
const result = await new import_payload_builder.PayloadBuilder({
|
|
107
|
+
const result = await new import_payload_builder.PayloadBuilder({
|
|
108
|
+
schema: import_location_certainty_payload_plugin.LocationCertaintySchema
|
|
109
|
+
}).fields({
|
|
97
110
|
altitude: _LocationCertaintyDiviner.calcHeuristic(heuristics.altitude),
|
|
98
111
|
elevation: _LocationCertaintyDiviner.calcHeuristic(heuristics.elevation),
|
|
99
112
|
variance: _LocationCertaintyDiviner.calcHeuristic(heuristics.variance)
|
|
100
113
|
}).build();
|
|
101
114
|
this.logger?.log("LocationCertaintyDiviner.Divine: Processed query");
|
|
102
|
-
return [
|
|
115
|
+
return [
|
|
116
|
+
result
|
|
117
|
+
];
|
|
103
118
|
}
|
|
104
119
|
return [];
|
|
105
120
|
}
|
|
@@ -109,12 +124,14 @@ var LocationCertaintyDiviner = class _LocationCertaintyDiviner extends import_di
|
|
|
109
124
|
var import_location_certainty_payload_plugin2 = require("@xyo-network/location-certainty-payload-plugin");
|
|
110
125
|
var import_payload_model = require("@xyo-network/payload-model");
|
|
111
126
|
var import_payloadset_plugin = require("@xyo-network/payloadset-plugin");
|
|
112
|
-
var LocationCertaintyPlugin = () => (0, import_payloadset_plugin.createPayloadSetDivinerPlugin)(
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
);
|
|
127
|
+
var LocationCertaintyPlugin = /* @__PURE__ */ __name(() => (0, import_payloadset_plugin.createPayloadSetDivinerPlugin)({
|
|
128
|
+
required: {
|
|
129
|
+
[import_location_certainty_payload_plugin2.LocationCertaintySchema]: 1
|
|
130
|
+
},
|
|
131
|
+
schema: import_payload_model.PayloadSetSchema
|
|
132
|
+
}, {
|
|
133
|
+
diviner: /* @__PURE__ */ __name(async (params) => {
|
|
134
|
+
return await LocationCertaintyDiviner.create(params);
|
|
135
|
+
}, "diviner")
|
|
136
|
+
}), "LocationCertaintyPlugin");
|
|
120
137
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/Diviner/Config.ts","../../src/Diviner/Diviner.ts","../../src/Plugin.ts"],"sourcesContent":["export * from './Diviner/index.
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/Diviner/Config.ts","../../src/Diviner/Diviner.ts","../../src/Plugin.ts"],"sourcesContent":["export * from './Diviner/index.ts'\n// eslint-disable-next-line import/no-default-export\nexport { LocationCertaintyPlugin as default, LocationCertaintyPlugin } from './Plugin.ts'\n","import { DivinerConfig } from '@xyo-network/diviner-model'\nimport { LocationCertaintySchema } from '@xyo-network/location-certainty-payload-plugin'\nimport { Payload } from '@xyo-network/payload-model'\n\nexport type LocationCertaintyDivinerConfigSchema = 'network.xyo.location.elevation.diviner.config'\nexport const LocationCertaintyDivinerConfigSchema: LocationCertaintyDivinerConfigSchema = 'network.xyo.location.elevation.diviner.config'\n\nexport type LocationCertaintyDivinerConfig<TConfig extends Payload = Payload> = DivinerConfig<\n TConfig & {\n schema: LocationCertaintyDivinerConfigSchema\n targetSchema?: LocationCertaintySchema\n }\n>\n","import { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport { DivinerModule, DivinerParams } from '@xyo-network/diviner-model'\nimport { ElevationPayload } from '@xyo-network/elevation-payload-plugin'\nimport { ElevationWitness, ElevationWitnessConfigSchema } from '@xyo-network/elevation-plugin'\nimport { LocationCertaintyHeuristic, LocationCertaintyPayload, LocationCertaintySchema } from '@xyo-network/location-certainty-payload-plugin'\nimport { LocationPayload, LocationSchema } from '@xyo-network/location-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload, Schema } from '@xyo-network/payload-model'\n\nimport { LocationCertaintyDivinerConfig, LocationCertaintyDivinerConfigSchema } from './Config.ts'\n\nexport type LocationCertaintyDivinerParams = DivinerParams<AnyConfigSchema<LocationCertaintyDivinerConfig>>\n\nexport class LocationCertaintyDiviner<TParam extends LocationCertaintyDivinerParams = LocationCertaintyDivinerParams>\n extends AbstractDiviner<TParam>\n implements DivinerModule {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, LocationCertaintyDivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = LocationCertaintyDivinerConfigSchema\n static override targetSchema = LocationCertaintySchema\n\n /* Given an array of numbers, find the min/max/mean */\n private static calcHeuristic(heuristic: (number | null)[]): LocationCertaintyHeuristic {\n return {\n // eslint-disable-next-line unicorn/no-array-reduce\n max: heuristic.reduce<number>((prev, value) => {\n return (\n value === null\n ? prev\n : value > prev\n ? value\n : prev\n )\n }, Number.NEGATIVE_INFINITY),\n mean: (() => {\n // eslint-disable-next-line unicorn/no-array-reduce\n const values = heuristic.reduce<number[]>(\n (prev, value) => {\n return value === null ? prev : [value + prev[0], prev[1] + 1]\n },\n [0, 0],\n )\n return values[0] / values[1]\n })(),\n // eslint-disable-next-line unicorn/no-array-reduce\n min: heuristic.reduce<number>((prev, value) => {\n return (\n value === null\n ? prev\n : value < prev\n ? value\n : prev\n )\n }, Number.POSITIVE_INFINITY),\n }\n }\n\n /* Given elevation and location payloads, generate heuristic arrays */\n private static locationsToHeuristics(elevations: ElevationPayload[], locations: LocationPayload[]) {\n // eslint-disable-next-line unicorn/no-array-reduce\n const heuristics = elevations.reduce<{ altitude: (number | null)[]; elevation: number[]; variance: (number | null)[] }>(\n (prev, elev, index) => {\n const elevation = elev.elevation\n if (elevation === undefined || elevation === null) {\n throw new Error('Invalid Elevation')\n }\n const altitude = locations[index].altitude\n prev.altitude.push(altitude ?? null)\n prev.elevation.push(elevation)\n prev.variance.push(altitude !== undefined && altitude !== null ? altitude - elevation : null)\n return prev\n },\n { altitude: [], elevation: [], variance: [] },\n )\n return heuristics\n }\n\n /** @description Given a set of locations, get the expected elevations (witness if needed), and return score/variance */\n protected override async divineHandler(payloads?: Payload[]): Promise<Payload[]> {\n const locations = payloads?.filter<LocationPayload>((payload): payload is LocationPayload => payload?.schema === LocationSchema)\n // If this is a query we support\n if (locations && locations?.length > 0) {\n const elevationWitness = await ElevationWitness.create({\n account: this.account,\n config: {\n locations,\n schema: ElevationWitnessConfigSchema,\n },\n })\n const elevations = (await elevationWitness.observe()) as ElevationPayload[]\n\n const heuristics = LocationCertaintyDiviner.locationsToHeuristics(elevations, locations)\n\n const result = await new PayloadBuilder<LocationCertaintyPayload>({ schema: LocationCertaintySchema })\n .fields({\n altitude: LocationCertaintyDiviner.calcHeuristic(heuristics.altitude),\n elevation: LocationCertaintyDiviner.calcHeuristic(heuristics.elevation),\n variance: LocationCertaintyDiviner.calcHeuristic(heuristics.variance),\n })\n .build()\n\n this.logger?.log('LocationCertaintyDiviner.Divine: Processed query')\n return [result]\n }\n return []\n }\n}\n","import { LocationCertaintySchema } from '@xyo-network/location-certainty-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetDivinerPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { LocationCertaintyDiviner } from './Diviner/index.ts'\n\nexport const LocationCertaintyPlugin = () =>\n createPayloadSetDivinerPlugin<LocationCertaintyDiviner>(\n { required: { [LocationCertaintySchema]: 1 }, schema: PayloadSetSchema },\n {\n diviner: async (params) => {\n return (await LocationCertaintyDiviner.create(params)) as LocationCertaintyDiviner\n },\n },\n )\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;ACKO,IAAMA,uCAA6E;;;ACL1F,8BAAgC;AAGhC,8BAA+D;AAC/D,+CAA8F;AAC9F,qCAAgD;AAEhD,6BAA+B;AAOxB,IAAMC,2BAAN,MAAMA,kCACHC,wCAAAA;EAfV,OAeUA;;;EAER,OAAyBC,gBAA0B;OAAI,MAAMA;IAAeC;;EAC5E,OAAyBC,sBAA8BD;EACvD,OAAgBE,eAAeC;;EAG/B,OAAeC,cAAcC,WAA0D;AACrF,WAAO;;MAELC,KAAKD,UAAUE,OAAe,CAACC,MAAMC,UAAAA;AACnC,eACEA,UAAU,OACND,OACAC,QAAQD,OACNC,QACAD;MAEV,GAAGE,OAAOC,iBAAiB;MAC3BC,OAAO,MAAA;AAEL,cAAMC,SAASR,UAAUE,OACvB,CAACC,MAAMC,UAAAA;AACL,iBAAOA,UAAU,OAAOD,OAAO;YAACC,QAAQD,KAAK,CAAA;YAAIA,KAAK,CAAA,IAAK;;QAC7D,GACA;UAAC;UAAG;SAAE;AAER,eAAOK,OAAO,CAAA,IAAKA,OAAO,CAAA;MAC5B,GAAA;;MAEAC,KAAKT,UAAUE,OAAe,CAACC,MAAMC,UAAAA;AACnC,eACEA,UAAU,OACND,OACAC,QAAQD,OACNC,QACAD;MAEV,GAAGE,OAAOK,iBAAiB;IAC7B;EACF;;EAGA,OAAeC,sBAAsBC,YAAgCC,WAA8B;AAEjG,UAAMC,aAAaF,WAAWV,OAC5B,CAACC,MAAMY,MAAMC,UAAAA;AACX,YAAMC,YAAYF,KAAKE;AACvB,UAAIA,cAAcC,UAAaD,cAAc,MAAM;AACjD,cAAM,IAAIE,MAAM,mBAAA;MAClB;AACA,YAAMC,WAAWP,UAAUG,KAAAA,EAAOI;AAClCjB,WAAKiB,SAASC,KAAKD,YAAY,IAAA;AAC/BjB,WAAKc,UAAUI,KAAKJ,SAAAA;AACpBd,WAAKmB,SAASD,KAAKD,aAAaF,UAAaE,aAAa,OAAOA,WAAWH,YAAY,IAAA;AACxF,aAAOd;IACT,GACF;MAAEiB,UAAU,CAAA;MAAIH,WAAW,CAAA;MAAIK,UAAU,CAAA;IAAG,CAAA;AAE5C,WAAOR;EACT;;EAGA,MAAyBS,cAAcC,UAA0C;AAC/E,UAAMX,YAAYW,UAAUC,OAAwB,CAACC,YAAwCA,SAASC,WAAWC,6CAAAA;AAEjH,QAAIf,aAAaA,WAAWgB,SAAS,GAAG;AACtC,YAAMC,mBAAmB,MAAMC,yCAAiBC,OAAO;QACrDC,SAAS,KAAKA;QACdC,QAAQ;UACNrB;UACAc,QAAQQ;QACV;MACF,CAAA;AACA,YAAMvB,aAAc,MAAMkB,iBAAiBM,QAAO;AAElD,YAAMtB,aAAatB,0BAAyBmB,sBAAsBC,YAAYC,SAAAA;AAE9E,YAAMwB,SAAS,MAAM,IAAIC,sCAAyC;QAAEX,QAAQ7B;MAAwB,CAAA,EACjGyC,OAAO;QACNnB,UAAU5B,0BAAyBO,cAAce,WAAWM,QAAQ;QACpEH,WAAWzB,0BAAyBO,cAAce,WAAWG,SAAS;QACtEK,UAAU9B,0BAAyBO,cAAce,WAAWQ,QAAQ;MACtE,CAAA,EACCkB,MAAK;AAER,WAAKC,QAAQC,IAAI,kDAAA;AACjB,aAAO;QAACL;;IACV;AACA,WAAO,CAAA;EACT;AACF;;;AC1GA,IAAAM,4CAAwC;AACxC,2BAAiC;AACjC,+BAA8C;AAIvC,IAAMC,0BAA0B,iCACrCC,wDACE;EAAEC,UAAU;IAAE,CAACC,iEAAAA,GAA0B;EAAE;EAAGC,QAAQC;AAAiB,GACvE;EACEC,SAAS,8BAAOC,WAAAA;AACd,WAAQ,MAAMC,yBAAyBC,OAAOF,MAAAA;EAChD,GAFS;AAGX,CAAA,GAPmC;","names":["LocationCertaintyDivinerConfigSchema","LocationCertaintyDiviner","AbstractDiviner","configSchemas","LocationCertaintyDivinerConfigSchema","defaultConfigSchema","targetSchema","LocationCertaintySchema","calcHeuristic","heuristic","max","reduce","prev","value","Number","NEGATIVE_INFINITY","mean","values","min","POSITIVE_INFINITY","locationsToHeuristics","elevations","locations","heuristics","elev","index","elevation","undefined","Error","altitude","push","variance","divineHandler","payloads","filter","payload","schema","LocationSchema","length","elevationWitness","ElevationWitness","create","account","config","ElevationWitnessConfigSchema","observe","result","PayloadBuilder","fields","build","logger","log","import_location_certainty_payload_plugin","LocationCertaintyPlugin","createPayloadSetDivinerPlugin","required","LocationCertaintySchema","schema","PayloadSetSchema","diviner","params","LocationCertaintyDiviner","create"]}
|
package/dist/browser/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './Diviner/index.
|
|
2
|
-
export { LocationCertaintyPlugin as default, LocationCertaintyPlugin } from './Plugin.
|
|
1
|
+
export * from './Diviner/index.ts';
|
|
2
|
+
export { LocationCertaintyPlugin as default, LocationCertaintyPlugin } from './Plugin.ts';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/browser/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './Diviner/index.
|
|
2
|
-
export { LocationCertaintyPlugin as default, LocationCertaintyPlugin } from './Plugin.
|
|
1
|
+
export * from './Diviner/index.ts';
|
|
2
|
+
export { LocationCertaintyPlugin as default, LocationCertaintyPlugin } from './Plugin.ts';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/browser/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './Diviner/index.
|
|
2
|
-
export { LocationCertaintyPlugin as default, LocationCertaintyPlugin } from './Plugin.
|
|
1
|
+
export * from './Diviner/index.ts';
|
|
2
|
+
export { LocationCertaintyPlugin as default, LocationCertaintyPlugin } from './Plugin.ts';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
|
|
1
4
|
// src/Diviner/Config.ts
|
|
2
5
|
var LocationCertaintyDivinerConfigSchema = "network.xyo.location.elevation.diviner.config";
|
|
3
6
|
|
|
@@ -8,7 +11,13 @@ import { LocationCertaintySchema } from "@xyo-network/location-certainty-payload
|
|
|
8
11
|
import { LocationSchema } from "@xyo-network/location-payload-plugin";
|
|
9
12
|
import { PayloadBuilder } from "@xyo-network/payload-builder";
|
|
10
13
|
var LocationCertaintyDiviner = class _LocationCertaintyDiviner extends AbstractDiviner {
|
|
11
|
-
static
|
|
14
|
+
static {
|
|
15
|
+
__name(this, "LocationCertaintyDiviner");
|
|
16
|
+
}
|
|
17
|
+
static configSchemas = [
|
|
18
|
+
...super.configSchemas,
|
|
19
|
+
LocationCertaintyDivinerConfigSchema
|
|
20
|
+
];
|
|
12
21
|
static defaultConfigSchema = LocationCertaintyDivinerConfigSchema;
|
|
13
22
|
static targetSchema = LocationCertaintySchema;
|
|
14
23
|
/* Given an array of numbers, find the min/max/mean */
|
|
@@ -19,12 +28,15 @@ var LocationCertaintyDiviner = class _LocationCertaintyDiviner extends AbstractD
|
|
|
19
28
|
return value === null ? prev : value > prev ? value : prev;
|
|
20
29
|
}, Number.NEGATIVE_INFINITY),
|
|
21
30
|
mean: (() => {
|
|
22
|
-
const values = heuristic.reduce(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
31
|
+
const values = heuristic.reduce((prev, value) => {
|
|
32
|
+
return value === null ? prev : [
|
|
33
|
+
value + prev[0],
|
|
34
|
+
prev[1] + 1
|
|
35
|
+
];
|
|
36
|
+
}, [
|
|
37
|
+
0,
|
|
38
|
+
0
|
|
39
|
+
]);
|
|
28
40
|
return values[0] / values[1];
|
|
29
41
|
})(),
|
|
30
42
|
// eslint-disable-next-line unicorn/no-array-reduce
|
|
@@ -35,20 +47,21 @@ var LocationCertaintyDiviner = class _LocationCertaintyDiviner extends AbstractD
|
|
|
35
47
|
}
|
|
36
48
|
/* Given elevation and location payloads, generate heuristic arrays */
|
|
37
49
|
static locationsToHeuristics(elevations, locations) {
|
|
38
|
-
const heuristics = elevations.reduce(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
const heuristics = elevations.reduce((prev, elev, index) => {
|
|
51
|
+
const elevation = elev.elevation;
|
|
52
|
+
if (elevation === void 0 || elevation === null) {
|
|
53
|
+
throw new Error("Invalid Elevation");
|
|
54
|
+
}
|
|
55
|
+
const altitude = locations[index].altitude;
|
|
56
|
+
prev.altitude.push(altitude ?? null);
|
|
57
|
+
prev.elevation.push(elevation);
|
|
58
|
+
prev.variance.push(altitude !== void 0 && altitude !== null ? altitude - elevation : null);
|
|
59
|
+
return prev;
|
|
60
|
+
}, {
|
|
61
|
+
altitude: [],
|
|
62
|
+
elevation: [],
|
|
63
|
+
variance: []
|
|
64
|
+
});
|
|
52
65
|
return heuristics;
|
|
53
66
|
}
|
|
54
67
|
/** @description Given a set of locations, get the expected elevations (witness if needed), and return score/variance */
|
|
@@ -64,13 +77,17 @@ var LocationCertaintyDiviner = class _LocationCertaintyDiviner extends AbstractD
|
|
|
64
77
|
});
|
|
65
78
|
const elevations = await elevationWitness.observe();
|
|
66
79
|
const heuristics = _LocationCertaintyDiviner.locationsToHeuristics(elevations, locations);
|
|
67
|
-
const result = await new PayloadBuilder({
|
|
80
|
+
const result = await new PayloadBuilder({
|
|
81
|
+
schema: LocationCertaintySchema
|
|
82
|
+
}).fields({
|
|
68
83
|
altitude: _LocationCertaintyDiviner.calcHeuristic(heuristics.altitude),
|
|
69
84
|
elevation: _LocationCertaintyDiviner.calcHeuristic(heuristics.elevation),
|
|
70
85
|
variance: _LocationCertaintyDiviner.calcHeuristic(heuristics.variance)
|
|
71
86
|
}).build();
|
|
72
87
|
this.logger?.log("LocationCertaintyDiviner.Divine: Processed query");
|
|
73
|
-
return [
|
|
88
|
+
return [
|
|
89
|
+
result
|
|
90
|
+
];
|
|
74
91
|
}
|
|
75
92
|
return [];
|
|
76
93
|
}
|
|
@@ -80,18 +97,20 @@ var LocationCertaintyDiviner = class _LocationCertaintyDiviner extends AbstractD
|
|
|
80
97
|
import { LocationCertaintySchema as LocationCertaintySchema2 } from "@xyo-network/location-certainty-payload-plugin";
|
|
81
98
|
import { PayloadSetSchema } from "@xyo-network/payload-model";
|
|
82
99
|
import { createPayloadSetDivinerPlugin } from "@xyo-network/payloadset-plugin";
|
|
83
|
-
var LocationCertaintyPlugin = () => createPayloadSetDivinerPlugin(
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
);
|
|
100
|
+
var LocationCertaintyPlugin = /* @__PURE__ */ __name(() => createPayloadSetDivinerPlugin({
|
|
101
|
+
required: {
|
|
102
|
+
[LocationCertaintySchema2]: 1
|
|
103
|
+
},
|
|
104
|
+
schema: PayloadSetSchema
|
|
105
|
+
}, {
|
|
106
|
+
diviner: /* @__PURE__ */ __name(async (params) => {
|
|
107
|
+
return await LocationCertaintyDiviner.create(params);
|
|
108
|
+
}, "diviner")
|
|
109
|
+
}), "LocationCertaintyPlugin");
|
|
91
110
|
export {
|
|
92
111
|
LocationCertaintyDiviner,
|
|
93
112
|
LocationCertaintyDivinerConfigSchema,
|
|
94
113
|
LocationCertaintyPlugin,
|
|
95
114
|
LocationCertaintyPlugin as default
|
|
96
115
|
};
|
|
97
|
-
//# sourceMappingURL=index.
|
|
116
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/Diviner/Config.ts","../../src/Diviner/Diviner.ts","../../src/Plugin.ts"],"sourcesContent":["import { DivinerConfig } from '@xyo-network/diviner-model'\nimport { LocationCertaintySchema } from '@xyo-network/location-certainty-payload-plugin'\nimport { Payload } from '@xyo-network/payload-model'\n\nexport type LocationCertaintyDivinerConfigSchema = 'network.xyo.location.elevation.diviner.config'\nexport const LocationCertaintyDivinerConfigSchema: LocationCertaintyDivinerConfigSchema = 'network.xyo.location.elevation.diviner.config'\n\nexport type LocationCertaintyDivinerConfig<TConfig extends Payload = Payload> = DivinerConfig<\n TConfig & {\n schema: LocationCertaintyDivinerConfigSchema\n targetSchema?: LocationCertaintySchema\n }\n>\n","import { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport { DivinerModule, DivinerParams } from '@xyo-network/diviner-model'\nimport { ElevationPayload } from '@xyo-network/elevation-payload-plugin'\nimport { ElevationWitness, ElevationWitnessConfigSchema } from '@xyo-network/elevation-plugin'\nimport { LocationCertaintyHeuristic, LocationCertaintyPayload, LocationCertaintySchema } from '@xyo-network/location-certainty-payload-plugin'\nimport { LocationPayload, LocationSchema } from '@xyo-network/location-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload, Schema } from '@xyo-network/payload-model'\n\nimport { LocationCertaintyDivinerConfig, LocationCertaintyDivinerConfigSchema } from './Config.ts'\n\nexport type LocationCertaintyDivinerParams = DivinerParams<AnyConfigSchema<LocationCertaintyDivinerConfig>>\n\nexport class LocationCertaintyDiviner<TParam extends LocationCertaintyDivinerParams = LocationCertaintyDivinerParams>\n extends AbstractDiviner<TParam>\n implements DivinerModule {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, LocationCertaintyDivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = LocationCertaintyDivinerConfigSchema\n static override targetSchema = LocationCertaintySchema\n\n /* Given an array of numbers, find the min/max/mean */\n private static calcHeuristic(heuristic: (number | null)[]): LocationCertaintyHeuristic {\n return {\n // eslint-disable-next-line unicorn/no-array-reduce\n max: heuristic.reduce<number>((prev, value) => {\n return (\n value === null\n ? prev\n : value > prev\n ? value\n : prev\n )\n }, Number.NEGATIVE_INFINITY),\n mean: (() => {\n // eslint-disable-next-line unicorn/no-array-reduce\n const values = heuristic.reduce<number[]>(\n (prev, value) => {\n return value === null ? prev : [value + prev[0], prev[1] + 1]\n },\n [0, 0],\n )\n return values[0] / values[1]\n })(),\n // eslint-disable-next-line unicorn/no-array-reduce\n min: heuristic.reduce<number>((prev, value) => {\n return (\n value === null\n ? prev\n : value < prev\n ? value\n : prev\n )\n }, Number.POSITIVE_INFINITY),\n }\n }\n\n /* Given elevation and location payloads, generate heuristic arrays */\n private static locationsToHeuristics(elevations: ElevationPayload[], locations: LocationPayload[]) {\n // eslint-disable-next-line unicorn/no-array-reduce\n const heuristics = elevations.reduce<{ altitude: (number | null)[]; elevation: number[]; variance: (number | null)[] }>(\n (prev, elev, index) => {\n const elevation = elev.elevation\n if (elevation === undefined || elevation === null) {\n throw new Error('Invalid Elevation')\n }\n const altitude = locations[index].altitude\n prev.altitude.push(altitude ?? null)\n prev.elevation.push(elevation)\n prev.variance.push(altitude !== undefined && altitude !== null ? altitude - elevation : null)\n return prev\n },\n { altitude: [], elevation: [], variance: [] },\n )\n return heuristics\n }\n\n /** @description Given a set of locations, get the expected elevations (witness if needed), and return score/variance */\n protected override async divineHandler(payloads?: Payload[]): Promise<Payload[]> {\n const locations = payloads?.filter<LocationPayload>((payload): payload is LocationPayload => payload?.schema === LocationSchema)\n // If this is a query we support\n if (locations && locations?.length > 0) {\n const elevationWitness = await ElevationWitness.create({\n account: this.account,\n config: {\n locations,\n schema: ElevationWitnessConfigSchema,\n },\n })\n const elevations = (await elevationWitness.observe()) as ElevationPayload[]\n\n const heuristics = LocationCertaintyDiviner.locationsToHeuristics(elevations, locations)\n\n const result = await new PayloadBuilder<LocationCertaintyPayload>({ schema: LocationCertaintySchema })\n .fields({\n altitude: LocationCertaintyDiviner.calcHeuristic(heuristics.altitude),\n elevation: LocationCertaintyDiviner.calcHeuristic(heuristics.elevation),\n variance: LocationCertaintyDiviner.calcHeuristic(heuristics.variance),\n })\n .build()\n\n this.logger?.log('LocationCertaintyDiviner.Divine: Processed query')\n return [result]\n }\n return []\n }\n}\n","import { LocationCertaintySchema } from '@xyo-network/location-certainty-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetDivinerPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { LocationCertaintyDiviner } from './Diviner/index.ts'\n\nexport const LocationCertaintyPlugin = () =>\n createPayloadSetDivinerPlugin<LocationCertaintyDiviner>(\n { required: { [LocationCertaintySchema]: 1 }, schema: PayloadSetSchema },\n {\n diviner: async (params) => {\n return (await LocationCertaintyDiviner.create(params)) as LocationCertaintyDiviner\n },\n },\n )\n"],"mappings":"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","names":["LocationCertaintyDivinerConfigSchema","AbstractDiviner","ElevationWitness","ElevationWitnessConfigSchema","LocationCertaintySchema","LocationSchema","PayloadBuilder","LocationCertaintyDiviner","AbstractDiviner","configSchemas","LocationCertaintyDivinerConfigSchema","defaultConfigSchema","targetSchema","LocationCertaintySchema","calcHeuristic","heuristic","max","reduce","prev","value","Number","NEGATIVE_INFINITY","mean","values","min","POSITIVE_INFINITY","locationsToHeuristics","elevations","locations","heuristics","elev","index","elevation","undefined","Error","altitude","push","variance","divineHandler","payloads","filter","payload","schema","LocationSchema","length","elevationWitness","ElevationWitness","create","account","config","ElevationWitnessConfigSchema","observe","result","PayloadBuilder","fields","build","logger","log","LocationCertaintySchema","PayloadSetSchema","createPayloadSetDivinerPlugin","LocationCertaintyPlugin","createPayloadSetDivinerPlugin","required","LocationCertaintySchema","schema","PayloadSetSchema","diviner","params","LocationCertaintyDiviner","create"]}
|
|
@@ -2,7 +2,7 @@ import { AbstractDiviner } from '@xyo-network/diviner-abstract';
|
|
|
2
2
|
import { DivinerModule, DivinerParams } from '@xyo-network/diviner-model';
|
|
3
3
|
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
4
4
|
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
5
|
-
import { LocationCertaintyDivinerConfig } from './Config.
|
|
5
|
+
import { LocationCertaintyDivinerConfig } from './Config.ts';
|
|
6
6
|
export type LocationCertaintyDivinerParams = DivinerParams<AnyConfigSchema<LocationCertaintyDivinerConfig>>;
|
|
7
7
|
export declare class LocationCertaintyDiviner<TParam extends LocationCertaintyDivinerParams = LocationCertaintyDivinerParams> extends AbstractDiviner<TParam> implements DivinerModule {
|
|
8
8
|
static readonly configSchemas: Schema[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../../src/Diviner/Diviner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAKzE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAE5D,OAAO,EAAE,8BAA8B,EAAwC,MAAM,aAAa,CAAA;AAElG,MAAM,MAAM,8BAA8B,GAAG,aAAa,CAAC,eAAe,CAAC,8BAA8B,CAAC,CAAC,CAAA;AAE3G,qBAAa,wBAAwB,CAAC,MAAM,SAAS,8BAA8B,GAAG,8BAA8B,CAClH,SAAQ,eAAe,CAAC,MAAM,CAC9B,YAAW,aAAa;
|
|
1
|
+
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../../src/Diviner/Diviner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAKzE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAE5D,OAAO,EAAE,8BAA8B,EAAwC,MAAM,aAAa,CAAA;AAElG,MAAM,MAAM,8BAA8B,GAAG,aAAa,CAAC,eAAe,CAAC,8BAA8B,CAAC,CAAC,CAAA;AAE3G,qBAAa,wBAAwB,CAAC,MAAM,SAAS,8BAA8B,GAAG,8BAA8B,CAClH,SAAQ,eAAe,CAAC,MAAM,CAC9B,YAAW,aAAa;IACxB,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAiE;IACjH,gBAAyB,mBAAmB,EAAE,MAAM,CAAuC;IAC3F,OAAgB,YAAY,mCAA0B;IAGtD,OAAO,CAAC,MAAM,CAAC,aAAa;IAoC5B,OAAO,CAAC,MAAM,CAAC,qBAAqB;cAoBX,aAAa,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CA4BjF"}
|
|
@@ -2,7 +2,7 @@ import { AbstractDiviner } from '@xyo-network/diviner-abstract';
|
|
|
2
2
|
import { DivinerModule, DivinerParams } from '@xyo-network/diviner-model';
|
|
3
3
|
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
4
4
|
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
5
|
-
import { LocationCertaintyDivinerConfig } from './Config.
|
|
5
|
+
import { LocationCertaintyDivinerConfig } from './Config.ts';
|
|
6
6
|
export type LocationCertaintyDivinerParams = DivinerParams<AnyConfigSchema<LocationCertaintyDivinerConfig>>;
|
|
7
7
|
export declare class LocationCertaintyDiviner<TParam extends LocationCertaintyDivinerParams = LocationCertaintyDivinerParams> extends AbstractDiviner<TParam> implements DivinerModule {
|
|
8
8
|
static readonly configSchemas: Schema[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../../src/Diviner/Diviner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAKzE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAE5D,OAAO,EAAE,8BAA8B,EAAwC,MAAM,aAAa,CAAA;AAElG,MAAM,MAAM,8BAA8B,GAAG,aAAa,CAAC,eAAe,CAAC,8BAA8B,CAAC,CAAC,CAAA;AAE3G,qBAAa,wBAAwB,CAAC,MAAM,SAAS,8BAA8B,GAAG,8BAA8B,CAClH,SAAQ,eAAe,CAAC,MAAM,CAC9B,YAAW,aAAa;
|
|
1
|
+
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../../src/Diviner/Diviner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAKzE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAE5D,OAAO,EAAE,8BAA8B,EAAwC,MAAM,aAAa,CAAA;AAElG,MAAM,MAAM,8BAA8B,GAAG,aAAa,CAAC,eAAe,CAAC,8BAA8B,CAAC,CAAC,CAAA;AAE3G,qBAAa,wBAAwB,CAAC,MAAM,SAAS,8BAA8B,GAAG,8BAA8B,CAClH,SAAQ,eAAe,CAAC,MAAM,CAC9B,YAAW,aAAa;IACxB,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAiE;IACjH,gBAAyB,mBAAmB,EAAE,MAAM,CAAuC;IAC3F,OAAgB,YAAY,mCAA0B;IAGtD,OAAO,CAAC,MAAM,CAAC,aAAa;IAoC5B,OAAO,CAAC,MAAM,CAAC,qBAAqB;cAoBX,aAAa,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CA4BjF"}
|
|
@@ -2,7 +2,7 @@ import { AbstractDiviner } from '@xyo-network/diviner-abstract';
|
|
|
2
2
|
import { DivinerModule, DivinerParams } from '@xyo-network/diviner-model';
|
|
3
3
|
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
4
4
|
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
5
|
-
import { LocationCertaintyDivinerConfig } from './Config.
|
|
5
|
+
import { LocationCertaintyDivinerConfig } from './Config.ts';
|
|
6
6
|
export type LocationCertaintyDivinerParams = DivinerParams<AnyConfigSchema<LocationCertaintyDivinerConfig>>;
|
|
7
7
|
export declare class LocationCertaintyDiviner<TParam extends LocationCertaintyDivinerParams = LocationCertaintyDivinerParams> extends AbstractDiviner<TParam> implements DivinerModule {
|
|
8
8
|
static readonly configSchemas: Schema[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../../src/Diviner/Diviner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAKzE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAE5D,OAAO,EAAE,8BAA8B,EAAwC,MAAM,aAAa,CAAA;AAElG,MAAM,MAAM,8BAA8B,GAAG,aAAa,CAAC,eAAe,CAAC,8BAA8B,CAAC,CAAC,CAAA;AAE3G,qBAAa,wBAAwB,CAAC,MAAM,SAAS,8BAA8B,GAAG,8BAA8B,CAClH,SAAQ,eAAe,CAAC,MAAM,CAC9B,YAAW,aAAa;
|
|
1
|
+
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../../src/Diviner/Diviner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAKzE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAE5D,OAAO,EAAE,8BAA8B,EAAwC,MAAM,aAAa,CAAA;AAElG,MAAM,MAAM,8BAA8B,GAAG,aAAa,CAAC,eAAe,CAAC,8BAA8B,CAAC,CAAC,CAAA;AAE3G,qBAAa,wBAAwB,CAAC,MAAM,SAAS,8BAA8B,GAAG,8BAA8B,CAClH,SAAQ,eAAe,CAAC,MAAM,CAC9B,YAAW,aAAa;IACxB,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAiE;IACjH,gBAAyB,mBAAmB,EAAE,MAAM,CAAuC;IAC3F,OAAgB,YAAY,mCAA0B;IAGtD,OAAO,CAAC,MAAM,CAAC,aAAa;IAoC5B,OAAO,CAAC,MAAM,CAAC,qBAAqB;cAoBX,aAAa,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CA4BjF"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './Config.
|
|
2
|
-
export * from './Diviner.
|
|
1
|
+
export * from './Config.ts';
|
|
2
|
+
export * from './Diviner.ts';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './Config.
|
|
2
|
-
export * from './Diviner.
|
|
1
|
+
export * from './Config.ts';
|
|
2
|
+
export * from './Diviner.ts';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './Config.
|
|
2
|
-
export * from './Diviner.
|
|
1
|
+
export * from './Config.ts';
|
|
2
|
+
export * from './Diviner.ts';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LocationCertaintySchema } from '@xyo-network/location-certainty-payload-plugin';
|
|
2
|
-
import { LocationCertaintyDiviner } from './Diviner/index.
|
|
2
|
+
import { LocationCertaintyDiviner } from './Diviner/index.ts';
|
|
3
3
|
export declare const LocationCertaintyPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetDivinerPlugin<LocationCertaintyDiviner<import("@xylabs/object").BaseParamsFields & {
|
|
4
4
|
account?: import("@xyo-network/account-model").AccountInstance | "random";
|
|
5
5
|
addToResolvers?: boolean;
|
|
@@ -10,7 +10,7 @@ export declare const LocationCertaintyPlugin: () => import("@xyo-network/payload
|
|
|
10
10
|
} & {
|
|
11
11
|
schema: string;
|
|
12
12
|
} & import("@xyo-network/payload-model").PayloadFields & {
|
|
13
|
-
schema: import("./Diviner/Config.
|
|
13
|
+
schema: import("./Diviner/Config.ts").LocationCertaintyDivinerConfigSchema;
|
|
14
14
|
targetSchema?: LocationCertaintySchema;
|
|
15
15
|
}, "schema"> & {
|
|
16
16
|
schema: "network.xyo.location.elevation.diviner.config";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LocationCertaintySchema } from '@xyo-network/location-certainty-payload-plugin';
|
|
2
|
-
import { LocationCertaintyDiviner } from './Diviner/index.
|
|
2
|
+
import { LocationCertaintyDiviner } from './Diviner/index.ts';
|
|
3
3
|
export declare const LocationCertaintyPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetDivinerPlugin<LocationCertaintyDiviner<import("@xylabs/object").BaseParamsFields & {
|
|
4
4
|
account?: import("@xyo-network/account-model").AccountInstance | "random";
|
|
5
5
|
addToResolvers?: boolean;
|
|
@@ -10,7 +10,7 @@ export declare const LocationCertaintyPlugin: () => import("@xyo-network/payload
|
|
|
10
10
|
} & {
|
|
11
11
|
schema: string;
|
|
12
12
|
} & import("@xyo-network/payload-model").PayloadFields & {
|
|
13
|
-
schema: import("./Diviner/Config.
|
|
13
|
+
schema: import("./Diviner/Config.ts").LocationCertaintyDivinerConfigSchema;
|
|
14
14
|
targetSchema?: LocationCertaintySchema;
|
|
15
15
|
}, "schema"> & {
|
|
16
16
|
schema: "network.xyo.location.elevation.diviner.config";
|