@neilberkman/sidereon 3.0.0 → 3.0.2

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/pkg/sidereon.js CHANGED
@@ -4052,6 +4052,9 @@ export class Constellation {
4052
4052
  const ptr0 = passArray64ToWasm0(epochs_unix_us, wasm.__wbindgen_malloc);
4053
4053
  const len0 = WASM_VECTOR_LEN;
4054
4054
  const ret = wasm.constellation_groundTracks(this.__wbg_ptr, ptr0, len0);
4055
+ if (ret[3]) {
4056
+ throw takeFromExternrefTable0(ret[2]);
4057
+ }
4055
4058
  var v2 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
4056
4059
  wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
4057
4060
  return v2;
@@ -4089,6 +4092,9 @@ export class Constellation {
4089
4092
  const ptr0 = passArray64ToWasm0(epochs_unix_us, wasm.__wbindgen_malloc);
4090
4093
  const len0 = WASM_VECTOR_LEN;
4091
4094
  const ret = wasm.constellation_lookAngleArcs(this.__wbg_ptr, station.__wbg_ptr, ptr0, len0);
4095
+ if (ret[3]) {
4096
+ throw takeFromExternrefTable0(ret[2]);
4097
+ }
4092
4098
  var v2 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
4093
4099
  wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
4094
4100
  return v2;
@@ -9243,7 +9249,10 @@ export class Instant {
9243
9249
  */
9244
9250
  get deltaTSeconds() {
9245
9251
  const ret = wasm.instant_deltaTSeconds(this.__wbg_ptr);
9246
- return ret;
9252
+ if (ret[2]) {
9253
+ throw takeFromExternrefTable0(ret[1]);
9254
+ }
9255
+ return ret[0];
9247
9256
  }
9248
9257
  /**
9249
9258
  * Build an instant from a unix-microsecond UTC stamp.
@@ -9332,7 +9341,10 @@ export class Instant {
9332
9341
  */
9333
9342
  get jdWhole() {
9334
9343
  const ret = wasm.instant_jdWhole(this.__wbg_ptr);
9335
- return ret;
9344
+ if (ret[2]) {
9345
+ throw takeFromExternrefTable0(ret[1]);
9346
+ }
9347
+ return ret[0];
9336
9348
  }
9337
9349
  /**
9338
9350
  * IAU mean obliquity of the ecliptic, radians.
@@ -9393,7 +9405,10 @@ export class Instant {
9393
9405
  */
9394
9406
  get tdbFraction() {
9395
9407
  const ret = wasm.instant_tdbFraction(this.__wbg_ptr);
9396
- return ret;
9408
+ if (ret[2]) {
9409
+ throw takeFromExternrefTable0(ret[1]);
9410
+ }
9411
+ return ret[0];
9397
9412
  }
9398
9413
  /**
9399
9414
  * Full Barycentric Dynamical Time (TDB) Julian date.
@@ -9401,7 +9416,10 @@ export class Instant {
9401
9416
  */
9402
9417
  get tdbJd() {
9403
9418
  const ret = wasm.instant_tdbJd(this.__wbg_ptr);
9404
- return ret;
9419
+ if (ret[2]) {
9420
+ throw takeFromExternrefTable0(ret[1]);
9421
+ }
9422
+ return ret[0];
9405
9423
  }
9406
9424
  /**
9407
9425
  * The two-part TDB Julian date (`jdWhole`, `tdbFraction`).
@@ -9409,7 +9427,10 @@ export class Instant {
9409
9427
  */
9410
9428
  get tdbJdSplit() {
9411
9429
  const ret = wasm.instant_tdbJdSplit(this.__wbg_ptr);
9412
- return JulianDate.__wrap(ret);
9430
+ if (ret[2]) {
9431
+ throw takeFromExternrefTable0(ret[1]);
9432
+ }
9433
+ return JulianDate.__wrap(ret[0]);
9413
9434
  }
9414
9435
  /**
9415
9436
  * TT day fraction relative to `jdWhole`.
@@ -9417,7 +9438,10 @@ export class Instant {
9417
9438
  */
9418
9439
  get ttFraction() {
9419
9440
  const ret = wasm.instant_ttFraction(this.__wbg_ptr);
9420
- return ret;
9441
+ if (ret[2]) {
9442
+ throw takeFromExternrefTable0(ret[1]);
9443
+ }
9444
+ return ret[0];
9421
9445
  }
9422
9446
  /**
9423
9447
  * Full Terrestrial Time (TT) Julian date.
@@ -9425,7 +9449,10 @@ export class Instant {
9425
9449
  */
9426
9450
  get ttJd() {
9427
9451
  const ret = wasm.instant_ttJd(this.__wbg_ptr);
9428
- return ret;
9452
+ if (ret[2]) {
9453
+ throw takeFromExternrefTable0(ret[1]);
9454
+ }
9455
+ return ret[0];
9429
9456
  }
9430
9457
  /**
9431
9458
  * The two-part TT Julian date (`jdWhole`, `ttFraction`).
@@ -9433,7 +9460,10 @@ export class Instant {
9433
9460
  */
9434
9461
  get ttJdSplit() {
9435
9462
  const ret = wasm.instant_ttJdSplit(this.__wbg_ptr);
9436
- return JulianDate.__wrap(ret);
9463
+ if (ret[2]) {
9464
+ throw takeFromExternrefTable0(ret[1]);
9465
+ }
9466
+ return JulianDate.__wrap(ret[0]);
9437
9467
  }
9438
9468
  /**
9439
9469
  * The unix-microsecond UTC stamp backing this instant.
@@ -9451,6 +9481,9 @@ export class Instant {
9451
9481
  */
9452
9482
  get ut1Degraded() {
9453
9483
  const ret = wasm.instant_ut1Degraded(this.__wbg_ptr);
9484
+ if (ret[3]) {
9485
+ throw takeFromExternrefTable0(ret[2]);
9486
+ }
9454
9487
  let v1;
9455
9488
  if (ret[0] !== 0) {
9456
9489
  v1 = getStringFromWasm0(ret[0], ret[1]).slice();
@@ -9464,7 +9497,10 @@ export class Instant {
9464
9497
  */
9465
9498
  get ut1Fraction() {
9466
9499
  const ret = wasm.instant_ut1Fraction(this.__wbg_ptr);
9467
- return ret;
9500
+ if (ret[2]) {
9501
+ throw takeFromExternrefTable0(ret[1]);
9502
+ }
9503
+ return ret[0];
9468
9504
  }
9469
9505
  /**
9470
9506
  * Full UT1 Julian date.
@@ -9472,7 +9508,10 @@ export class Instant {
9472
9508
  */
9473
9509
  get ut1Jd() {
9474
9510
  const ret = wasm.instant_ut1Jd(this.__wbg_ptr);
9475
- return ret;
9511
+ if (ret[2]) {
9512
+ throw takeFromExternrefTable0(ret[1]);
9513
+ }
9514
+ return ret[0];
9476
9515
  }
9477
9516
  /**
9478
9517
  * The two-part UT1 Julian date (`jdWhole`, `ut1Fraction`).
@@ -9480,7 +9519,10 @@ export class Instant {
9480
9519
  */
9481
9520
  get ut1JdSplit() {
9482
9521
  const ret = wasm.instant_ut1JdSplit(this.__wbg_ptr);
9483
- return JulianDate.__wrap(ret);
9522
+ if (ret[2]) {
9523
+ throw takeFromExternrefTable0(ret[1]);
9524
+ }
9525
+ return JulianDate.__wrap(ret[0]);
9484
9526
  }
9485
9527
  }
9486
9528
  if (Symbol.dispose) Instant.prototype[Symbol.dispose] = Instant.prototype.free;
Binary file