space-data-module-sdk 0.6.0 → 0.7.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.
Files changed (70) hide show
  1. package/README.md +15 -2
  2. package/package.json +6 -2
  3. package/schemas/orbpro/BaseTypes.fbs +7 -0
  4. package/schemas/orbpro/CatalogQueryBase.fbs +8 -0
  5. package/schemas/orbpro/CatalogQueryRequest.fbs +14 -0
  6. package/schemas/orbpro/CatalogQueryResult.fbs +17 -0
  7. package/schemas/orbpro/EntityMetadata.fbs +53 -0
  8. package/schemas/orbpro/EntityStandardsLink.fbs +18 -0
  9. package/schemas/orbpro/Plugin.fbs +8 -0
  10. package/schemas/orbpro/Propagator.fbs +89 -0
  11. package/schemas/orbpro/StandardsRecordIndex.fbs +15 -0
  12. package/src/browser.js +1 -0
  13. package/src/generated/orbpro/entity/entity-kind.js +15 -0
  14. package/src/generated/orbpro/entity/entity-kind.ts +15 -0
  15. package/src/generated/orbpro/entity/entity-metadata.js +322 -0
  16. package/src/generated/orbpro/entity/entity-metadata.ts +426 -0
  17. package/src/generated/orbpro/entity/entity-standards-link.js +143 -0
  18. package/src/generated/orbpro/entity/entity-standards-link.ts +183 -0
  19. package/src/generated/orbpro/entity/standards-record-index.js +115 -0
  20. package/src/generated/orbpro/entity/standards-record-index.ts +147 -0
  21. package/src/generated/orbpro/entity.js +10 -0
  22. package/src/generated/orbpro/entity.ts +5 -0
  23. package/src/generated/orbpro/plugin/raw-data-payload.js +79 -0
  24. package/src/generated/orbpro/plugin/raw-data-payload.ts +92 -0
  25. package/src/generated/orbpro/plugin.js +4 -0
  26. package/src/generated/orbpro/plugin.ts +5 -0
  27. package/src/generated/orbpro/propagator/propagator-describe-sources-batch-request.js +79 -0
  28. package/src/generated/orbpro/propagator/propagator-describe-sources-batch-request.ts +95 -0
  29. package/src/generated/orbpro/propagator/propagator-describe-sources-batch-result.js +70 -0
  30. package/src/generated/orbpro/propagator/propagator-describe-sources-batch-result.ts +78 -0
  31. package/src/generated/orbpro/propagator/propagator-sample-trajectory-states-request.js +97 -0
  32. package/src/generated/orbpro/propagator/propagator-sample-trajectory-states-request.ts +117 -0
  33. package/src/generated/orbpro/propagator/propagator-sample-trajectory-states-result.js +140 -0
  34. package/src/generated/orbpro/propagator/propagator-sample-trajectory-states-result.ts +175 -0
  35. package/src/generated/orbpro/propagator/propagator-source-description.js +208 -0
  36. package/src/generated/orbpro/propagator/propagator-source-description.ts +257 -0
  37. package/src/generated/orbpro/propagator/propagator-source-kind.js +8 -0
  38. package/src/generated/orbpro/propagator/propagator-source-kind.ts +8 -0
  39. package/src/generated/orbpro/propagator/reference-frame.js +12 -0
  40. package/src/generated/orbpro/propagator/reference-frame.ts +12 -0
  41. package/src/generated/orbpro/propagator/state-flags.js +13 -0
  42. package/src/generated/orbpro/propagator/state-flags.ts +13 -0
  43. package/src/generated/orbpro/propagator/state-vector.js +55 -0
  44. package/src/generated/orbpro/propagator/state-vector.ts +61 -0
  45. package/src/generated/orbpro/propagator.js +20 -0
  46. package/src/generated/orbpro/propagator.ts +13 -0
  47. package/src/generated/orbpro/query/catalog-query-kind.js +10 -0
  48. package/src/generated/orbpro/query/catalog-query-kind.ts +10 -0
  49. package/src/generated/orbpro/query/catalog-query-request.js +89 -0
  50. package/src/generated/orbpro/query/catalog-query-request.ts +105 -0
  51. package/src/generated/orbpro/query/catalog-query-result.js +145 -0
  52. package/src/generated/orbpro/query/catalog-query-result.ts +179 -0
  53. package/src/generated/orbpro/query.js +8 -0
  54. package/src/generated/orbpro/query.ts +4 -0
  55. package/src/generated/orbpro/vec3.js +39 -0
  56. package/src/generated/orbpro/vec3.ts +40 -0
  57. package/src/host/abi.js +158 -0
  58. package/src/host/browserEdgeShims.js +17 -4
  59. package/src/host/browserHost.js +260 -48
  60. package/src/host/isomorphicLoader.js +3 -2
  61. package/src/host/nodeHost.js +168 -71
  62. package/src/index.d.ts +287 -3
  63. package/src/index.js +1 -0
  64. package/src/licensing/index.d.ts +20 -0
  65. package/src/licensing/index.js +11 -0
  66. package/src/licensing/records.js +858 -0
  67. package/src/runtime-host/index.js +34 -0
  68. package/src/testing/browserModuleHarness.js +16 -3
  69. package/src/testing/index.d.ts +1 -0
  70. package/src/testing/index.js +5 -4
