@bisrvn/utils
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -183,2 +183,31 @@ /** | ||
}[keyof TrackMap]; | ||
/** | ||
* Standard definitions for track types | ||
* All integrations should seek to be mapped to this standard somehow, to make development less cumbersome. | ||
*/ | ||
declare enum StandardizedTrackType { | ||
DRONE = "drone", | ||
PLANE = "plane", | ||
PLANE_SMALL = "plane_small", | ||
HELICOPTER = "helicopter", | ||
HELICOPTER_MEDIC = "helicopter_medic", | ||
OTHER = "other", | ||
UNKNOWN = "unknown" | ||
} | ||
/** | ||
* We may have multiple integrations in the future, with varying designations for specific object types. | ||
* This const should make it easier to determine, what kind of object the specific track is in terms of visualisation. | ||
**/ | ||
declare const STANDARDIZED_DEFINITIONS: { | ||
drone: AirPlateType[]; | ||
plane: AirPlateType[]; | ||
plane_small: AirPlateType[]; | ||
helicopter: AirPlateType[]; | ||
helicopter_medic: AirPlateType[]; | ||
other: AirPlateType[]; | ||
}; | ||
type StandardizedDefinitionsObject = typeof STANDARDIZED_DEFINITIONS; | ||
type StandardizedDefinitionsLookup = { | ||
[K in keyof StandardizedDefinitionsObject]: StandardizedDefinitionsObject[K]; | ||
}[keyof StandardizedDefinitionsObject][number]; | ||
@@ -189,2 +218,2 @@ type WithId<TExtend = unknown> = { | ||
export { type AirPlateDetermined, type AirPlateDrone, type AirPlatePlane, type AirPlateScanner, type AirPlateTrack, AirPlateType, type AirPlateUndetermined, type AltitudeReference, type AltitudeUnit, ETrack, type EmitterMessage, type HeadingUnit, type SpeedUnit, type TimeUnit, type Track, type TrackMap, type TrackUndetermined, type WithId, from_buffer, to_buffer }; | ||
export { type AirPlateDetermined, type AirPlateDrone, type AirPlatePlane, type AirPlateScanner, type AirPlateTrack, AirPlateType, type AirPlateUndetermined, type AltitudeReference, type AltitudeUnit, ETrack, type EmitterMessage, type HeadingUnit, STANDARDIZED_DEFINITIONS, type SpeedUnit, type StandardizedDefinitionsLookup, StandardizedTrackType, type TimeUnit, type Track, type TrackMap, type TrackUndetermined, type WithId, from_buffer, to_buffer }; |
@@ -45,2 +45,4 @@ "use strict"; | ||
ETrack: () => ETrack, | ||
STANDARDIZED_DEFINITIONS: () => STANDARDIZED_DEFINITIONS, | ||
StandardizedTrackType: () => StandardizedTrackType, | ||
from_buffer: () => from_buffer, | ||
@@ -59,10 +61,2 @@ to_buffer: () => to_buffer | ||
// lib/tracks/track.ts | ||
var ETrack = /* @__PURE__ */ ((ETrack2) => { | ||
ETrack2["AIRPLATE"] = "AirPlate"; | ||
ETrack2["BISRVN"] = "bisrvn"; | ||
ETrack2["MYDEFENCE"] = "mydefence"; | ||
return ETrack2; | ||
})(ETrack || {}); | ||
// lib/tracks/airplate.ts | ||
@@ -77,2 +71,29 @@ var AirPlateType = /* @__PURE__ */ ((AirPlateType2) => { | ||
})(AirPlateType || {}); | ||
// lib/tracks/track.ts | ||
var ETrack = /* @__PURE__ */ ((ETrack2) => { | ||
ETrack2["AIRPLATE"] = "AirPlate"; | ||
ETrack2["BISRVN"] = "bisrvn"; | ||
ETrack2["MYDEFENCE"] = "mydefence"; | ||
return ETrack2; | ||
})(ETrack || {}); | ||
var StandardizedTrackType = /* @__PURE__ */ ((StandardizedTrackType2) => { | ||
StandardizedTrackType2["DRONE"] = "drone"; | ||
StandardizedTrackType2["PLANE"] = "plane"; | ||
StandardizedTrackType2["PLANE_SMALL"] = "plane_small"; | ||
StandardizedTrackType2["HELICOPTER"] = "helicopter"; | ||
StandardizedTrackType2["HELICOPTER_MEDIC"] = "helicopter_medic"; | ||
StandardizedTrackType2["OTHER"] = "other"; | ||
StandardizedTrackType2["UNKNOWN"] = "unknown"; | ||
return StandardizedTrackType2; | ||
})(StandardizedTrackType || {}); | ||
var STANDARDIZED_DEFINITIONS = { | ||
["drone" /* DRONE */]: ["AirPlate" /* AP_DRONE */], | ||
// Commercial planes (bigger) | ||
["plane" /* PLANE */]: ["airplane" /* AP_PLANE */, "smallAirplane" /* AP_PLANE_SMALL */], | ||
["plane_small" /* PLANE_SMALL */]: ["smallAirplane" /* AP_PLANE_SMALL */], | ||
["helicopter" /* HELICOPTER */]: ["MED_HELI" /* AP_HELICOPTER_MED */], | ||
["helicopter_medic" /* HELICOPTER_MEDIC */]: ["MED_HELI" /* AP_HELICOPTER_MED */], | ||
["other" /* OTHER */]: ["scanned_DRI" /* AP_SCANNER */] | ||
}; | ||
// Annotate the CommonJS export names for ESM import in node: | ||
@@ -82,2 +103,4 @@ 0 && (module.exports = { | ||
ETrack, | ||
STANDARDIZED_DEFINITIONS, | ||
StandardizedTrackType, | ||
from_buffer, | ||
@@ -84,0 +107,0 @@ to_buffer |
{ | ||
"name": "@bisrvn/utils", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Interfaces and util functions", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34916
383