worldorbit 3.2.2 → 5.0.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/README.md +543 -543
- package/dist/browser/core/dist/atlas-edit.js +146 -1
- package/dist/browser/core/dist/atlas-validate.js +105 -10
- package/dist/browser/core/dist/draft-parse.js +461 -17
- package/dist/browser/core/dist/draft.d.ts +2 -1
- package/dist/browser/core/dist/draft.js +26 -4
- package/dist/browser/core/dist/format.js +126 -5
- package/dist/browser/core/dist/index.d.ts +1 -0
- package/dist/browser/core/dist/index.js +1 -0
- package/dist/browser/core/dist/load.js +12 -2
- package/dist/browser/core/dist/normalize.js +1 -0
- package/dist/browser/core/dist/scene.js +226 -5
- package/dist/browser/core/dist/schema.js +11 -1
- package/dist/browser/core/dist/solver.d.ts +33 -0
- package/dist/browser/core/dist/solver.js +99 -0
- package/dist/browser/core/dist/spatial-scene.js +56 -0
- package/dist/browser/core/dist/types.d.ts +130 -4
- package/dist/browser/editor/dist/editor.js +844 -719
- package/dist/browser/editor/dist/types.d.ts +2 -1
- package/dist/browser/viewer/dist/minimap.js +9 -7
- package/dist/browser/viewer/dist/render.js +78 -18
- package/dist/browser/viewer/dist/runtime-3d.js +2 -0
- package/dist/browser/viewer/dist/theme.js +1 -0
- package/dist/browser/viewer/dist/types.d.ts +7 -0
- package/dist/browser/viewer/dist/viewer.js +34 -3
- package/dist/obsidian-plugin/README.md +141 -124
- package/dist/obsidian-plugin/main.js +82 -68
- package/dist/unpkg/core/dist/atlas-edit.js +146 -1
- package/dist/unpkg/core/dist/atlas-validate.js +105 -10
- package/dist/unpkg/core/dist/draft-parse.js +461 -17
- package/dist/unpkg/core/dist/draft.d.ts +2 -1
- package/dist/unpkg/core/dist/draft.js +26 -4
- package/dist/unpkg/core/dist/format.js +126 -5
- package/dist/unpkg/core/dist/index.d.ts +1 -0
- package/dist/unpkg/core/dist/index.js +1 -0
- package/dist/unpkg/core/dist/load.js +12 -2
- package/dist/unpkg/core/dist/normalize.js +1 -0
- package/dist/unpkg/core/dist/scene.js +226 -5
- package/dist/unpkg/core/dist/schema.js +11 -1
- package/dist/unpkg/core/dist/solver.d.ts +33 -0
- package/dist/unpkg/core/dist/solver.js +99 -0
- package/dist/unpkg/core/dist/spatial-scene.js +56 -0
- package/dist/unpkg/core/dist/types.d.ts +130 -4
- package/dist/unpkg/editor/dist/editor.js +844 -719
- package/dist/unpkg/editor/dist/types.d.ts +2 -1
- package/dist/unpkg/viewer/dist/minimap.js +9 -7
- package/dist/unpkg/viewer/dist/render.js +78 -18
- package/dist/unpkg/viewer/dist/runtime-3d.js +2 -0
- package/dist/unpkg/viewer/dist/theme.js +1 -0
- package/dist/unpkg/viewer/dist/types.d.ts +7 -0
- package/dist/unpkg/viewer/dist/viewer.js +34 -3
- package/dist/unpkg/worldorbit-core.min.js +12 -12
- package/dist/unpkg/worldorbit-editor.min.js +381 -340
- package/dist/unpkg/worldorbit-markdown.min.js +47 -33
- package/dist/unpkg/worldorbit-viewer.min.js +238 -224
- package/dist/unpkg/worldorbit.js +1218 -46
- package/dist/unpkg/worldorbit.min.js +242 -228
- package/package.json +5 -1
- package/packages/core/dist/atlas-edit.js +146 -1
- package/packages/core/dist/atlas-validate.js +105 -10
- package/packages/core/dist/draft-parse.js +461 -17
- package/packages/core/dist/draft.d.ts +2 -1
- package/packages/core/dist/draft.js +26 -4
- package/packages/core/dist/format.js +126 -5
- package/packages/core/dist/index.d.ts +1 -0
- package/packages/core/dist/index.js +1 -0
- package/packages/core/dist/load.js +12 -2
- package/packages/core/dist/normalize.js +1 -0
- package/packages/core/dist/scene.js +226 -5
- package/packages/core/dist/schema.js +11 -1
- package/packages/core/dist/solver.d.ts +33 -0
- package/packages/core/dist/solver.js +99 -0
- package/packages/core/dist/spatial-scene.js +56 -0
- package/packages/core/dist/types.d.ts +130 -4
- package/packages/editor/dist/editor.js +844 -719
- package/packages/editor/dist/types.d.ts +2 -1
- package/packages/viewer/dist/minimap.js +9 -7
- package/packages/viewer/dist/render.js +78 -18
- package/packages/viewer/dist/runtime-3d.js +2 -0
- package/packages/viewer/dist/theme.js +1 -0
- package/packages/viewer/dist/types.d.ts +7 -0
- package/packages/viewer/dist/viewer.js +34 -3
|
@@ -7,6 +7,7 @@ const ALL_OBJECTS = [
|
|
|
7
7
|
"asteroid",
|
|
8
8
|
"comet",
|
|
9
9
|
"ring",
|
|
10
|
+
"craft",
|
|
10
11
|
"structure",
|
|
11
12
|
"phenomenon",
|
|
12
13
|
];
|
|
@@ -17,10 +18,11 @@ const IMAGE_OBJECTS = [
|
|
|
17
18
|
"moon",
|
|
18
19
|
"asteroid",
|
|
19
20
|
"comet",
|
|
21
|
+
"craft",
|
|
20
22
|
"structure",
|
|
21
23
|
"phenomenon",
|
|
22
24
|
];
|
|
23
|
-
const ANCHORED_OBJECTS = ["structure", "phenomenon"];
|
|
25
|
+
const ANCHORED_OBJECTS = ["craft", "structure", "phenomenon"];
|
|
24
26
|
const ORBITAL_OBJECTS = [
|
|
25
27
|
"star",
|
|
26
28
|
"planet",
|
|
@@ -29,6 +31,7 @@ const ORBITAL_OBJECTS = [
|
|
|
29
31
|
"asteroid",
|
|
30
32
|
"comet",
|
|
31
33
|
"ring",
|
|
34
|
+
"craft",
|
|
32
35
|
"structure",
|
|
33
36
|
"phenomenon",
|
|
34
37
|
];
|
|
@@ -40,6 +43,7 @@ const FREE_OBJECTS = [
|
|
|
40
43
|
"asteroid",
|
|
41
44
|
"comet",
|
|
42
45
|
"ring",
|
|
46
|
+
"craft",
|
|
43
47
|
"structure",
|
|
44
48
|
"phenomenon",
|
|
45
49
|
];
|
|
@@ -269,6 +273,12 @@ export const WORLDORBIT_FIELD_SCHEMAS = new Map([
|
|
|
269
273
|
objectTypes: NON_SYSTEM_OBJECTS,
|
|
270
274
|
unitFamily: "duration",
|
|
271
275
|
}),
|
|
276
|
+
createField("trajectory", {
|
|
277
|
+
kind: "string",
|
|
278
|
+
placement: false,
|
|
279
|
+
arity: "single",
|
|
280
|
+
objectTypes: ["craft", "structure"],
|
|
281
|
+
}),
|
|
272
282
|
].map((schema) => [schema.key, schema]));
|
|
273
283
|
export const WORLDORBIT_FIELD_KEYS = new Set(WORLDORBIT_FIELD_SCHEMAS.keys());
|
|
274
284
|
export function getFieldSchema(key) {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { SceneRenderOptions, SpatialTrajectory, UnitValue, WorldOrbitDocument, WorldOrbitTrajectory, WorldOrbitTrajectorySegment } from "./types.js";
|
|
2
|
+
export interface SolverSegmentSample {
|
|
3
|
+
segmentId: string;
|
|
4
|
+
kind: WorldOrbitTrajectorySegment["kind"];
|
|
5
|
+
fromObjectId: string | null;
|
|
6
|
+
toObjectId: string | null;
|
|
7
|
+
aroundObjectId: string | null;
|
|
8
|
+
assistObjectId: string | null;
|
|
9
|
+
duration: UnitValue | null;
|
|
10
|
+
deltaV: UnitValue | null;
|
|
11
|
+
}
|
|
12
|
+
export interface SolverManeuverSample {
|
|
13
|
+
segmentId: string;
|
|
14
|
+
maneuverId: string;
|
|
15
|
+
kind: string;
|
|
16
|
+
epoch: string | null;
|
|
17
|
+
deltaV: UnitValue | null;
|
|
18
|
+
duration: UnitValue | null;
|
|
19
|
+
}
|
|
20
|
+
export interface SolverTrajectorySnapshot {
|
|
21
|
+
trajectoryId: string;
|
|
22
|
+
craftObjectId: string | null;
|
|
23
|
+
segments: SolverSegmentSample[];
|
|
24
|
+
maneuvers: SolverManeuverSample[];
|
|
25
|
+
}
|
|
26
|
+
export interface TrajectorySamplingOptions extends Pick<SceneRenderOptions, "width" | "height" | "padding" | "preset" | "projection" | "camera" | "scaleModel" | "bodyScaleMode"> {
|
|
27
|
+
trajectoryMode?: "illustrative" | "solver" | "auto";
|
|
28
|
+
showTrajectoryWaypoints?: boolean;
|
|
29
|
+
showTrajectoryLabels?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export declare function createTrajectorySolverSnapshot(trajectory: WorldOrbitTrajectory): SolverTrajectorySnapshot;
|
|
32
|
+
export declare function sampleTrajectory(trajectory: WorldOrbitTrajectory, document: WorldOrbitDocument, options?: TrajectorySamplingOptions): SpatialTrajectory | null;
|
|
33
|
+
export declare function sampleDocumentTrajectories(document: WorldOrbitDocument, options?: TrajectorySamplingOptions): SpatialTrajectory[];
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { renderDocumentToScene } from "./scene.js";
|
|
2
|
+
export function createTrajectorySolverSnapshot(trajectory) {
|
|
3
|
+
return {
|
|
4
|
+
trajectoryId: trajectory.id,
|
|
5
|
+
craftObjectId: trajectory.craftObjectId,
|
|
6
|
+
segments: trajectory.segments.map((segment) => ({
|
|
7
|
+
segmentId: segment.id,
|
|
8
|
+
kind: segment.kind,
|
|
9
|
+
fromObjectId: segment.fromObjectId,
|
|
10
|
+
toObjectId: segment.toObjectId,
|
|
11
|
+
aroundObjectId: segment.aroundObjectId,
|
|
12
|
+
assistObjectId: segment.assist?.objectId ?? null,
|
|
13
|
+
duration: segment.duration ?? null,
|
|
14
|
+
deltaV: segment.deltaV ?? null,
|
|
15
|
+
})),
|
|
16
|
+
maneuvers: trajectory.segments.flatMap((segment) => segment.maneuvers.map((maneuver) => mapManeuver(segment.id, maneuver))),
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export function sampleTrajectory(trajectory, document, options = {}) {
|
|
20
|
+
const scene = renderDocumentToScene(document, {
|
|
21
|
+
...options,
|
|
22
|
+
trajectoryMode: options.trajectoryMode ?? trajectory.renderMode ?? "auto",
|
|
23
|
+
showTrajectoryWaypoints: options.showTrajectoryWaypoints ?? true,
|
|
24
|
+
showTrajectoryLabels: options.showTrajectoryLabels ?? true,
|
|
25
|
+
});
|
|
26
|
+
const rendered = scene.trajectories.find((entry) => entry.trajectoryId === trajectory.id);
|
|
27
|
+
return rendered ? mapRenderTrajectoryToSpatial(rendered) : null;
|
|
28
|
+
}
|
|
29
|
+
export function sampleDocumentTrajectories(document, options = {}) {
|
|
30
|
+
const scene = renderDocumentToScene(document, {
|
|
31
|
+
...options,
|
|
32
|
+
trajectoryMode: options.trajectoryMode ?? "auto",
|
|
33
|
+
showTrajectoryWaypoints: options.showTrajectoryWaypoints ?? true,
|
|
34
|
+
showTrajectoryLabels: options.showTrajectoryLabels ?? true,
|
|
35
|
+
});
|
|
36
|
+
return scene.trajectories.map(mapRenderTrajectoryToSpatial);
|
|
37
|
+
}
|
|
38
|
+
function mapRenderTrajectoryToSpatial(trajectory) {
|
|
39
|
+
return {
|
|
40
|
+
trajectoryId: trajectory.trajectoryId,
|
|
41
|
+
trajectory: trajectory.trajectory,
|
|
42
|
+
craftObjectId: trajectory.craftObjectId,
|
|
43
|
+
mode: trajectory.mode,
|
|
44
|
+
stroke: trajectory.stroke,
|
|
45
|
+
strokeWidth: trajectory.strokeWidth,
|
|
46
|
+
marker: trajectory.marker,
|
|
47
|
+
labelMode: trajectory.labelMode,
|
|
48
|
+
showWaypoints: trajectory.showWaypoints,
|
|
49
|
+
samples: samplePathPoints(trajectory.path).map((point) => ({
|
|
50
|
+
x: point.x,
|
|
51
|
+
y: 0,
|
|
52
|
+
z: point.y,
|
|
53
|
+
})),
|
|
54
|
+
waypoints: trajectory.waypoints.map((waypoint) => ({
|
|
55
|
+
trajectoryId: waypoint.trajectoryId,
|
|
56
|
+
segmentId: waypoint.segmentId,
|
|
57
|
+
maneuverId: waypoint.maneuverId,
|
|
58
|
+
objectId: waypoint.objectId,
|
|
59
|
+
position: {
|
|
60
|
+
x: waypoint.x,
|
|
61
|
+
y: 0,
|
|
62
|
+
z: waypoint.y,
|
|
63
|
+
},
|
|
64
|
+
label: waypoint.label,
|
|
65
|
+
dateLabel: waypoint.dateLabel,
|
|
66
|
+
hidden: waypoint.hidden,
|
|
67
|
+
})),
|
|
68
|
+
hidden: trajectory.hidden,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
function mapManeuver(segmentId, maneuver) {
|
|
72
|
+
return {
|
|
73
|
+
segmentId,
|
|
74
|
+
maneuverId: maneuver.id,
|
|
75
|
+
kind: maneuver.kind,
|
|
76
|
+
epoch: maneuver.epoch,
|
|
77
|
+
deltaV: maneuver.deltaV ?? null,
|
|
78
|
+
duration: maneuver.duration ?? null,
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function samplePathPoints(path) {
|
|
82
|
+
const matches = [...path.matchAll(/[MLQ]\s*(-?\d+(?:\.\d+)?)\s+(-?\d+(?:\.\d+)?)(?:\s+(-?\d+(?:\.\d+)?)\s+(-?\d+(?:\.\d+)?))?(?:\s+(-?\d+(?:\.\d+)?)\s+(-?\d+(?:\.\d+)?))?/g)];
|
|
83
|
+
if (matches.length === 0) {
|
|
84
|
+
return [];
|
|
85
|
+
}
|
|
86
|
+
const points = [];
|
|
87
|
+
for (const match of matches) {
|
|
88
|
+
const command = match[0][0];
|
|
89
|
+
if (command === "M" || command === "L") {
|
|
90
|
+
points.push({ x: Number(match[1]), y: Number(match[2]) });
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
if (command === "Q") {
|
|
94
|
+
points.push({ x: Number(match[1]), y: Number(match[2]) });
|
|
95
|
+
points.push({ x: Number(match[5]), y: Number(match[6]) });
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return points;
|
|
99
|
+
}
|
|
@@ -36,6 +36,7 @@ export function renderDocumentToSpatialScene(document, options = {}) {
|
|
|
36
36
|
const spatialObjects = scene.objects.map((entry) => createSpatialObject(entry, scene, sceneCenter, objectMap, orbitMap, scaleModel, positionCache, minimumMotionMetric));
|
|
37
37
|
const spatialObjectMap = new Map(spatialObjects.map((object) => [object.objectId, object]));
|
|
38
38
|
const spatialOrbits = scene.orbitVisuals.map((orbit) => createSpatialOrbit(orbit, spatialObjectMap, minimumMotionMetric, scene.activeEventId !== null));
|
|
39
|
+
const spatialTrajectories = scene.trajectories.map((trajectory) => createSpatialTrajectory(trajectory, spatialObjectMap));
|
|
39
40
|
const focusTargets = spatialObjects.map((object) => ({
|
|
40
41
|
objectId: object.objectId,
|
|
41
42
|
center: { ...object.position },
|
|
@@ -65,6 +66,7 @@ export function renderDocumentToSpatialScene(document, options = {}) {
|
|
|
65
66
|
timeFrozen: scene.activeEventId !== null,
|
|
66
67
|
objects: spatialObjects,
|
|
67
68
|
orbits: spatialOrbits,
|
|
69
|
+
trajectories: spatialTrajectories,
|
|
68
70
|
focusTargets,
|
|
69
71
|
};
|
|
70
72
|
}
|
|
@@ -117,6 +119,41 @@ function createSpatialOrbit(orbit, objectMap, minimumMotionMetric, frozen) {
|
|
|
117
119
|
createMotionModel(orbit.object, orbit, minimumMotionMetric, frozen),
|
|
118
120
|
};
|
|
119
121
|
}
|
|
122
|
+
function createSpatialTrajectory(trajectory, objectMap) {
|
|
123
|
+
const samples = samplePathPoints(trajectory.path).map((point) => ({
|
|
124
|
+
x: point.x,
|
|
125
|
+
y: 0,
|
|
126
|
+
z: point.y,
|
|
127
|
+
}));
|
|
128
|
+
return {
|
|
129
|
+
trajectoryId: trajectory.trajectoryId,
|
|
130
|
+
trajectory: trajectory.trajectory,
|
|
131
|
+
craftObjectId: trajectory.craftObjectId,
|
|
132
|
+
mode: trajectory.mode,
|
|
133
|
+
stroke: trajectory.stroke,
|
|
134
|
+
strokeWidth: trajectory.strokeWidth,
|
|
135
|
+
marker: trajectory.marker,
|
|
136
|
+
labelMode: trajectory.labelMode,
|
|
137
|
+
showWaypoints: trajectory.showWaypoints,
|
|
138
|
+
samples,
|
|
139
|
+
waypoints: trajectory.waypoints.map((waypoint) => {
|
|
140
|
+
const object = waypoint.objectId ? objectMap.get(waypoint.objectId) ?? null : null;
|
|
141
|
+
return {
|
|
142
|
+
trajectoryId: waypoint.trajectoryId,
|
|
143
|
+
segmentId: waypoint.segmentId,
|
|
144
|
+
maneuverId: waypoint.maneuverId,
|
|
145
|
+
objectId: waypoint.objectId,
|
|
146
|
+
position: object
|
|
147
|
+
? { ...object.position }
|
|
148
|
+
: { x: waypoint.x, y: 0, z: waypoint.y },
|
|
149
|
+
label: waypoint.label,
|
|
150
|
+
dateLabel: waypoint.dateLabel,
|
|
151
|
+
hidden: waypoint.hidden,
|
|
152
|
+
};
|
|
153
|
+
}),
|
|
154
|
+
hidden: trajectory.hidden,
|
|
155
|
+
};
|
|
156
|
+
}
|
|
120
157
|
function resolveSpatialObjectPosition(entry, scene, sceneCenter, objectMap, orbitMap, cache) {
|
|
121
158
|
const cached = cache.get(entry.objectId);
|
|
122
159
|
if (cached) {
|
|
@@ -419,3 +456,22 @@ function clampNumber(value, min, max) {
|
|
|
419
456
|
function degreesToRadians(value) {
|
|
420
457
|
return (value * Math.PI) / 180;
|
|
421
458
|
}
|
|
459
|
+
function samplePathPoints(path) {
|
|
460
|
+
const matches = [...path.matchAll(/[MLQ]\s*(-?\d+(?:\.\d+)?)\s+(-?\d+(?:\.\d+)?)(?:\s+(-?\d+(?:\.\d+)?)\s+(-?\d+(?:\.\d+)?))?(?:\s+(-?\d+(?:\.\d+)?)\s+(-?\d+(?:\.\d+)?))?/g)];
|
|
461
|
+
if (matches.length === 0) {
|
|
462
|
+
return [];
|
|
463
|
+
}
|
|
464
|
+
const points = [];
|
|
465
|
+
for (const match of matches) {
|
|
466
|
+
const command = match[0][0];
|
|
467
|
+
if (command === "M" || command === "L") {
|
|
468
|
+
points.push({ x: Number(match[1]), y: Number(match[2]) });
|
|
469
|
+
continue;
|
|
470
|
+
}
|
|
471
|
+
if (command === "Q") {
|
|
472
|
+
points.push({ x: Number(match[1]), y: Number(match[2]) });
|
|
473
|
+
points.push({ x: Number(match[5]), y: Number(match[6]) });
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
return points;
|
|
477
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export type WorldOrbitObjectType = "system" | "star" | "planet" | "moon" | "belt" | "asteroid" | "comet" | "ring" | "structure" | "phenomenon";
|
|
1
|
+
export type WorldOrbitObjectType = "system" | "star" | "planet" | "moon" | "belt" | "asteroid" | "comet" | "ring" | "craft" | "structure" | "phenomenon";
|
|
2
2
|
export type PlacementMode = "orbit" | "at" | "surface" | "free";
|
|
3
3
|
export type Unit = "au" | "km" | "m" | "ly" | "pc" | "kpc" | "re" | "rj" | "sol" | "me" | "mj" | "s" | "min" | "h" | "d" | "y" | "ky" | "my" | "gy" | "K" | "deg";
|
|
4
4
|
export type WorldOrbitDocumentVersion = "1.0";
|
|
5
|
-
export type WorldOrbitAtlasDocumentVersion = "2.0" | "2.1" | "2.5" | "2.6";
|
|
5
|
+
export type WorldOrbitAtlasDocumentVersion = "2.0" | "2.1" | "2.5" | "2.6" | "3.0" | "3.1";
|
|
6
6
|
export type WorldOrbitDraftDocumentVersion = "2.0-draft";
|
|
7
7
|
export type WorldOrbitAnyDocumentVersion = WorldOrbitDocumentVersion | WorldOrbitAtlasDocumentVersion | WorldOrbitDraftDocumentVersion;
|
|
8
8
|
export type ViewProjection = "topdown" | "isometric" | "orthographic" | "perspective";
|
|
@@ -86,6 +86,7 @@ export interface WorldOrbitDocument {
|
|
|
86
86
|
groups: WorldOrbitGroup[];
|
|
87
87
|
relations: WorldOrbitRelation[];
|
|
88
88
|
events: WorldOrbitEvent[];
|
|
89
|
+
trajectories: WorldOrbitTrajectory[];
|
|
89
90
|
objects: WorldOrbitObject[];
|
|
90
91
|
}
|
|
91
92
|
export interface WorldOrbitAtlasDocument {
|
|
@@ -98,6 +99,7 @@ export interface WorldOrbitAtlasDocument {
|
|
|
98
99
|
groups: WorldOrbitGroup[];
|
|
99
100
|
relations: WorldOrbitRelation[];
|
|
100
101
|
events: WorldOrbitEvent[];
|
|
102
|
+
trajectories: WorldOrbitTrajectory[];
|
|
101
103
|
objects: WorldOrbitObject[];
|
|
102
104
|
diagnostics: WorldOrbitDiagnostic[];
|
|
103
105
|
}
|
|
@@ -111,6 +113,7 @@ export interface WorldOrbitDraftDocument {
|
|
|
111
113
|
groups: WorldOrbitGroup[];
|
|
112
114
|
relations: WorldOrbitRelation[];
|
|
113
115
|
events: WorldOrbitEvent[];
|
|
116
|
+
trajectories: WorldOrbitTrajectory[];
|
|
114
117
|
objects: WorldOrbitObject[];
|
|
115
118
|
diagnostics: WorldOrbitDiagnostic[];
|
|
116
119
|
}
|
|
@@ -127,6 +130,7 @@ export interface WorldOrbitSystem {
|
|
|
127
130
|
export interface WorldOrbitObject {
|
|
128
131
|
type: Exclude<WorldOrbitObjectType, "system">;
|
|
129
132
|
id: string;
|
|
133
|
+
trajectoryId?: string | null;
|
|
130
134
|
groups?: string[];
|
|
131
135
|
epoch?: string | null;
|
|
132
136
|
referencePlane?: string | null;
|
|
@@ -167,6 +171,7 @@ export interface WorldOrbitEvent {
|
|
|
167
171
|
kind: string;
|
|
168
172
|
label: string;
|
|
169
173
|
summary: string | null;
|
|
174
|
+
trajectoryId?: string | null;
|
|
170
175
|
targetObjectId: string | null;
|
|
171
176
|
participantObjectIds: string[];
|
|
172
177
|
timing: string | null;
|
|
@@ -181,11 +186,71 @@ export interface WorldOrbitEvent {
|
|
|
181
186
|
export interface WorldOrbitEventPose {
|
|
182
187
|
objectId: string;
|
|
183
188
|
placement: Placement | null;
|
|
189
|
+
trajectorySegmentId?: string | null;
|
|
190
|
+
trajectoryManeuverId?: string | null;
|
|
184
191
|
inner?: UnitValue;
|
|
185
192
|
outer?: UnitValue;
|
|
186
193
|
epoch?: string | null;
|
|
187
194
|
referencePlane?: string | null;
|
|
188
195
|
}
|
|
196
|
+
export interface WorldOrbitTrajectory {
|
|
197
|
+
id: string;
|
|
198
|
+
label: string;
|
|
199
|
+
summary: string | null;
|
|
200
|
+
craftObjectId: string | null;
|
|
201
|
+
tags: string[];
|
|
202
|
+
color: string | null;
|
|
203
|
+
hidden: boolean;
|
|
204
|
+
renderMode?: TrajectoryRenderMode | null;
|
|
205
|
+
stroke?: string | null;
|
|
206
|
+
strokeWidth?: number | null;
|
|
207
|
+
marker?: string | null;
|
|
208
|
+
labelMode?: string | null;
|
|
209
|
+
showWaypoints?: boolean | null;
|
|
210
|
+
segments: WorldOrbitTrajectorySegment[];
|
|
211
|
+
}
|
|
212
|
+
export interface WorldOrbitTrajectorySegment {
|
|
213
|
+
id: string;
|
|
214
|
+
kind: WorldOrbitTrajectorySegmentKind;
|
|
215
|
+
label: string | null;
|
|
216
|
+
summary: string | null;
|
|
217
|
+
fromObjectId: string | null;
|
|
218
|
+
toObjectId: string | null;
|
|
219
|
+
aroundObjectId: string | null;
|
|
220
|
+
assist: WorldOrbitGravityAssist | null;
|
|
221
|
+
epoch: string | null;
|
|
222
|
+
periapsis?: UnitValue;
|
|
223
|
+
apoapsis?: UnitValue;
|
|
224
|
+
inclination?: UnitValue;
|
|
225
|
+
duration?: UnitValue;
|
|
226
|
+
deltaV?: UnitValue;
|
|
227
|
+
phaseAngle?: UnitValue;
|
|
228
|
+
turnAngle?: UnitValue;
|
|
229
|
+
energy?: UnitValue;
|
|
230
|
+
waypointLabel?: string | null;
|
|
231
|
+
waypointDate?: string | null;
|
|
232
|
+
renderHidden?: boolean | null;
|
|
233
|
+
sampleDensity?: number | null;
|
|
234
|
+
notes: string[];
|
|
235
|
+
maneuvers: WorldOrbitManeuver[];
|
|
236
|
+
}
|
|
237
|
+
export type TrajectoryRenderMode = "illustrative" | "solver" | "auto";
|
|
238
|
+
export type WorldOrbitTrajectorySegmentKind = "departure" | "transfer" | "flyby" | "capture" | "stationkeeping" | "escape";
|
|
239
|
+
export interface WorldOrbitManeuver {
|
|
240
|
+
id: string;
|
|
241
|
+
kind: string;
|
|
242
|
+
label: string | null;
|
|
243
|
+
epoch: string | null;
|
|
244
|
+
deltaV?: UnitValue;
|
|
245
|
+
duration?: UnitValue;
|
|
246
|
+
notes: string[];
|
|
247
|
+
}
|
|
248
|
+
export interface WorldOrbitGravityAssist {
|
|
249
|
+
objectId: string;
|
|
250
|
+
periapsis?: UnitValue;
|
|
251
|
+
turnAngle?: UnitValue;
|
|
252
|
+
notes: string[];
|
|
253
|
+
}
|
|
189
254
|
export interface WorldOrbitResonance {
|
|
190
255
|
targetObjectId: string;
|
|
191
256
|
ratio: string;
|
|
@@ -276,6 +341,9 @@ export interface SceneRenderOptions {
|
|
|
276
341
|
scaleModel?: Partial<RenderScaleModel>;
|
|
277
342
|
bodyScaleMode?: BodyScaleMode;
|
|
278
343
|
activeEventId?: string | null;
|
|
344
|
+
trajectoryMode?: TrajectoryRenderMode;
|
|
345
|
+
showTrajectoryWaypoints?: boolean;
|
|
346
|
+
showTrajectoryLabels?: boolean;
|
|
279
347
|
}
|
|
280
348
|
export interface SpatialScaleModel {
|
|
281
349
|
orbitDistanceMultiplier: number;
|
|
@@ -381,7 +449,35 @@ export interface RenderSceneEvent {
|
|
|
381
449
|
y: number;
|
|
382
450
|
hidden: boolean;
|
|
383
451
|
}
|
|
384
|
-
export
|
|
452
|
+
export interface RenderSceneTrajectoryWaypoint {
|
|
453
|
+
renderId: string;
|
|
454
|
+
trajectoryId: string;
|
|
455
|
+
segmentId: string | null;
|
|
456
|
+
maneuverId: string | null;
|
|
457
|
+
objectId: string | null;
|
|
458
|
+
x: number;
|
|
459
|
+
y: number;
|
|
460
|
+
label: string | null;
|
|
461
|
+
dateLabel: string | null;
|
|
462
|
+
hidden: boolean;
|
|
463
|
+
}
|
|
464
|
+
export interface RenderSceneTrajectory {
|
|
465
|
+
renderId: string;
|
|
466
|
+
trajectoryId: string;
|
|
467
|
+
trajectory: WorldOrbitTrajectory;
|
|
468
|
+
craftObjectId: string | null;
|
|
469
|
+
mode: TrajectoryRenderMode;
|
|
470
|
+
path: string;
|
|
471
|
+
stroke: string | null;
|
|
472
|
+
strokeWidth: number;
|
|
473
|
+
marker: string | null;
|
|
474
|
+
labelMode: string | null;
|
|
475
|
+
showWaypoints: boolean;
|
|
476
|
+
objectIds: string[];
|
|
477
|
+
waypoints: RenderSceneTrajectoryWaypoint[];
|
|
478
|
+
hidden: boolean;
|
|
479
|
+
}
|
|
480
|
+
export type SceneLayerId = "background" | "guides" | "orbits-back" | "orbits-front" | "trajectories" | "relations" | "events" | "objects" | "labels" | "metadata";
|
|
385
481
|
export interface RenderSceneViewpointFilter {
|
|
386
482
|
query: string | null;
|
|
387
483
|
objectTypes: Array<Exclude<WorldOrbitObjectType, "system">>;
|
|
@@ -500,6 +596,34 @@ export interface SpatialOrbit {
|
|
|
500
596
|
hidden: boolean;
|
|
501
597
|
motion: OrbitalMotionModel | null;
|
|
502
598
|
}
|
|
599
|
+
export interface SpatialTrajectorySample {
|
|
600
|
+
x: number;
|
|
601
|
+
y: number;
|
|
602
|
+
z: number;
|
|
603
|
+
}
|
|
604
|
+
export interface SpatialTrajectory {
|
|
605
|
+
trajectoryId: string;
|
|
606
|
+
trajectory: WorldOrbitTrajectory;
|
|
607
|
+
craftObjectId: string | null;
|
|
608
|
+
mode: TrajectoryRenderMode;
|
|
609
|
+
stroke: string | null;
|
|
610
|
+
strokeWidth: number;
|
|
611
|
+
marker: string | null;
|
|
612
|
+
labelMode: string | null;
|
|
613
|
+
showWaypoints: boolean;
|
|
614
|
+
samples: SpatialTrajectorySample[];
|
|
615
|
+
waypoints: Array<{
|
|
616
|
+
trajectoryId: string;
|
|
617
|
+
segmentId: string | null;
|
|
618
|
+
maneuverId: string | null;
|
|
619
|
+
objectId: string | null;
|
|
620
|
+
position: CoordinatePoint3D;
|
|
621
|
+
label: string | null;
|
|
622
|
+
dateLabel: string | null;
|
|
623
|
+
hidden: boolean;
|
|
624
|
+
}>;
|
|
625
|
+
hidden: boolean;
|
|
626
|
+
}
|
|
503
627
|
export interface SpatialFocusTarget {
|
|
504
628
|
objectId: string;
|
|
505
629
|
center: CoordinatePoint3D;
|
|
@@ -527,6 +651,7 @@ export interface RenderScene {
|
|
|
527
651
|
viewpoints: RenderSceneViewpoint[];
|
|
528
652
|
events: RenderSceneEvent[];
|
|
529
653
|
activeEventId: string | null;
|
|
654
|
+
trajectories: RenderSceneTrajectory[];
|
|
530
655
|
objects: RenderSceneObject[];
|
|
531
656
|
orbitVisuals: RenderOrbitVisual[];
|
|
532
657
|
relations: RenderSceneRelation[];
|
|
@@ -554,6 +679,7 @@ export interface SpatialScene {
|
|
|
554
679
|
timeFrozen: boolean;
|
|
555
680
|
objects: SpatialSceneObject[];
|
|
556
681
|
orbits: SpatialOrbit[];
|
|
682
|
+
trajectories: SpatialTrajectory[];
|
|
557
683
|
focusTargets: SpatialFocusTarget[];
|
|
558
684
|
}
|
|
559
685
|
export type SceneLayoutPreset = "compact" | "balanced" | "presentation";
|
|
@@ -632,7 +758,7 @@ export interface WorldOrbitAtlasSystem {
|
|
|
632
758
|
viewpoints: WorldOrbitAtlasViewpoint[];
|
|
633
759
|
annotations: WorldOrbitAtlasAnnotation[];
|
|
634
760
|
}
|
|
635
|
-
export type AtlasDocumentPathKind = "system" | "defaults" | "metadata" | "group" | "event" | "event-pose" | "object" | "viewpoint" | "annotation" | "relation";
|
|
761
|
+
export type AtlasDocumentPathKind = "system" | "defaults" | "metadata" | "group" | "event" | "event-pose" | "trajectory" | "trajectory-segment" | "trajectory-maneuver" | "object" | "viewpoint" | "annotation" | "relation";
|
|
636
762
|
export interface AtlasDocumentPath {
|
|
637
763
|
kind: AtlasDocumentPathKind;
|
|
638
764
|
id?: string;
|