package/README.md CHANGED
@@ -183,8 +183,16 @@ The current host/runtime contract is two-tiered:
183
183
 
184
184
  - raw guest `sdn_host` imports stay sync-only
185
185
  - generic async capabilities such as filesystem, network, IPFS, and protocol
186
- adapters are exposed through `NodeHost`, `BrowserHost`, and the browser/module
187
- harness APIs
186
+ adapters are exposed through `NodeHost`, `BrowserHost`,
187
+ `createRuntimeHost()` capability registries, and the browser/module harness
188
+ `callHost(...)` APIs
189
+
190
+ Hosts can wire those async capabilities either through the built-in reference
191
+ implementations or through explicit `capabilityAdapters` keyed by capability
192
+ id (`filesystem`, `network`, `ipfs`, `protocol_handle`, `protocol_dial`). That
193
+ generic async capability boundary is the canonical SDK contract for awaited
194
+ host services; keep it aligned across Node, browser, and runtime-host entry
195
+ points.
188
196
 
189
197
  ## Runtime Targets
190
198
 
@@ -589,6 +597,11 @@ machine-global Emscripten install. Treat `PATH` Emscripten as an explicit escape
589
597
  hatch, not the default. WasmEdge pthread builds still require a system
590
598
  Emscripten toolchain on `PATH`.
591
599
 
600
+ For `spacedatastandards.org` schemas, the required FlatBuffer libraries and
601
+ generated bindings must come from upstream SDS sources or published SDS
602
+ artifacts generated with `flatc-wasm`. Do not add repo-local shadow `.fbs`
603
+ families or hand-authored generated classes in this repo.
604
+
592
605
  If another repo needs the same compiler runtime, the package also exposes a
593
606
  shared emception session at `space-data-module-sdk/compiler/emception` with
594
607
  helpers for serialized command execution and virtual filesystem access.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "space-data-module-sdk",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Module SDK for building, validating, signing, and deploying WebAssembly modules on the Space Data Network.",
5
5
  "type": "module",
6
6
  "types": "./src/index.d.ts",
@@ -25,6 +25,10 @@
25
25
  "./compliance": "./src/compliance/index.js",
26
26
  "./auth": "./src/auth/index.js",
27
27
  "./transport": "./src/transport/index.js",
28
+ "./licensing": {
29
+ "types": "./src/licensing/index.d.ts",
30
+ "default": "./src/licensing/index.js"
31
+ },
28
32
  "./compiler": "./src/compiler/index.js",
29
33
  "./compiler/emception": "./src/compiler/emception.js",
30
34
  "./bundle": "./src/bundle/index.js",
@@ -68,7 +72,7 @@
68
72
  "flatsql": "^0.4.0",
69
73
  "hd-wallet-wasm": "1.6.0",
70
74
  "sdn-emception": "1.0.0",
71
- "spacedatastandards.org": "git+https://github.com/DigitalArsenal/spacedatastandards.org.git#09af351a1"
75
+ "spacedatastandards.org": "git+https://github.com/DigitalArsenal/spacedatastandards.org.git#c43c766bf4e8b18af125ed73b993e79c6ce20b24"
72
76
  },
