gps_pvt 0.6.1 → 0.6.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.
@@ -302,6 +302,10 @@ struct GPS_Ephemeris : public GPS_SpaceNode<FloatT>::SatelliteProperties::Epheme
302
302
  GPS_Ephemeris(const typename GPS_SpaceNode<FloatT>::SatelliteProperties::Ephemeris &eph)
303
303
  : GPS_SpaceNode<FloatT>::SatelliteProperties::Ephemeris(eph),
304
304
  iode_subframe3(eph.iode) {}
305
+ struct constellation_res_t {
306
+ System_XYZ<FloatT, WGS84> position, velocity;
307
+ FloatT clock_error, clock_error_dot;
308
+ };
305
309
  };
306
310
  %}
307
311
  %extend GPS_Ephemeris {
@@ -389,20 +393,21 @@ struct GPS_Ephemeris : public GPS_SpaceNode<FloatT>::SatelliteProperties::Epheme
389
393
  break;
390
394
  }
391
395
  }
392
- %typemap(in,numinputs=0) System_XYZ<FloatT, WGS84> & (System_XYZ<FloatT, WGS84> temp) %{
393
- $1 = &temp;
394
- %}
395
- %typemap(argout) System_XYZ<FloatT, WGS84> & {
396
- %append_output(SWIG_NewPointerObj((new $*1_ltype(*$1)), $1_descriptor, SWIG_POINTER_OWN));
397
- }
398
- void constellation(
399
- System_XYZ<FloatT, WGS84> &position, System_XYZ<FloatT, WGS84> &velocity,
400
- const GPS_Time<FloatT> &t, const FloatT &pseudo_range = 0,
401
- const bool &with_velocity = true) const {
402
- typename GPS_SpaceNode<FloatT>::SatelliteProperties::constellation_t res(
403
- self->constellation(t, pseudo_range, with_velocity));
404
- position = res.position;
405
- velocity = res.velocity;
396
+ %typemap(out) constellation_res_t {
397
+ %append_output(SWIG_NewPointerObj((new System_XYZ<FloatT, WGS84>($1.position)),
398
+ $descriptor(System_XYZ<FloatT, WGS84> *), SWIG_POINTER_OWN));
399
+ %append_output(SWIG_NewPointerObj((new System_XYZ<FloatT, WGS84>($1.velocity)),
400
+ $descriptor(System_XYZ<FloatT, WGS84> *), SWIG_POINTER_OWN));
401
+ %append_output(swig::from($1.clock_error));
402
+ %append_output(swig::from($1.clock_error_dot));
403
+ }
404
+ typename GPS_Ephemeris<FloatT>::constellation_res_t constellation(
405
+ const GPS_Time<FloatT> &t_tx, const FloatT &dt_transit = 0) const {
406
+ typename GPS_SpaceNode<FloatT>::SatelliteProperties::constellation_t pv(
407
+ self->constellation(t_tx, dt_transit, true));
408
+ typename GPS_Ephemeris<FloatT>::constellation_res_t res = {
409
+ pv.position, pv.velocity, self->clock_error(t_tx), self->clock_error_dot(t_tx)};
410
+ return res;
406
411
  }
407
412
  #if defined(SWIGRUBY)
408
413
  %rename("consistent?") is_consistent;
@@ -461,15 +466,14 @@ struct SBAS_Ephemeris : public SBAS_SpaceNode<FloatT>::SatelliteProperties::Ephe
461
466
  MAKE_ACCESSOR(ddx, FloatT); MAKE_ACCESSOR(ddy, FloatT); MAKE_ACCESSOR(ddz, FloatT);
462
467
  MAKE_ACCESSOR(a_Gf0, FloatT);
463
468
  MAKE_ACCESSOR(a_Gf1, FloatT);
464
- %apply GPS_Ephemeris::System_XYZ<FloatT, WGS84> & { System_XYZ<FloatT, WGS84> & }; // TODO ineffective?
465
- void constellation(
466
- System_XYZ<FloatT, WGS84> &position, System_XYZ<FloatT, WGS84> &velocity,
467
- const GPS_Time<FloatT> &t, const FloatT &pseudo_range = 0,
469
+ typename GPS_Ephemeris<FloatT>::constellation_res_t constellation(
470
+ const GPS_Time<FloatT> &t_tx, const FloatT &dt_transit = 0,
468
471
  const bool &with_velocity = true) const {
469
- typename SBAS_SpaceNode<FloatT>::SatelliteProperties::constellation_t res(
470
- self->constellation(t, pseudo_range, with_velocity));
471
- position = res.position;
472
- velocity = res.velocity;
472
+ typename SBAS_SpaceNode<FloatT>::SatelliteProperties::constellation_t pv(
473
+ self->constellation(t_tx, dt_transit, with_velocity));
474
+ typename GPS_Ephemeris<FloatT>::constellation_res_t res = {
475
+ pv.position, pv.velocity, self->clock_error(t_tx), self->clock_error_dot(t_tx)};
476
+ return res;
473
477
  }
474
478
  }
475
479
 
@@ -612,23 +616,13 @@ struct GLONASS_Ephemeris
612
616
  self->has_string = has_string;
613
617
  return updated;
614
618
  }
615
- FloatT clock_error(
616
- const GPS_Time<FloatT> &t_arrival, const FloatT &pseudo_range = 0) const {
617
- return self->clock_error(t_arrival, pseudo_range);
618
- }
619
- %typemap(in,numinputs=0) System_XYZ<FloatT, WGS84> & (System_XYZ<FloatT, WGS84> temp) %{
620
- $1 = &temp;
621
- %}
622
- %typemap(argout) System_XYZ<FloatT, WGS84> & {
623
- %append_output(SWIG_NewPointerObj((new $*1_ltype(*$1)), $1_descriptor, SWIG_POINTER_OWN));
624
- }
625
- void constellation(
626
- System_XYZ<FloatT, WGS84> &position, System_XYZ<FloatT, WGS84> &velocity,
627
- const GPS_Time<FloatT> &t, const FloatT &pseudo_range = 0) const {
628
- typename GPS_SpaceNode<FloatT>::SatelliteProperties::constellation_t res(
629
- self->constellation(t, pseudo_range));
630
- position = res.position;
631
- velocity = res.velocity;
619
+ typename GPS_Ephemeris<FloatT>::constellation_res_t constellation(
620
+ const GPS_Time<FloatT> &t_tx, const FloatT &dt_transit = 0) const {
621
+ typename GPS_SpaceNode<FloatT>::SatelliteProperties::constellation_t pv(
622
+ self->constellation(t_tx, dt_transit));
623
+ typename GPS_Ephemeris<FloatT>::constellation_res_t res = {
624
+ pv.position, pv.velocity, self->clock_error(t_tx), self->clock_error_dot()};
625
+ return res;
632
626
  }
633
627
  #if defined(SWIGRUBY)
634
628
  %rename("consistent?") is_consistent;
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GPS_PVT
4
- VERSION = "0.6.1"
4
+ VERSION = "0.6.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gps_pvt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - fenrir(M.Naruoka)
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-07-21 00:00:00.000000000 Z
11
+ date: 2022-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake