acmi-parser 1.0.0 → 1.2.0
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/LICENSE +21 -0
- package/dist/acmi-parser.cjs +3 -45
- package/dist/acmi-parser.js +6118 -9090
- package/dist/types/acmi/acmiData.d.ts +41 -0
- package/dist/types/acmi/entity.d.ts +26 -0
- package/dist/types/acmi/frame.d.ts +17 -0
- package/dist/types/acmi/globalProperties.d.ts +30 -0
- package/dist/types/acmi/header.d.ts +7 -0
- package/dist/types/acmi/timeSpan.d.ts +12 -0
- package/dist/types/acmi/transform.d.ts +22 -0
- package/dist/types/index.d.ts +14 -0
- package/dist/types/math3d/core/classes/base/math-array.d.ts +66 -0
- package/dist/types/math3d/core/classes/base/matrix.d.ts +13 -0
- package/dist/types/math3d/core/classes/base/vector.d.ts +43 -0
- package/dist/types/math3d/core/classes/euler.d.ts +78 -0
- package/dist/types/math3d/core/classes/matrix3.d.ts +62 -0
- package/dist/types/math3d/core/classes/matrix4.d.ts +232 -0
- package/dist/types/math3d/core/classes/pose.d.ts +39 -0
- package/dist/types/math3d/core/classes/quaternion.d.ts +64 -0
- package/dist/types/math3d/core/classes/spherical-coordinates.d.ts +59 -0
- package/dist/types/math3d/core/classes/vector2.d.ts +54 -0
- package/dist/types/math3d/core/classes/vector3.d.ts +59 -0
- package/dist/types/math3d/core/classes/vector4.d.ts +40 -0
- package/dist/types/math3d/core/gl-matrix/common.d.ts +37 -0
- package/dist/types/math3d/core/gl-matrix/mat3.d.ts +286 -0
- package/dist/types/math3d/core/gl-matrix/mat4.d.ts +549 -0
- package/dist/types/math3d/core/gl-matrix/quat.d.ts +358 -0
- package/dist/types/math3d/core/gl-matrix/vec2.d.ts +362 -0
- package/dist/types/math3d/core/gl-matrix/vec3.d.ts +405 -0
- package/dist/types/math3d/core/gl-matrix/vec4.d.ts +329 -0
- package/dist/types/math3d/core/index.d.ts +29 -0
- package/dist/types/math3d/core/lib/assert.d.ts +1 -0
- package/dist/types/math3d/core/lib/common.d.ts +99 -0
- package/dist/types/math3d/core/lib/gl-matrix-extras.d.ts +6 -0
- package/dist/types/math3d/core/lib/math-utils.d.ts +24 -0
- package/dist/types/math3d/core/lib/validators.d.ts +5 -0
- package/dist/types/math3d/geoid/geoid.d.ts +73 -0
- package/dist/types/math3d/geoid/index.d.ts +2 -0
- package/dist/types/math3d/geoid/parse-pgm.d.ts +11 -0
- package/dist/types/math3d/geospatial/constants.d.ts +11 -0
- package/dist/types/math3d/geospatial/ellipsoid/ellipsoid.d.ts +69 -0
- package/dist/types/math3d/geospatial/ellipsoid/helpers/ellipsoid-transform.d.ts +4 -0
- package/dist/types/math3d/geospatial/ellipsoid/helpers/scale-to-geodetic-surface.d.ts +2 -0
- package/dist/types/math3d/geospatial/index.d.ts +2 -0
- package/dist/types/math3d/geospatial/type-utils.d.ts +23 -0
- package/dist/types/math3d/index.d.ts +4 -0
- package/dist/types/math3d/types/array-types.d.ts +14 -0
- package/dist/types/math3d/types/bigint.d.ts +20 -0
- package/dist/types/math3d/types/index.d.ts +2 -0
- package/dist/types/math3d/types/is-array.d.ts +13 -0
- package/dist/types/parser.d.ts +90 -0
- package/dist/types/trajectory/stateVector.d.ts +30 -0
- package/dist/types/trajectory/trajectory.d.ts +40 -0
- package/dist/types/trajectory/trajectorySample.d.ts +11 -0
- package/package.json +20 -18
- package/dist/types/acmi-parser.d.ts +0 -179
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { NumericArray } from '../core';
|
|
2
|
+
type LngLatHeightObject = {
|
|
3
|
+
longitude: number;
|
|
4
|
+
latitude: number;
|
|
5
|
+
height: number;
|
|
6
|
+
};
|
|
7
|
+
type XYZObject = {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
z: number;
|
|
11
|
+
};
|
|
12
|
+
type Cartographic = LngLatHeightObject | XYZObject | NumericArray;
|
|
13
|
+
export declare function fromCartographic(cartographic: Readonly<Cartographic>): number[];
|
|
14
|
+
export declare function fromCartographic<NumArrayT>(cartographic: Readonly<Cartographic>, result: NumArrayT, map?: (x: number) => number): NumArrayT;
|
|
15
|
+
export declare function fromCartographicToRadians(cartographic: Readonly<Cartographic>, result?: number[]): number[];
|
|
16
|
+
export declare function fromCartographicToRadians<TArray>(cartographic: Readonly<Cartographic>, result: TArray): TArray;
|
|
17
|
+
export declare function fromCartographicToDegrees(cartographic: Readonly<Cartographic>, result?: number[]): number[];
|
|
18
|
+
export declare function fromCartographicToDegrees<TArray>(cartographic: Readonly<Cartographic>, result: TArray): TArray;
|
|
19
|
+
export declare function toCartographic<T extends Cartographic>(vector: Readonly<NumericArray>, cartographic: T, map?: (x: number) => number): T;
|
|
20
|
+
export declare function toCartographicFromRadians<T extends Cartographic>(vector: Readonly<NumericArray>, cartographic: T): T;
|
|
21
|
+
export declare function toCartographicFromDegrees<T extends Cartographic>(vector: Readonly<NumericArray>, cartographic: T): T;
|
|
22
|
+
export declare function isWGS84(vector: Readonly<NumericArray>): boolean;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypeScript type covering all typed arrays
|
|
3
|
+
*/
|
|
4
|
+
export type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array;
|
|
5
|
+
export type TypedArrayConstructor = Int8ArrayConstructor | Uint8ArrayConstructor | Uint8ClampedArrayConstructor | Int16ArrayConstructor | Uint16ArrayConstructor | Int32ArrayConstructor | Uint32ArrayConstructor | Float32ArrayConstructor | Float64ArrayConstructor;
|
|
6
|
+
/**
|
|
7
|
+
* TypeScript type covering all typed arrays and classic arrays consisting of numbers
|
|
8
|
+
*/
|
|
9
|
+
export type NumericArray = TypedArray | number[];
|
|
10
|
+
/**
|
|
11
|
+
* TypeScript type covering all typed arrays and classic arrays consisting of numbers
|
|
12
|
+
* @note alias for NumericArray
|
|
13
|
+
*/
|
|
14
|
+
export type NumberArray = NumericArray;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare function BigIntUnavailable(): void;
|
|
2
|
+
declare namespace BigIntUnavailable {
|
|
3
|
+
var asIntN: () => never;
|
|
4
|
+
var asUintN: () => never;
|
|
5
|
+
}
|
|
6
|
+
declare class BigInt64ArrayUnavailable {
|
|
7
|
+
static get BYTES_PER_ELEMENT(): number;
|
|
8
|
+
static of(): void;
|
|
9
|
+
static from(): void;
|
|
10
|
+
constructor();
|
|
11
|
+
}
|
|
12
|
+
export declare const BigIntAvailable: boolean;
|
|
13
|
+
export declare const BigInt64ArrayAvailable: boolean;
|
|
14
|
+
export declare const BigUint64ArrayAvailable: boolean;
|
|
15
|
+
declare const BigIntCtor: typeof BigIntUnavailable | BigIntConstructor;
|
|
16
|
+
declare const BigInt64ArrayCtor: typeof BigInt64ArrayUnavailable | BigInt64ArrayConstructor;
|
|
17
|
+
declare const BigUint64ArrayCtor: BigUint64ArrayConstructor[] | (typeof BigInt64ArrayUnavailable)[];
|
|
18
|
+
export { BigIntCtor as BigInt };
|
|
19
|
+
export { BigInt64ArrayCtor as BigInt64Array };
|
|
20
|
+
export { BigUint64ArrayCtor as BigUint64Array };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TypedArray, NumericArray } from './array-types';
|
|
2
|
+
/**
|
|
3
|
+
* Check is an array is a typed array
|
|
4
|
+
* @param value value to be tested
|
|
5
|
+
* @returns input as TypedArray, or null
|
|
6
|
+
*/
|
|
7
|
+
export declare function isTypedArray(value: unknown): TypedArray | null;
|
|
8
|
+
/**
|
|
9
|
+
* Check is an array is a numeric array (typed array or array of numbers)
|
|
10
|
+
* @param value value to be tested
|
|
11
|
+
* @returns input as NumericArray, or null
|
|
12
|
+
*/
|
|
13
|
+
export declare function isNumericArray(value: unknown): NumericArray | null;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { default as AcmiData } from './acmi/acmiData';
|
|
2
|
+
/** Options that control entity filtering and cancellation during parsing. */
|
|
3
|
+
export interface AcmiParserOptions {
|
|
4
|
+
/**
|
|
5
|
+
* ACMI entity type components to omit from the result.
|
|
6
|
+
*
|
|
7
|
+
* @remarks Use `"Untyped"` to omit entities without a `Type` property.
|
|
8
|
+
*/
|
|
9
|
+
excludedTypes?: readonly string[];
|
|
10
|
+
/** Signal used to cancel input normalization or ZIP decompression. */
|
|
11
|
+
signal?: AbortSignal;
|
|
12
|
+
/** @deprecated Use `excludedTypes` instead. */
|
|
13
|
+
filter?: string[];
|
|
14
|
+
/** @deprecated Pass the controller's `signal` instead. */
|
|
15
|
+
controller?: AbortController;
|
|
16
|
+
}
|
|
17
|
+
/** Binary input accepted by the parser, including typed arrays and Node.js buffers. */
|
|
18
|
+
export type AcmiBinaryInput = ArrayBuffer | ArrayBufferView;
|
|
19
|
+
/** Plain ACMI text, binary ACMI data, or a browser `Blob`/`File`. */
|
|
20
|
+
export type AcmiInput = string | AcmiBinaryInput | Blob;
|
|
21
|
+
/** Stable codes exposed by {@link AcmiParseError}. */
|
|
22
|
+
export type AcmiParseErrorCode = "INVALID_ARCHIVE" | "UNSUPPORTED_INPUT";
|
|
23
|
+
/** Error thrown when input cannot be normalized or a ZIP archive cannot be read. */
|
|
24
|
+
export declare class AcmiParseError extends Error {
|
|
25
|
+
/** Machine-readable category for the failure. */
|
|
26
|
+
readonly code: AcmiParseErrorCode;
|
|
27
|
+
/** Underlying error, when the failure originated in ZIP decompression. */
|
|
28
|
+
readonly cause?: unknown;
|
|
29
|
+
/**
|
|
30
|
+
* Creates a parser error.
|
|
31
|
+
*
|
|
32
|
+
* @param message - Human-readable description of the failure.
|
|
33
|
+
* @param code - Stable machine-readable failure category.
|
|
34
|
+
* @param cause - Optional lower-level error that caused the failure.
|
|
35
|
+
*/
|
|
36
|
+
constructor(message: string, code: AcmiParseErrorCode, cause?: unknown);
|
|
37
|
+
}
|
|
38
|
+
/** Stateful parser for Tacview ACMI 2.1 and 2.2 recordings. */
|
|
39
|
+
export default class AcmiParser {
|
|
40
|
+
private _decoder;
|
|
41
|
+
private _currentLine;
|
|
42
|
+
private _currentTimeStamp;
|
|
43
|
+
private _currentFrame;
|
|
44
|
+
private _destroyedIds;
|
|
45
|
+
private _filteredIds;
|
|
46
|
+
private _data;
|
|
47
|
+
private _excludedTypes;
|
|
48
|
+
private readonly _acmiVersions;
|
|
49
|
+
private readonly _acmiType;
|
|
50
|
+
private readonly _propertySeparator;
|
|
51
|
+
private readonly _headerPattern;
|
|
52
|
+
/**
|
|
53
|
+
* Creates a reusable parser.
|
|
54
|
+
*
|
|
55
|
+
* @param geoidPgm - Optional binary PGM geoid model used to correct altitude.
|
|
56
|
+
* @remarks Parser instances are reusable sequentially. Do not call `parse()`
|
|
57
|
+
* concurrently on the same instance.
|
|
58
|
+
*/
|
|
59
|
+
constructor(geoidPgm?: AcmiBinaryInput);
|
|
60
|
+
private _toUint8Array;
|
|
61
|
+
private _normalizeInput;
|
|
62
|
+
private _throwIfAborted;
|
|
63
|
+
private _isValidVersion;
|
|
64
|
+
private _isValidType;
|
|
65
|
+
private _parseHeader;
|
|
66
|
+
private _consumeContentLine;
|
|
67
|
+
private _parseContent;
|
|
68
|
+
private _parseLine;
|
|
69
|
+
private _unzip;
|
|
70
|
+
private _parseBuffer;
|
|
71
|
+
/**
|
|
72
|
+
* Parses plain or single-file ZIP-compressed ACMI input.
|
|
73
|
+
*
|
|
74
|
+
* @param data - ACMI text, binary data, or a browser `Blob`/`File`.
|
|
75
|
+
* @param options - Entity filtering and cancellation options.
|
|
76
|
+
* @returns The parsed recording model.
|
|
77
|
+
* @throws {@link AcmiParseError} if input normalization or ZIP reading fails.
|
|
78
|
+
* @throws The abort signal's reason when the operation is cancelled.
|
|
79
|
+
*/
|
|
80
|
+
parse(data: AcmiInput, options?: AcmiParserOptions): Promise<AcmiData>;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Parses an ACMI recording with a fresh parser instance.
|
|
84
|
+
*
|
|
85
|
+
* @param data - ACMI text, binary data, or a browser `Blob`/`File`.
|
|
86
|
+
* @param options - Entity filtering and cancellation options.
|
|
87
|
+
* @returns The parsed recording model.
|
|
88
|
+
* @throws {@link AcmiParseError} if input normalization or ZIP reading fails.
|
|
89
|
+
*/
|
|
90
|
+
export declare function parseAcmi(data: AcmiInput, options?: AcmiParserOptions): Promise<AcmiData>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Vector3, Quaternion } from '../math3d/index.ts';
|
|
2
|
+
import { default as Transform } from '../acmi//transform';
|
|
3
|
+
/** WGS84 fixed-frame position and optional orientation. */
|
|
4
|
+
export default class StateVector {
|
|
5
|
+
/** Earth-centred, Earth-fixed Cartesian position in metres. */
|
|
6
|
+
cartesian: Vector3;
|
|
7
|
+
/** Fixed-frame orientation quaternion, when available. */
|
|
8
|
+
quaternion?: Quaternion;
|
|
9
|
+
/**
|
|
10
|
+
* Compares position and orientation components with another state vector.
|
|
11
|
+
*
|
|
12
|
+
* @param stateVector - State vector to compare.
|
|
13
|
+
* @returns Whether both state vectors contain equal components.
|
|
14
|
+
*/
|
|
15
|
+
equals(stateVector: StateVector): boolean | undefined;
|
|
16
|
+
private static _scratchQuaternionX;
|
|
17
|
+
private static _scratchQuaternionY;
|
|
18
|
+
private static _scratchQuaternionZ;
|
|
19
|
+
private static _scratchHprMatrix;
|
|
20
|
+
private static _scratchTranslationMatrix;
|
|
21
|
+
private static _scratchRotation;
|
|
22
|
+
/**
|
|
23
|
+
* Converts a geodetic transform into the WGS84 fixed frame.
|
|
24
|
+
*
|
|
25
|
+
* @param transform - Geodetic position and optional local orientation.
|
|
26
|
+
* @param result - Optional object to populate instead of allocating one.
|
|
27
|
+
* @returns The populated state vector.
|
|
28
|
+
*/
|
|
29
|
+
static fromTransform(transform: Transform, result?: StateVector): StateVector;
|
|
30
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { default as ITrajectorySample } from './trajectorySample';
|
|
2
|
+
/** Options used when sampling trajectories from frame snapshots. */
|
|
3
|
+
export interface TrajectoryOptions {
|
|
4
|
+
/**
|
|
5
|
+
* Sampling interval in seconds.
|
|
6
|
+
*
|
|
7
|
+
* @defaultValue `1`
|
|
8
|
+
*/
|
|
9
|
+
sampleRate?: number;
|
|
10
|
+
/**
|
|
11
|
+
* Whether to derive orientations from movement and turning motion.
|
|
12
|
+
*
|
|
13
|
+
* @defaultValue `false`
|
|
14
|
+
*/
|
|
15
|
+
emulateOrientation?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/** @deprecated Use `TrajectoryOptions` instead. */
|
|
18
|
+
export type ITrajectoryOptions = TrajectoryOptions;
|
|
19
|
+
/** Chronologically ordered state-vector samples for one entity. */
|
|
20
|
+
export default class Trajectory {
|
|
21
|
+
/** Mutable ordered collection of trajectory samples. */
|
|
22
|
+
samples: ITrajectorySample[];
|
|
23
|
+
/** @returns Whether the first sample contains an orientation quaternion. */
|
|
24
|
+
hasOrientations(): boolean;
|
|
25
|
+
private _lastRoll;
|
|
26
|
+
private _simpleSmooth;
|
|
27
|
+
private _computeRoll;
|
|
28
|
+
private _computeOrientation;
|
|
29
|
+
/**
|
|
30
|
+
* Derives and assigns orientations for all samples from their motion.
|
|
31
|
+
*
|
|
32
|
+
* @param withRoll - Whether to estimate bank angle from turning motion.
|
|
33
|
+
* @remarks This method mutates sample state vectors and replaces any source
|
|
34
|
+
* orientations. For the final two samples, it reuses the last computable
|
|
35
|
+
* orientation because no forward interval is available.
|
|
36
|
+
*/
|
|
37
|
+
emulateOrientations(withRoll?: boolean): void;
|
|
38
|
+
}
|
|
39
|
+
/** Entity trajectories keyed by numeric ACMI entity ID. */
|
|
40
|
+
export type Trajectories = Map<number, Trajectory>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Dayjs } from 'dayjs';
|
|
2
|
+
import { default as StateVector } from './stateVector';
|
|
3
|
+
/** One absolute-time sample in an entity trajectory. */
|
|
4
|
+
export default interface TrajectorySample {
|
|
5
|
+
/** Absolute sample time. */
|
|
6
|
+
time: Dayjs;
|
|
7
|
+
/** Fixed-frame position and optional orientation. */
|
|
8
|
+
stateVector: StateVector;
|
|
9
|
+
}
|
|
10
|
+
/** @deprecated Use `TrajectorySample` instead. */
|
|
11
|
+
export type ITrajectorySample = TrajectorySample;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "acmi-parser",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "ACMI file format parser",
|
|
5
5
|
"author": "jfayot",
|
|
6
6
|
"repository": {
|
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
"bugs": "https://github.com/jfayot/acmi-parser/issues",
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"publishConfig": {
|
|
20
|
+
"access": "public",
|
|
21
|
+
"provenance": true,
|
|
20
22
|
"registry": "https://registry.npmjs.org/"
|
|
21
23
|
},
|
|
22
24
|
"files": [
|
|
@@ -25,18 +27,12 @@
|
|
|
25
27
|
"type": "module",
|
|
26
28
|
"main": "./dist/acmi-parser.cjs",
|
|
27
29
|
"module": "./dist/acmi-parser.js",
|
|
28
|
-
"types": "./dist/types/
|
|
30
|
+
"types": "./dist/types/index.d.ts",
|
|
29
31
|
"exports": {
|
|
30
|
-
"types": "./dist/types/
|
|
32
|
+
"types": "./dist/types/index.d.ts",
|
|
31
33
|
"import": "./dist/acmi-parser.js",
|
|
32
34
|
"require": "./dist/acmi-parser.cjs"
|
|
33
35
|
},
|
|
34
|
-
"scripts": {
|
|
35
|
-
"build": "vite build",
|
|
36
|
-
"clean": "rimraf dist",
|
|
37
|
-
"clean:all": "pnpm clean && rimraf node_modules",
|
|
38
|
-
"release": "pnpm build && npm publish"
|
|
39
|
-
},
|
|
40
36
|
"commitlint": {
|
|
41
37
|
"extends": [
|
|
42
38
|
"@commitlint/config-conventional"
|
|
@@ -52,15 +48,21 @@
|
|
|
52
48
|
]
|
|
53
49
|
},
|
|
54
50
|
"dependencies": {
|
|
55
|
-
"@
|
|
56
|
-
"
|
|
57
|
-
"@cesium/engine": "^6.1.1",
|
|
58
|
-
"dayjs": "^1.11.10",
|
|
59
|
-
"unzipit": "^1.4.3"
|
|
51
|
+
"@zip.js/zip.js": "^2.8.61",
|
|
52
|
+
"dayjs": "^1.11.23"
|
|
60
53
|
},
|
|
61
54
|
"devDependencies": {
|
|
62
|
-
"typescript": "^
|
|
63
|
-
"
|
|
64
|
-
"vite
|
|
55
|
+
"@typescript/typescript6": "^6.0.2",
|
|
56
|
+
"typescript": "^7.0.2",
|
|
57
|
+
"vite": "^8.2.2",
|
|
58
|
+
"vite-plugin-dts": "^5.0.3",
|
|
59
|
+
"vitest": "^4.1.11"
|
|
60
|
+
},
|
|
61
|
+
"scripts": {
|
|
62
|
+
"build": "vite build",
|
|
63
|
+
"test": "vitest run",
|
|
64
|
+
"clean": "rimraf dist",
|
|
65
|
+
"clean:all": "pnpm clean && rimraf node_modules",
|
|
66
|
+
"release": "pnpm build && npm publish"
|
|
65
67
|
}
|
|
66
|
-
}
|
|
68
|
+
}
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
import { Cartesian3 } from '@cesium/engine';
|
|
2
|
-
import { Dayjs } from 'dayjs';
|
|
3
|
-
import dayjs from 'dayjs';
|
|
4
|
-
import { Quaternion } from '@cesium/engine';
|
|
5
|
-
|
|
6
|
-
export declare class AcmiData {
|
|
7
|
-
isValid: boolean;
|
|
8
|
-
header: AcmiHeader;
|
|
9
|
-
globalProperties: GlobalProperties;
|
|
10
|
-
timeSpan: TimeSpan;
|
|
11
|
-
entities: Map<number, IEntityProps>;
|
|
12
|
-
frames: Frames;
|
|
13
|
-
private readonly _fixedFrame;
|
|
14
|
-
getFrame(time: Dayjs): Frame | undefined;
|
|
15
|
-
private _addFrame;
|
|
16
|
-
createSampledTrajectories(options?: ITrajectoryOptions): Trajectories;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export declare class AcmiHeader {
|
|
20
|
-
fileType: string;
|
|
21
|
-
fileVersion: string;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
declare class AcmiParser {
|
|
25
|
-
private _decoder;
|
|
26
|
-
private _currentLine;
|
|
27
|
-
private _currentTimeStamp;
|
|
28
|
-
private _currentFrame;
|
|
29
|
-
private _destroyedIds;
|
|
30
|
-
private _filteredIds;
|
|
31
|
-
private _data;
|
|
32
|
-
private _filter;
|
|
33
|
-
private _refLat;
|
|
34
|
-
private _refLong;
|
|
35
|
-
private readonly _acmiVersions;
|
|
36
|
-
private readonly _acmiType;
|
|
37
|
-
private readonly _propertySeparator;
|
|
38
|
-
private readonly _headerPattern;
|
|
39
|
-
constructor(geoidModel: Uint8Array);
|
|
40
|
-
private _isValidVersion;
|
|
41
|
-
private _isValidType;
|
|
42
|
-
private _parseHeader;
|
|
43
|
-
private _parseContent;
|
|
44
|
-
private _parseLine;
|
|
45
|
-
private _isZipped;
|
|
46
|
-
private _unzip;
|
|
47
|
-
private _parseBuffer;
|
|
48
|
-
parse(data: Uint8Array, options?: AcmiParserOptions): Promise<AcmiData>;
|
|
49
|
-
}
|
|
50
|
-
export default AcmiParser;
|
|
51
|
-
|
|
52
|
-
export declare interface AcmiParserOptions {
|
|
53
|
-
filter?: string[];
|
|
54
|
-
controller?: AbortController;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export declare class EntityProps implements IEntityProps {
|
|
58
|
-
id: number;
|
|
59
|
-
timeSpan: TimeSpan;
|
|
60
|
-
name?: string;
|
|
61
|
-
types?: string[];
|
|
62
|
-
callsign?: string;
|
|
63
|
-
pilot?: string;
|
|
64
|
-
group?: string;
|
|
65
|
-
country?: string;
|
|
66
|
-
coalition?: string;
|
|
67
|
-
color?: string;
|
|
68
|
-
constructor(id: number);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export declare class Frame {
|
|
72
|
-
timeStamp: number;
|
|
73
|
-
scene: Scene;
|
|
74
|
-
constructor(timeStamp: number, scene?: Scene);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export declare type Frames = Array<Frame>;
|
|
78
|
-
|
|
79
|
-
export declare class GlobalProperties {
|
|
80
|
-
referenceTime: dayjs.Dayjs;
|
|
81
|
-
dataSource?: string;
|
|
82
|
-
dataRecorder?: string;
|
|
83
|
-
recordingTime?: Dayjs;
|
|
84
|
-
author?: string;
|
|
85
|
-
title?: string;
|
|
86
|
-
category?: string;
|
|
87
|
-
briefing?: string;
|
|
88
|
-
debriefing?: string;
|
|
89
|
-
comments?: string;
|
|
90
|
-
referenceLongitude?: number;
|
|
91
|
-
referenceLatitude?: number;
|
|
92
|
-
additionalProps?: Map<string, string>;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export declare interface IEntityProps {
|
|
96
|
-
id: number;
|
|
97
|
-
timeSpan: {
|
|
98
|
-
start: Dayjs;
|
|
99
|
-
end: Dayjs;
|
|
100
|
-
};
|
|
101
|
-
name?: string;
|
|
102
|
-
types?: string[];
|
|
103
|
-
callsign?: string;
|
|
104
|
-
pilot?: string;
|
|
105
|
-
group?: string;
|
|
106
|
-
country?: string;
|
|
107
|
-
coalition?: string;
|
|
108
|
-
color?: string;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
export declare interface IStateVector {
|
|
112
|
-
position: Cartesian3;
|
|
113
|
-
orientation?: Quaternion;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
export declare interface ITrajectoryOptions {
|
|
117
|
-
sampleRate?: number;
|
|
118
|
-
fixMslHeight?: boolean;
|
|
119
|
-
emulateOrientation?: boolean;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
export declare interface ITrajectorySample {
|
|
123
|
-
time: Dayjs;
|
|
124
|
-
state: IStateVector;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
export declare interface ITransform {
|
|
128
|
-
longitude: number;
|
|
129
|
-
latitude: number;
|
|
130
|
-
altitude: number;
|
|
131
|
-
roll?: number;
|
|
132
|
-
pitch?: number;
|
|
133
|
-
yaw?: number;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
export declare type Scene = Map<number, ITransform>;
|
|
137
|
-
|
|
138
|
-
export declare class TimeSpan {
|
|
139
|
-
start: dayjs.Dayjs;
|
|
140
|
-
end: dayjs.Dayjs;
|
|
141
|
-
isValid(): boolean;
|
|
142
|
-
duration(): number;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
export declare type Trajectories = Map<number, Trajectory>;
|
|
146
|
-
|
|
147
|
-
export declare class Trajectory {
|
|
148
|
-
samples: ITrajectorySample[];
|
|
149
|
-
private _mslHeightFixed;
|
|
150
|
-
private static _geoid?;
|
|
151
|
-
private readonly _fixedFrame;
|
|
152
|
-
static loadGeoidModel(model: Uint8Array): void;
|
|
153
|
-
hasOrientations(): boolean;
|
|
154
|
-
private _lastRoll;
|
|
155
|
-
private _simpleSmooth;
|
|
156
|
-
private _m0;
|
|
157
|
-
private _m1;
|
|
158
|
-
private _hpr0;
|
|
159
|
-
private _hpr1;
|
|
160
|
-
private _alpha;
|
|
161
|
-
private _computeRoll;
|
|
162
|
-
private _p0;
|
|
163
|
-
private _p1;
|
|
164
|
-
private _p2;
|
|
165
|
-
private _v0;
|
|
166
|
-
private _v1;
|
|
167
|
-
private _r0;
|
|
168
|
-
private _r1;
|
|
169
|
-
private _q0;
|
|
170
|
-
private _q1;
|
|
171
|
-
private _rollQuat;
|
|
172
|
-
private _defaultHpr;
|
|
173
|
-
private _computeOrientation;
|
|
174
|
-
emulateOrientations(dt: number, withRoll?: boolean): void;
|
|
175
|
-
private _cartographicScratch;
|
|
176
|
-
fixMslHeight(): void;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
export { }
|