73
77
  "devDependencies": {
74
78
  "express": "^4.21.2"
@@ -0,0 +1,7 @@
1
+ namespace orbpro;
2
+
3
+ struct Vec3 {
4
+ x:double;
5
+ y:double;
6
+ z:double;
7
+ }
@@ -0,0 +1,8 @@
1
+ namespace orbpro.query;
2
+
3
+ enum CatalogQueryKind : ubyte {
4
+ ROWS = 0,
5
+ ENTITY_INDICES = 1,
6
+ VISIBILITY_MASK = 2,
7
+ CATALOG_ROW = 3
8
+ }
@@ -0,0 +1,14 @@
1
+ include "CatalogQueryBase.fbs";
2
+
3
+ namespace orbpro.query;
4
+
5
+ table CatalogQueryRequest {
6
+ query_kind:CatalogQueryKind = ROWS;
7
+ query:string;
8
+ entity_index:uint = 0;
9
+ max_count:uint = 0;
10
+ entity_count:uint = 0;
11
+ }
12
+
13
+ root_type CatalogQueryRequest;
14
+ file_identifier "CQRQ";
@@ -0,0 +1,17 @@
1
+ include "CatalogQueryBase.fbs";
2
+ include "EntityMetadata.fbs";
3
+
4
+ namespace orbpro.query;
5
+
6
+ table CatalogQueryResult {
7
+ query_kind:CatalogQueryKind = ROWS;
8
+ rows:[orbpro.entity.EntityMetadata];
9
+ entity_indices:[uint];
10
+ mask:[ubyte];
11
+ visible_count:uint = 0;
12
+ entity_index:uint = 0;
13
+ row:orbpro.entity.EntityMetadata;
14
+ }
15
+
16
+ root_type CatalogQueryResult;
17
+ file_identifier "CQRS";
@@ -0,0 +1,53 @@
1
+ namespace orbpro.entity;
2
+
3
+ enum EntityKind : ubyte {
4
+ ENTITY = 0,
5
+ SPACE = 1,
6
+ GROUND = 2,
7
+ AIRCRAFT = 3,
8
+ MISSILE = 4,
9
+ SHIP = 5,
10
+ VEHICLE = 6,
11
+ SENSOR = 7,
12
+ OTHER = 255
13
+ }
14
+
15
+ table EntityMetadata {
16
+ entity_id:string (required, key);
17
+ name:string;
18
+ entity_kind:EntityKind = ENTITY;
19
+ subtype:string;
20
+ parent_entity_id:string;
21
+ primary_schema_file_id:string;
22
+ primary_row_id:double = 0.0;
23
+ wasm_handle:uint = 0;
24
+ position_region_id:uint = 0;
25
+ position_record_index:uint = 0;
26
+ velocity_region_id:uint = 0;
27
+ velocity_record_index:uint = 0;
28
+ visibility_region_id:uint = 0;
29
+ visibility_record_index:uint = 0;
30
+ norad_cat_id:uint = 0;
31
+ object_name:string;
32
+ object_id:string;
33
+ cat_object_name:string;
34
+ cat_object_id:string;
35
+ facility_type:string;
36
+ search_text:string;
37
+ owner:string;
38
+ status_code:string;
39
+ launch_date:string;
40
+ launch_year:string;
41
+ orbit_regime:string;
42
+ period:double = 0.0;
43
+ inclination:double = 0.0;
44
+ apogee:double = 0.0;
45
+ perigee:double = 0.0;
46
+ mean_motion:double = 0.0;
47
+ eccentricity:double = 0.0;
48
+ bstar:double = 0.0;
49
+ has_gp:bool = false;
50
+ }
51
+
52
+ root_type EntityMetadata;
53
+ file_identifier "ENTM";
@@ -0,0 +1,18 @@
1
+ namespace orbpro.entity;
2
+
3
+ table EntityStandardsLink {
4
+ link_key:string (required, key);
5
+ entity_id:string (required);
6
+ entity_record_key:string (required);
7
+ entity_schema_file_id:string (required);
8
+ entity_row_id:double = 0.0;
9
+ record_key:string (required);
10
+ schema_name:string (required);
11
+ record_schema_file_id:string (required);
12
+ record_row_id:double = 0.0;
13
+ cascade_delete:bool = true;
14
+ updated_at_ms:double = 0.0;
15
+ }
16
+
17
+ root_type EntityStandardsLink;
18
+ file_identifier "ESTL";
@@ -0,0 +1,8 @@
1
+ namespace orbpro.plugin;
2
+
3
+ table RawDataPayload {
4
+ type_id:string;
5
+ data:[ubyte];
6
+ }
7
+
8
+ root_type RawDataPayload;
@@ -0,0 +1,89 @@
1
+ include "BaseTypes.fbs";
2
+
3
+ namespace orbpro.propagator;
4
+
5
+ enum ReferenceFrame : ubyte {
6
+ TEME = 0,
7
+ J2000 = 1,
8
+ ICRF = 2,
9
+ ECEF = 3,
10
+ MCI = 4,
11
+ MCMF = 5
12
+ }
13
+
14
+ enum StateFlags : uint {
15
+ NONE = 0,
16
+ VALID = 1,
17
+ IN_ECLIPSE = 2,
18
+ DECAYED = 4,
19
+ MANEUVERING = 8,
20
+ EXTRAPOLATED = 16,
21
+ HAS_COVARIANCE = 32
22
+ }
23
+
24
+ enum PropagatorSourceKind : ubyte {
25
+ UNKNOWN = 0,
26
+ SGP4 = 1
27
+ }
28
+
29
+ struct StateVector {
30
+ epoch:double;
31
+ position:orbpro.Vec3;
32
+ velocity:orbpro.Vec3;
33
+ reference_frame:ReferenceFrame;
34
+ flags:uint;
35
+ }
36
+
37
+ table PropagatorDescribeSourcesBatchRequest {
38
+ catalogHandle:uint = 0;
39
+ sourceHandles:[uint];
40
+ }
41
+
42
+ table PropagatorSourceDescription {
43
+ sourceHandle:uint = 0;
44
+ sourceKind:PropagatorSourceKind = UNKNOWN;
45
+ objectName:string;
46
+ objectId:string;
47
+ noradCatId:uint = 0;
48
+ epochJd:double = 0.0;
49
+ meanMotionRevPerDay:double = 0.0;
50
+ eccentricity:double = 0.0;
51
+ inclinationDeg:double = 0.0;
52
+ raOfAscNodeDeg:double = 0.0;
53
+ argOfPericenterDeg:double = 0.0;
54
+ meanAnomalyDeg:double = 0.0;
55
+ ephemerisType:int = 0;
56
+ classificationType:string;
57
+ elementSetNo:uint = 0;
58
+ revAtEpoch:uint = 0;
59
+ bstar:double = 0.0;
60
+ meanMotionDotRevPerDay2:double = 0.0;
61
+ meanMotionDdotRevPerDay3:double = 0.0;
62
+ perigeeKm:double = 0.0;
63
+ apogeeKm:double = 0.0;
64
+ }
65
+
66
+ table PropagatorDescribeSourcesBatchResult {
67
+ catalogHandle:uint = 0;
68
+ sources:[PropagatorSourceDescription];
69
+ }
70
+
71
+ table PropagatorSampleTrajectoryStatesRequest {
72
+ catalogHandle:uint = 0;
73
+ sourceHandles:[uint];
74
+ startJd:double = 0.0;
75
+ durationDays:double = 0.0;
76
+ profile:string;
77
+ }
78
+
79
+ table PropagatorSampleTrajectoryStatesResult {
80
+ catalogHandle:uint = 0;
81
+ startJd:double = 0.0;
82
+ durationDays:double = 0.0;
83
+ sampleJds:[double];
84
+ sourceHandles:[uint];
85
+ referenceFrame:ReferenceFrame = TEME;
86
+ states:[StateVector];
87
+ }
88
+
89
+ root_type PropagatorDescribeSourcesBatchRequest;
@@ -0,0 +1,15 @@
1
+ namespace orbpro.entity;
2
+
3
+ table StandardsRecordIndex {
4
+ record_key:string (required, key);
5
+ schema_name:string (required);
6
+ schema_file_id:string (required);
7
+ row_id:double = 0.0;
8
+ role:string;
9
+ attached_via:string;
10
+ payload_kind:string;
11
+ updated_at_ms:double = 0.0;
12
+ }
13
+
14
+ root_type StandardsRecordIndex;
15
+ file_identifier "STRI";
package/src/browser.js CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from "./manifest/browser.js";
2
2
  export * from "./auth/index.js";
3
3
  export * from "./transport/index.js";
4
+ export * from "./licensing/index.js";
4
5
  export * from "./bundle/index.js";
5
6
  export * from "./capabilities.js";
6
7
  export * from "./deployment/index.js";
@@ -0,0 +1,15 @@
1
+ var EntityKind = /* @__PURE__ */ ((EntityKind2) => {
2
+ EntityKind2[EntityKind2["ENTITY"] = 0] = "ENTITY";
3
+ EntityKind2[EntityKind2["SPACE"] = 1] = "SPACE";
4
+ EntityKind2[EntityKind2["GROUND"] = 2] = "GROUND";
5
+ EntityKind2[EntityKind2["AIRCRAFT"] = 3] = "AIRCRAFT";
6
+ EntityKind2[EntityKind2["MISSILE"] = 4] = "MISSILE";
7
+ EntityKind2[EntityKind2["SHIP"] = 5] = "SHIP";
8
+ EntityKind2[EntityKind2["VEHICLE"] = 6] = "VEHICLE";
9
+ EntityKind2[EntityKind2["SENSOR"] = 7] = "SENSOR";
10
+ EntityKind2[EntityKind2["OTHER"] = 255] = "OTHER";
11
+ return EntityKind2;
12
+ })(EntityKind || {});
13
+ export {
14
+ EntityKind
15
+ };
@@ -0,0 +1,15 @@
1
+ // automatically generated by the FlatBuffers compiler, do not modify
2
+
3
+ /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
4
+
5
+ export enum EntityKind {
6
+ ENTITY = 0,
7
+ SPACE = 1,
8
+ GROUND = 2,
9
+ AIRCRAFT = 3,
10
+ MISSILE = 4,
11
+ SHIP = 5,
12
+ VEHICLE = 6,
13
+ SENSOR = 7,
14
+ OTHER = 255
15
+ }
@@ -0,0 +1,322 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => {
4
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
+ return value;
6
+ };
7
+ import * as flatbuffers from "flatbuffers";
8
+ import { EntityKind } from "../../orbpro/entity/entity-kind.js";
9
+ class EntityMetadata {
10
+ constructor() {
11
+ __publicField(this, "bb", null);
12
+ __publicField(this, "bb_pos", 0);
13
+ }
14
+ __init(i, bb) {
15
+ this.bb_pos = i;
16
+ this.bb = bb;
17
+ return this;
18
+ }
19
+ static getRootAsEntityMetadata(bb, obj) {
20
+ return (obj || new EntityMetadata()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
21
+ }
22
+ static getSizePrefixedRootAsEntityMetadata(bb, obj) {
23
+ bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
24
+ return (obj || new EntityMetadata()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
25
+ }
26
+ static bufferHasIdentifier(bb) {
27
+ return bb.__has_identifier("ENTM");
28
+ }
29
+ entityId(optionalEncoding) {
30
+ const offset = this.bb.__offset(this.bb_pos, 4);
31
+ return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
32
+ }
33
+ name(optionalEncoding) {
34
+ const offset = this.bb.__offset(this.bb_pos, 6);
35
+ return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
36
+ }
37
+ entityKind() {
38
+ const offset = this.bb.__offset(this.bb_pos, 8);
39
+ return offset ? this.bb.readUint8(this.bb_pos + offset) : EntityKind.ENTITY;
40
+ }
41
+ subtype(optionalEncoding) {
42
+ const offset = this.bb.__offset(this.bb_pos, 10);
43
+ return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
44
+ }
45
+ parentEntityId(optionalEncoding) {
46
+ const offset = this.bb.__offset(this.bb_pos, 12);
47
+ return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
48
+ }
49
+ primarySchemaFileId(optionalEncoding) {
50
+ const offset = this.bb.__offset(this.bb_pos, 14);
51
+ return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
52
+ }
53
+ primaryRowId() {
54
+ const offset = this.bb.__offset(this.bb_pos, 16);
55
+ return offset ? this.bb.readFloat64(this.bb_pos + offset) : 0;
56
+ }
57
+ wasmHandle() {
58
+ const offset = this.bb.__offset(this.bb_pos, 18);
59
+ return offset ? this.bb.readUint32(this.bb_pos + offset) : 0;
60
+ }
61
+ positionRegionId() {
62
+ const offset = this.bb.__offset(this.bb_pos, 20);
63
+ return offset ? this.bb.readUint32(this.bb_pos + offset) : 0;
64
+ }
65
+ positionRecordIndex() {
66
+ const offset = this.bb.__offset(this.bb_pos, 22);
67
+ return offset ? this.bb.readUint32(this.bb_pos + offset) : 0;
68
+ }
69
+ velocityRegionId() {
70
+ const offset = this.bb.__offset(this.bb_pos, 24);
71
+ return offset ? this.bb.readUint32(this.bb_pos + offset) : 0;
72
+ }
73
+ velocityRecordIndex() {
74
+ const offset = this.bb.__offset(this.bb_pos, 26);
75
+ return offset ? this.bb.readUint32(this.bb_pos + offset) : 0;
76
+ }
77
+ visibilityRegionId() {
78
+ const offset = this.bb.__offset(this.bb_pos, 28);
79
+ return offset ? this.bb.readUint32(this.bb_pos + offset) : 0;
80
+ }
81
+ visibilityRecordIndex() {
82
+ const offset = this.bb.__offset(this.bb_pos, 30);
83
+ return offset ? this.bb.readUint32(this.bb_pos + offset) : 0;
84
+ }
85
+ noradCatId() {
86
+ const offset = this.bb.__offset(this.bb_pos, 32);
87
+ return offset ? this.bb.readUint32(this.bb_pos + offset) : 0;
88
+ }
89
+ objectName(optionalEncoding) {
90
+ const offset = this.bb.__offset(this.bb_pos, 34);
91
+ return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
92
+ }
93
+ objectId(optionalEncoding) {
94
+ const offset = this.bb.__offset(this.bb_pos, 36);
95
+ return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
96
+ }
97
+ catObjectName(optionalEncoding) {
98
+ const offset = this.bb.__offset(this.bb_pos, 38);
99
+ return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
100
+ }
101
+ catObjectId(optionalEncoding) {
102
+ const offset = this.bb.__offset(this.bb_pos, 40);
103
+ return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
104
+ }
105
+ facilityType(optionalEncoding) {
106
+ const offset = this.bb.__offset(this.bb_pos, 42);
107
+ return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
108
+ }
109
+ searchText(optionalEncoding) {
110
+ const offset = this.bb.__offset(this.bb_pos, 44);
111
+ return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
112
+ }
113
+ owner(optionalEncoding) {
114
+ const offset = this.bb.__offset(this.bb_pos, 46);
115
+ return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
116
+ }
117
+ statusCode(optionalEncoding) {
118
+ const offset = this.bb.__offset(this.bb_pos, 48);
119
+ return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
120
+ }
121
+ launchDate(optionalEncoding) {
122
+ const offset = this.bb.__offset(this.bb_pos, 50);
123
+ return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
124
+ }
125
+ launchYear(optionalEncoding) {
126
+ const offset = this.bb.__offset(this.bb_pos, 52);
127
+ return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
128
+ }
129
+ orbitRegime(optionalEncoding) {
130
+ const offset = this.bb.__offset(this.bb_pos, 54);
131
+ return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
132
+ }
133
+ period() {
134
+ const offset = this.bb.__offset(this.bb_pos, 56);
135
+ return offset ? this.bb.readFloat64(this.bb_pos + offset) : 0;
136
+ }
137
+ inclination() {
138
+ const offset = this.bb.__offset(this.bb_pos, 58);
139
+ return offset ? this.bb.readFloat64(this.bb_pos + offset) : 0;
140
+ }
141
+ apogee() {
142
+ const offset = this.bb.__offset(this.bb_pos, 60);
143
+ return offset ? this.bb.readFloat64(this.bb_pos + offset) : 0;
144
+ }
145
+ perigee() {
146
+ const offset = this.bb.__offset(this.bb_pos, 62);
147
+ return offset ? this.bb.readFloat64(this.bb_pos + offset) : 0;
148
+ }
149
+ meanMotion() {
150
+ const offset = this.bb.__offset(this.bb_pos, 64);
151
+ return offset ? this.bb.readFloat64(this.bb_pos + offset) : 0;
152
+ }
153
+ eccentricity() {
154
+ const offset = this.bb.__offset(this.bb_pos, 66);
155
+ return offset ? this.bb.readFloat64(this.bb_pos + offset) : 0;
156
+ }
157
+ bstar() {
158
+ const offset = this.bb.__offset(this.bb_pos, 68);
159
+ return offset ? this.bb.readFloat64(this.bb_pos + offset) : 0;
160
+ }
161
+ hasGp() {
162
+ const offset = this.bb.__offset(this.bb_pos, 70);
163
+ return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;
164
+ }
165
+ static startEntityMetadata(builder) {
166
+ builder.startObject(34);
167
+ }
168
+ static addEntityId(builder, entityIdOffset) {
169
+ builder.addFieldOffset(0, entityIdOffset, 0);
170
+ }
171
+ static addName(builder, nameOffset) {
172
+ builder.addFieldOffset(1, nameOffset, 0);
173
+ }
174
+ static addEntityKind(builder, entityKind) {
175
+ builder.addFieldInt8(2, entityKind, EntityKind.ENTITY);
176
+ }
177
+ static addSubtype(builder, subtypeOffset) {
178
+ builder.addFieldOffset(3, subtypeOffset, 0);
179
+ }
180
+ static addParentEntityId(builder, parentEntityIdOffset) {
181
+ builder.addFieldOffset(4, parentEntityIdOffset, 0);
182
+ }
183
+ static addPrimarySchemaFileId(builder, primarySchemaFileIdOffset) {
184
+ builder.addFieldOffset(5, primarySchemaFileIdOffset, 0);
185
+ }
186
+ static addPrimaryRowId(builder, primaryRowId) {
187
+ builder.addFieldFloat64(6, primaryRowId, 0);
188
+ }
189
+ static addWasmHandle(builder, wasmHandle) {
190
+ builder.addFieldInt32(7, wasmHandle, 0);
191
+ }
192
+ static addPositionRegionId(builder, positionRegionId) {
193
+ builder.addFieldInt32(8, positionRegionId, 0);
194
+ }
195
+ static addPositionRecordIndex(builder, positionRecordIndex) {
196
+ builder.addFieldInt32(9, positionRecordIndex, 0);
197
+ }
198
+ static addVelocityRegionId(builder, velocityRegionId) {
199
+ builder.addFieldInt32(10, velocityRegionId, 0);
200
+ }
201
+ static addVelocityRecordIndex(builder, velocityRecordIndex) {
202
+ builder.addFieldInt32(11, velocityRecordIndex, 0);
203
+ }
204
+ static addVisibilityRegionId(builder, visibilityRegionId) {
205
+ builder.addFieldInt32(12, visibilityRegionId, 0);
206
+ }
207
+ static addVisibilityRecordIndex(builder, visibilityRecordIndex) {
208
+ builder.addFieldInt32(13, visibilityRecordIndex, 0);
209
+ }
210
+ static addNoradCatId(builder, noradCatId) {
211
+ builder.addFieldInt32(14, noradCatId, 0);
212
+ }
213
+ static addObjectName(builder, objectNameOffset) {
214
+ builder.addFieldOffset(15, objectNameOffset, 0);
215
+ }
216
+ static addObjectId(builder, objectIdOffset) {
217
+ builder.addFieldOffset(16, objectIdOffset, 0);
218
+ }
219
+ static addCatObjectName(builder, catObjectNameOffset) {
220
+ builder.addFieldOffset(17, catObjectNameOffset, 0);
221
+ }
222
+ static addCatObjectId(builder, catObjectIdOffset) {
223
+ builder.addFieldOffset(18, catObjectIdOffset, 0);
224
+ }
225
+ static addFacilityType(builder, facilityTypeOffset) {
226
+ builder.addFieldOffset(19, facilityTypeOffset, 0);
227
+ }
228
+ static addSearchText(builder, searchTextOffset) {
229
+ builder.addFieldOffset(20, searchTextOffset, 0);
230
+ }
231
+ static addOwner(builder, ownerOffset) {
232
+ builder.addFieldOffset(21, ownerOffset, 0);
233
+ }
234
+ static addStatusCode(builder, statusCodeOffset) {
235
+ builder.addFieldOffset(22, statusCodeOffset, 0);
236
+ }
237
+ static addLaunchDate(builder, launchDateOffset) {
238
+ builder.addFieldOffset(23, launchDateOffset, 0);
239
+ }
240
+ static addLaunchYear(builder, launchYearOffset) {
241
+ builder.addFieldOffset(24, launchYearOffset, 0);
242
+ }
243
+ static addOrbitRegime(builder, orbitRegimeOffset) {
244
+ builder.addFieldOffset(25, orbitRegimeOffset, 0);
245
+ }
246
+ static addPeriod(builder, period) {
247
+ builder.addFieldFloat64(26, period, 0);
248
+ }
249
+ static addInclination(builder, inclination) {
250
+ builder.addFieldFloat64(27, inclination, 0);
251
+ }
252
+ static addApogee(builder, apogee) {
253
+ builder.addFieldFloat64(28, apogee, 0);
254
+ }
255
+ static addPerigee(builder, perigee) {
256
+ builder.addFieldFloat64(29, perigee, 0);
257
+ }
258
+ static addMeanMotion(builder, meanMotion) {
259
+ builder.addFieldFloat64(30, meanMotion, 0);
260
+ }
261
+ static addEccentricity(builder, eccentricity) {
262
+ builder.addFieldFloat64(31, eccentricity, 0);
263
+ }
264
+ static addBstar(builder, bstar) {
265
+ builder.addFieldFloat64(32, bstar, 0);
266
+ }
267
+ static addHasGp(builder, hasGp) {
268
+ builder.addFieldInt8(33, +hasGp, 0);
269
+ }
270
+ static endEntityMetadata(builder) {
271
+ const offset = builder.endObject();
272
+ builder.requiredField(offset, 4);
273
+ return offset;
274
+ }
275
+ static finishEntityMetadataBuffer(builder, offset) {
276
+ builder.finish(offset, "ENTM");
277
+ }
278
+ static finishSizePrefixedEntityMetadataBuffer(builder, offset) {
279
+ builder.finish(offset, "ENTM", true);
280
+ }
281
+ static createEntityMetadata(builder, entityIdOffset, nameOffset, entityKind, subtypeOffset, parentEntityIdOffset, primarySchemaFileIdOffset, primaryRowId, wasmHandle, positionRegionId, positionRecordIndex, velocityRegionId, velocityRecordIndex, visibilityRegionId, visibilityRecordIndex, noradCatId, objectNameOffset, objectIdOffset, catObjectNameOffset, catObjectIdOffset, facilityTypeOffset, searchTextOffset, ownerOffset, statusCodeOffset, launchDateOffset, launchYearOffset, orbitRegimeOffset, period, inclination, apogee, perigee, meanMotion, eccentricity, bstar, hasGp) {
282
+ EntityMetadata.startEntityMetadata(builder);
283
+ EntityMetadata.addEntityId(builder, entityIdOffset);
284
+ EntityMetadata.addName(builder, nameOffset);
285
+ EntityMetadata.addEntityKind(builder, entityKind);
286
+ EntityMetadata.addSubtype(builder, subtypeOffset);
287
+ EntityMetadata.addParentEntityId(builder, parentEntityIdOffset);
288
+ EntityMetadata.addPrimarySchemaFileId(builder, primarySchemaFileIdOffset);
289
+ EntityMetadata.addPrimaryRowId(builder, primaryRowId);
290
+ EntityMetadata.addWasmHandle(builder, wasmHandle);
291
+ EntityMetadata.addPositionRegionId(builder, positionRegionId);
292
+ EntityMetadata.addPositionRecordIndex(builder, positionRecordIndex);
293
+ EntityMetadata.addVelocityRegionId(builder, velocityRegionId);
294
+ EntityMetadata.addVelocityRecordIndex(builder, velocityRecordIndex);
295
+ EntityMetadata.addVisibilityRegionId(builder, visibilityRegionId);
296
+ EntityMetadata.addVisibilityRecordIndex(builder, visibilityRecordIndex);
297
+ EntityMetadata.addNoradCatId(builder, noradCatId);
298
+ EntityMetadata.addObjectName(builder, objectNameOffset);
299
+ EntityMetadata.addObjectId(builder, objectIdOffset);
300
+ EntityMetadata.addCatObjectName(builder, catObjectNameOffset);
301
+ EntityMetadata.addCatObjectId(builder, catObjectIdOffset);
302
+ EntityMetadata.addFacilityType(builder, facilityTypeOffset);
303
+ EntityMetadata.addSearchText(builder, searchTextOffset);
304
+ EntityMetadata.addOwner(builder, ownerOffset);
305
+ EntityMetadata.addStatusCode(builder, statusCodeOffset);
306
+ EntityMetadata.addLaunchDate(builder, launchDateOffset);
307
+ EntityMetadata.addLaunchYear(builder, launchYearOffset);
308
+ EntityMetadata.addOrbitRegime(builder, orbitRegimeOffset);
309
+ EntityMetadata.addPeriod(builder, period);
310
+ EntityMetadata.addInclination(builder, inclination);
311
+ EntityMetadata.addApogee(builder, apogee);
312
+ EntityMetadata.addPerigee(builder, perigee);
313
+ EntityMetadata.addMeanMotion(builder, meanMotion);
314
+ EntityMetadata.addEccentricity(builder, eccentricity);
315
+ EntityMetadata.addBstar(builder, bstar);
316
+ EntityMetadata.addHasGp(builder, hasGp);
317
+ return EntityMetadata.endEntityMetadata(builder);
318
+ }
319
+ }
320
+ export {
321
+ EntityMetadata
322
+ };