gps_pvt 0.3.0 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -2
- data/exe/gps_pvt +63 -0
- data/ext/gps_pvt/GPS/GPS_wrap.cxx +154 -192
- data/ext/gps_pvt/SylphideMath/SylphideMath_wrap.cxx +453 -429
- data/ext/ninja-scan-light/tool/navigation/GPS.h +7 -1
- data/ext/ninja-scan-light/tool/swig/GPS.i +6 -0
- data/ext/ninja-scan-light/tool/swig/SylphideMath.i +38 -15
- data/ext/ninja-scan-light/tool/swig/spec/GPS_spec.rb +1 -0
- data/ext/ninja-scan-light/tool/swig/spec/SylphideMath_spec.rb +13 -3
- data/lib/gps_pvt/receiver.rb +11 -4
- data/lib/gps_pvt/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b91245b6a851b08ef5ec4b23e6be27cdd1150eaf6f7036249bf971c105bd920d
|
4
|
+
data.tar.gz: 75e5a367d8e1cc0d0e8cc48dae63b3b9b6a72fc86eeeea76bc6d1562ba171f02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3763faded2f4a5ace56f3a5cfde25311792ea06bda6ce5eb987fa10e1add08d9eb505bdb697fefb84b95a212072a824c3c134d298f4adea13d4ea31edfbeb831
|
7
|
+
data.tar.gz: 76b55b2da8d816a4bd2be024191ac0b706e40624035f979411f9192d78e030f2ee10ab4ce186160e8de2006b175728db593b11c25020f734ed9ac22544f0d2fb
|
data/README.md
CHANGED
@@ -27,7 +27,8 @@ For Windows users, this gem requires Devkit because of native compilation.
|
|
27
27
|
|
28
28
|
## Usage
|
29
29
|
|
30
|
-
For user who just generate PVT solution
|
30
|
+
### For user who just generate PVT solution
|
31
|
+
An attached executable is useful. After installation, type
|
31
32
|
|
32
33
|
$ gps_pvt RINEX_or_UBX_file(s)
|
33
34
|
|
@@ -41,7 +42,18 @@ From version 0.2.0, SBAS and QZSS are supported in addition to GPS. QZSS ranging
|
|
41
42
|
|
42
43
|
$ gps_pvt --with=137 RINEX_or_UBX_file(s)
|
43
44
|
|
44
|
-
|
45
|
+
Additionally, the following command options *--key=value* are available.
|
46
|
+
|
47
|
+
| key | value | comment | version |
|
48
|
+
----|----|----|----
|
49
|
+
| base_station | 3 \* (numeric+coordinate) | base position used for relative ENU position calculation. XYZ, NEU formats are acceptable. *ex1) --base_station=0X,0Y,0Z*, *ex2) --base_station=12.34N,56.789E,0U* | v0.1.7 |
|
50
|
+
| elevation_mask_deg | numeric | satellite elevation mask specified in degrees. *ex) --elevation_mask_deg=10* | v0.3.0 |
|
51
|
+
| start_time | time string | start time to perform solution. GPS, UTC and other formats are supported. *ex1) --start_time=1234:5678* represents 5678 seconds in 1234 GPS week, *ex2) --start_time="2000-01-01 00:00:00 UTC"* is in UTC format. | v0.3.3 |
|
52
|
+
| end_time | time string | end time to perform solution. Its format is the same as start_time. | v0.3.3 |
|
53
|
+
|
54
|
+
### For developer
|
55
|
+
|
56
|
+
This library will be used like:
|
45
57
|
|
46
58
|
```ruby
|
47
59
|
require 'gps_pvt'
|
data/exe/gps_pvt
CHANGED
@@ -14,6 +14,7 @@ Note: YY = last two digit of year.
|
|
14
14
|
__STRING__
|
15
15
|
|
16
16
|
options = []
|
17
|
+
misc_options = {}
|
17
18
|
|
18
19
|
# check options and file format
|
19
20
|
files = ARGV.collect{|arg|
|
@@ -24,6 +25,40 @@ files = ARGV.collect{|arg|
|
|
24
25
|
nil
|
25
26
|
}.compact
|
26
27
|
|
28
|
+
options.reject!{|opt|
|
29
|
+
case opt[0]
|
30
|
+
when :start_time, :end_time
|
31
|
+
require 'time'
|
32
|
+
gpst_type = GPS_PVT::GPS::Time
|
33
|
+
t = nil
|
34
|
+
if opt[1] =~ /^(?:(\d+):)??(\d+(?:\.\d*)?)$/ then
|
35
|
+
t = [$1 && $1.to_i, $2.to_f]
|
36
|
+
t = gpst_type::new(*t) if t[0]
|
37
|
+
elsif t = (Time::parse(opt[1]) rescue nil) then
|
38
|
+
# leap second handling in Ruby Time is system dependent, thus
|
39
|
+
#t = gpst_type::new(0, t - Time::parse("1980-01-06 00:00:00 +0000"))
|
40
|
+
# is inappropriate.
|
41
|
+
subsec = t.subsec.to_f
|
42
|
+
t = gpst_type::new(t.to_a[0..5].reverse)
|
43
|
+
t += (subsec + gpst_type::guess_leap_seconds(t))
|
44
|
+
else
|
45
|
+
raise "Unknown time format: #{opt[1]}"
|
46
|
+
end
|
47
|
+
case t
|
48
|
+
when gpst_type
|
49
|
+
$stderr.puts(
|
50
|
+
"#{opt[0]}: %d week %f (a.k.a %04d/%02d/%02d %02d:%02d:%02.1f)" \
|
51
|
+
%(t.to_a + t.utc))
|
52
|
+
when Array
|
53
|
+
$stderr.puts("#{opt[0]}: #{t[0] || '(current)'} week #{t[1]}")
|
54
|
+
end
|
55
|
+
misc_options[opt[0]] = t
|
56
|
+
true
|
57
|
+
else
|
58
|
+
false
|
59
|
+
end
|
60
|
+
}
|
61
|
+
|
27
62
|
# Check file existence and extension
|
28
63
|
files.collect!{|fname, ftype|
|
29
64
|
raise "File not found: #{fname}" unless File::exist?(fname)
|
@@ -39,6 +74,34 @@ files.collect!{|fname, ftype|
|
|
39
74
|
|
40
75
|
rcv = GPS_PVT::Receiver::new(options)
|
41
76
|
|
77
|
+
proc{
|
78
|
+
run_orig = rcv.method(:run)
|
79
|
+
t_start, t_end = [nil, nil]
|
80
|
+
tasks = []
|
81
|
+
task = proc{|meas, t_meas, *args|
|
82
|
+
t_start, t_end = [:start_time, :end_time].collect{|k|
|
83
|
+
res = misc_options[k]
|
84
|
+
res.kind_of?(Array) \
|
85
|
+
? GPS_PVT::GPS::Time::new(t_meas.week, res[1]) \
|
86
|
+
: res
|
87
|
+
}
|
88
|
+
task = tasks.shift
|
89
|
+
task.call(*([meas, t_meas] + args))
|
90
|
+
}
|
91
|
+
tasks << proc{|meas, t_meas, *args|
|
92
|
+
next nil if t_start && (t_start > t_meas)
|
93
|
+
task = tasks.shift
|
94
|
+
task.call(*([meas, t_meas] + args))
|
95
|
+
}
|
96
|
+
tasks << proc{|meas, t_meas, *args|
|
97
|
+
next nil if t_end && (t_end < t_meas)
|
98
|
+
run_orig.call(*([meas, t_meas] + args))
|
99
|
+
}
|
100
|
+
rcv.define_singleton_method(:run){|*args|
|
101
|
+
task.call(*args)
|
102
|
+
}
|
103
|
+
}.call if [:start_time, :end_time].any?{|k| misc_options[k]}
|
104
|
+
|
42
105
|
puts rcv.header
|
43
106
|
|
44
107
|
# parse RINEX NAV
|
@@ -2896,6 +2896,9 @@ SWIG_AsVal_unsigned_SS_int (VALUE obj, unsigned int *val)
|
|
2896
2896
|
return res;
|
2897
2897
|
}
|
2898
2898
|
|
2899
|
+
SWIGINTERN GPS_Time< double > *new_GPS_Time_Sl_double_Sg___SWIG_4(int const &week_,GPS_Time< double >::float_t const &seconds_,void *dummy){
|
2900
|
+
return &((new GPS_Time<double>(week_, seconds_))->canonicalize());
|
2901
|
+
}
|
2899
2902
|
SWIGINTERN void GPS_Time_Sl_double_Sg__to_a(GPS_Time< double > const *self,int *week,double *seconds){
|
2900
2903
|
*week = self->week;
|
2901
2904
|
*seconds = self->seconds;
|
@@ -4642,9 +4645,9 @@ fail:
|
|
4642
4645
|
call-seq:
|
4643
4646
|
Time.new
|
4644
4647
|
Time.new(Time t)
|
4645
|
-
Time.new(int const & _week, GPS_Time< double >::float_t const & _seconds)
|
4646
4648
|
Time.new(std::tm const & t, GPS_Time< double >::float_t const & leap_seconds=0)
|
4647
4649
|
Time.new(std::tm const & t)
|
4650
|
+
Time.new(int const & week_, GPS_Time< double >::float_t const & seconds_)
|
4648
4651
|
|
4649
4652
|
Class constructor.
|
4650
4653
|
|
@@ -4710,105 +4713,6 @@ fail:
|
|
4710
4713
|
|
4711
4714
|
SWIGINTERN VALUE
|
4712
4715
|
_wrap_new_Time__SWIG_2(int argc, VALUE *argv, VALUE self) {
|
4713
|
-
int *arg1 = 0 ;
|
4714
|
-
GPS_Time< double >::float_t *arg2 = 0 ;
|
4715
|
-
int temp1 ;
|
4716
|
-
int val1 ;
|
4717
|
-
int ecode1 = 0 ;
|
4718
|
-
GPS_Time< double >::float_t temp2 ;
|
4719
|
-
double val2 ;
|
4720
|
-
int ecode2 = 0 ;
|
4721
|
-
GPS_Time< double > *result = 0 ;
|
4722
|
-
|
4723
|
-
if ((argc < 2) || (argc > 2)) {
|
4724
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
4725
|
-
}
|
4726
|
-
ecode1 = SWIG_AsVal_int(argv[0], &val1);
|
4727
|
-
if (!SWIG_IsOK(ecode1)) {
|
4728
|
-
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","GPS_Time<(double)>", 1, argv[0] ));
|
4729
|
-
}
|
4730
|
-
temp1 = static_cast< int >(val1);
|
4731
|
-
arg1 = &temp1;
|
4732
|
-
ecode2 = SWIG_AsVal_double(argv[1], &val2);
|
4733
|
-
if (!SWIG_IsOK(ecode2)) {
|
4734
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "GPS_Time< double >::float_t","GPS_Time<(double)>", 2, argv[1] ));
|
4735
|
-
}
|
4736
|
-
temp2 = static_cast< GPS_Time< double >::float_t >(val2);
|
4737
|
-
arg2 = &temp2;
|
4738
|
-
{
|
4739
|
-
try {
|
4740
|
-
result = (GPS_Time< double > *)new GPS_Time< double >((int const &)*arg1,(GPS_Time< double >::float_t const &)*arg2);
|
4741
|
-
DATA_PTR(self) = result;
|
4742
|
-
} catch (const native_exception &e) {
|
4743
|
-
e.regenerate();
|
4744
|
-
SWIG_fail;
|
4745
|
-
} catch (const std::exception& e) {
|
4746
|
-
SWIG_exception_fail(SWIG_RuntimeError, e.what());
|
4747
|
-
}
|
4748
|
-
}
|
4749
|
-
return self;
|
4750
|
-
fail:
|
4751
|
-
return Qnil;
|
4752
|
-
}
|
4753
|
-
|
4754
|
-
|
4755
|
-
/*
|
4756
|
-
Document-method: GPS_PVT::GPS::Time.canonicalize
|
4757
|
-
|
4758
|
-
call-seq:
|
4759
|
-
canonicalize -> Time
|
4760
|
-
|
4761
|
-
An instance method.
|
4762
|
-
|
4763
|
-
*/
|
4764
|
-
SWIGINTERN VALUE
|
4765
|
-
_wrap_Time_canonicalize(int argc, VALUE *argv, VALUE self) {
|
4766
|
-
GPS_Time< double > *arg1 = (GPS_Time< double > *) 0 ;
|
4767
|
-
void *argp1 = 0 ;
|
4768
|
-
int res1 = 0 ;
|
4769
|
-
GPS_Time< double > *result = 0 ;
|
4770
|
-
VALUE vresult = Qnil;
|
4771
|
-
|
4772
|
-
if ((argc < 0) || (argc > 0)) {
|
4773
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
4774
|
-
}
|
4775
|
-
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GPS_TimeT_double_t, 0 | 0 );
|
4776
|
-
if (!SWIG_IsOK(res1)) {
|
4777
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GPS_Time< double > *","canonicalize", 1, self ));
|
4778
|
-
}
|
4779
|
-
arg1 = reinterpret_cast< GPS_Time< double > * >(argp1);
|
4780
|
-
{
|
4781
|
-
try {
|
4782
|
-
result = (GPS_Time< double > *) &(arg1)->canonicalize();
|
4783
|
-
} catch (const native_exception &e) {
|
4784
|
-
e.regenerate();
|
4785
|
-
SWIG_fail;
|
4786
|
-
} catch (const std::exception& e) {
|
4787
|
-
SWIG_exception_fail(SWIG_RuntimeError, e.what());
|
4788
|
-
}
|
4789
|
-
}
|
4790
|
-
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GPS_TimeT_double_t, 0 | 0 );
|
4791
|
-
return vresult;
|
4792
|
-
fail:
|
4793
|
-
return Qnil;
|
4794
|
-
}
|
4795
|
-
|
4796
|
-
|
4797
|
-
/*
|
4798
|
-
Document-method: GPS_PVT::GPS::Time.new
|
4799
|
-
|
4800
|
-
call-seq:
|
4801
|
-
Time.new
|
4802
|
-
Time.new(Time t)
|
4803
|
-
Time.new(int const & _week, GPS_Time< double >::float_t const & _seconds)
|
4804
|
-
Time.new(std::tm const & t, GPS_Time< double >::float_t const & leap_seconds=0)
|
4805
|
-
Time.new(std::tm const & t)
|
4806
|
-
|
4807
|
-
Class constructor.
|
4808
|
-
|
4809
|
-
*/
|
4810
|
-
SWIGINTERN VALUE
|
4811
|
-
_wrap_new_Time__SWIG_3(int argc, VALUE *argv, VALUE self) {
|
4812
4716
|
std::tm *arg1 = 0 ;
|
4813
4717
|
GPS_Time< double >::float_t *arg2 = 0 ;
|
4814
4718
|
std::tm temp1 = {
|
@@ -4876,22 +4780,7 @@ fail:
|
|
4876
4780
|
|
4877
4781
|
|
4878
4782
|
SWIGINTERN VALUE
|
4879
|
-
|
4880
|
-
_wrap_Time_allocate(VALUE self)
|
4881
|
-
#else
|
4882
|
-
_wrap_Time_allocate(int argc, VALUE *argv, VALUE self)
|
4883
|
-
#endif
|
4884
|
-
{
|
4885
|
-
VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_GPS_TimeT_double_t);
|
4886
|
-
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
|
4887
|
-
rb_obj_call_init(vresult, argc, argv);
|
4888
|
-
#endif
|
4889
|
-
return vresult;
|
4890
|
-
}
|
4891
|
-
|
4892
|
-
|
4893
|
-
SWIGINTERN VALUE
|
4894
|
-
_wrap_new_Time__SWIG_4(int argc, VALUE *argv, VALUE self) {
|
4783
|
+
_wrap_new_Time__SWIG_3(int argc, VALUE *argv, VALUE self) {
|
4895
4784
|
std::tm *arg1 = 0 ;
|
4896
4785
|
std::tm temp1 = {
|
4897
4786
|
0
|
@@ -4948,81 +4837,6 @@ fail:
|
|
4948
4837
|
}
|
4949
4838
|
|
4950
4839
|
|
4951
|
-
SWIGINTERN VALUE _wrap_new_Time(int nargs, VALUE *args, VALUE self) {
|
4952
|
-
int argc;
|
4953
|
-
VALUE argv[2];
|
4954
|
-
int ii;
|
4955
|
-
|
4956
|
-
argc = nargs;
|
4957
|
-
if (argc > 2) SWIG_fail;
|
4958
|
-
for (ii = 0; (ii < argc); ++ii) {
|
4959
|
-
argv[ii] = args[ii];
|
4960
|
-
}
|
4961
|
-
if (argc == 0) {
|
4962
|
-
return _wrap_new_Time__SWIG_0(nargs, args, self);
|
4963
|
-
}
|
4964
|
-
if (argc == 1) {
|
4965
|
-
int _v;
|
4966
|
-
void *vptr = 0;
|
4967
|
-
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GPS_TimeT_double_t, SWIG_POINTER_NO_NULL);
|
4968
|
-
_v = SWIG_CheckState(res);
|
4969
|
-
if (_v) {
|
4970
|
-
return _wrap_new_Time__SWIG_1(nargs, args, self);
|
4971
|
-
}
|
4972
|
-
}
|
4973
|
-
if (argc == 1) {
|
4974
|
-
int _v;
|
4975
|
-
{
|
4976
|
-
_v = (TYPE(argv[0]) == T_ARRAY) ? 1 : 0;
|
4977
|
-
}
|
4978
|
-
if (_v) {
|
4979
|
-
return _wrap_new_Time__SWIG_4(nargs, args, self);
|
4980
|
-
}
|
4981
|
-
}
|
4982
|
-
if (argc == 2) {
|
4983
|
-
int _v;
|
4984
|
-
{
|
4985
|
-
_v = (TYPE(argv[0]) == T_ARRAY) ? 1 : 0;
|
4986
|
-
}
|
4987
|
-
if (_v) {
|
4988
|
-
{
|
4989
|
-
int res = SWIG_AsVal_double(argv[1], NULL);
|
4990
|
-
_v = SWIG_CheckState(res);
|
4991
|
-
}
|
4992
|
-
if (_v) {
|
4993
|
-
return _wrap_new_Time__SWIG_3(nargs, args, self);
|
4994
|
-
}
|
4995
|
-
}
|
4996
|
-
}
|
4997
|
-
if (argc == 2) {
|
4998
|
-
int _v;
|
4999
|
-
{
|
5000
|
-
int res = SWIG_AsVal_int(argv[0], NULL);
|
5001
|
-
_v = SWIG_CheckState(res);
|
5002
|
-
}
|
5003
|
-
if (_v) {
|
5004
|
-
{
|
5005
|
-
int res = SWIG_AsVal_double(argv[1], NULL);
|
5006
|
-
_v = SWIG_CheckState(res);
|
5007
|
-
}
|
5008
|
-
if (_v) {
|
5009
|
-
return _wrap_new_Time__SWIG_2(nargs, args, self);
|
5010
|
-
}
|
5011
|
-
}
|
5012
|
-
}
|
5013
|
-
|
5014
|
-
fail:
|
5015
|
-
Ruby_Format_OverloadedError( argc, 2, "Time.new",
|
5016
|
-
" Time.new()\n"
|
5017
|
-
" Time.new(GPS_Time< double > const &t)\n"
|
5018
|
-
" Time.new(int const &_week, GPS_Time< double >::float_t const &_seconds)\n"
|
5019
|
-
" Time.new(std::tm const &t, GPS_Time< double >::float_t const &leap_seconds)\n"
|
5020
|
-
" Time.new(std::tm const &t)\n");
|
5021
|
-
|
5022
|
-
return Qnil;
|
5023
|
-
}
|
5024
|
-
|
5025
|
-
|
5026
4840
|
/*
|
5027
4841
|
Document-method: GPS_PVT::GPS::Time.now
|
5028
4842
|
|
@@ -6234,6 +6048,155 @@ fail:
|
|
6234
6048
|
}
|
6235
6049
|
|
6236
6050
|
|
6051
|
+
SWIGINTERN VALUE
|
6052
|
+
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
|
6053
|
+
_wrap_Time_allocate(VALUE self)
|
6054
|
+
#else
|
6055
|
+
_wrap_Time_allocate(int argc, VALUE *argv, VALUE self)
|
6056
|
+
#endif
|
6057
|
+
{
|
6058
|
+
VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_GPS_TimeT_double_t);
|
6059
|
+
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
|
6060
|
+
rb_obj_call_init(vresult, argc, argv);
|
6061
|
+
#endif
|
6062
|
+
return vresult;
|
6063
|
+
}
|
6064
|
+
|
6065
|
+
|
6066
|
+
/*
|
6067
|
+
Document-method: GPS_PVT::GPS::Time.new
|
6068
|
+
|
6069
|
+
call-seq:
|
6070
|
+
Time.new
|
6071
|
+
Time.new(Time t)
|
6072
|
+
Time.new(std::tm const & t, GPS_Time< double >::float_t const & leap_seconds=0)
|
6073
|
+
Time.new(std::tm const & t)
|
6074
|
+
Time.new(int const & week_, GPS_Time< double >::float_t const & seconds_)
|
6075
|
+
|
6076
|
+
Class constructor.
|
6077
|
+
|
6078
|
+
*/
|
6079
|
+
SWIGINTERN VALUE
|
6080
|
+
_wrap_new_Time__SWIG_4(int argc, VALUE *argv, VALUE self) {
|
6081
|
+
int *arg1 = 0 ;
|
6082
|
+
GPS_Time< double >::float_t *arg2 = 0 ;
|
6083
|
+
void *arg3 = (void *) 0 ;
|
6084
|
+
int temp1 ;
|
6085
|
+
int val1 ;
|
6086
|
+
int ecode1 = 0 ;
|
6087
|
+
GPS_Time< double >::float_t temp2 ;
|
6088
|
+
double val2 ;
|
6089
|
+
int ecode2 = 0 ;
|
6090
|
+
GPS_Time< double > *result = 0 ;
|
6091
|
+
|
6092
|
+
|
6093
|
+
if ((argc < 2) || (argc > 2)) {
|
6094
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
6095
|
+
}
|
6096
|
+
ecode1 = SWIG_AsVal_int(argv[0], &val1);
|
6097
|
+
if (!SWIG_IsOK(ecode1)) {
|
6098
|
+
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","GPS_Time<(double)>", 1, argv[0] ));
|
6099
|
+
}
|
6100
|
+
temp1 = static_cast< int >(val1);
|
6101
|
+
arg1 = &temp1;
|
6102
|
+
ecode2 = SWIG_AsVal_double(argv[1], &val2);
|
6103
|
+
if (!SWIG_IsOK(ecode2)) {
|
6104
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "GPS_Time< double >::float_t","GPS_Time<(double)>", 2, argv[1] ));
|
6105
|
+
}
|
6106
|
+
temp2 = static_cast< GPS_Time< double >::float_t >(val2);
|
6107
|
+
arg2 = &temp2;
|
6108
|
+
{
|
6109
|
+
try {
|
6110
|
+
result = (GPS_Time< double > *)new_GPS_Time_Sl_double_Sg___SWIG_4((int const &)*arg1,(double const &)*arg2,arg3);
|
6111
|
+
DATA_PTR(self) = result;
|
6112
|
+
} catch (const native_exception &e) {
|
6113
|
+
e.regenerate();
|
6114
|
+
SWIG_fail;
|
6115
|
+
} catch (const std::exception& e) {
|
6116
|
+
SWIG_exception_fail(SWIG_RuntimeError, e.what());
|
6117
|
+
}
|
6118
|
+
}
|
6119
|
+
return self;
|
6120
|
+
fail:
|
6121
|
+
return Qnil;
|
6122
|
+
}
|
6123
|
+
|
6124
|
+
|
6125
|
+
SWIGINTERN VALUE _wrap_new_Time(int nargs, VALUE *args, VALUE self) {
|
6126
|
+
int argc;
|
6127
|
+
VALUE argv[2];
|
6128
|
+
int ii;
|
6129
|
+
|
6130
|
+
argc = nargs;
|
6131
|
+
if (argc > 2) SWIG_fail;
|
6132
|
+
for (ii = 0; (ii < argc); ++ii) {
|
6133
|
+
argv[ii] = args[ii];
|
6134
|
+
}
|
6135
|
+
if (argc == 0) {
|
6136
|
+
return _wrap_new_Time__SWIG_0(nargs, args, self);
|
6137
|
+
}
|
6138
|
+
if (argc == 1) {
|
6139
|
+
int _v;
|
6140
|
+
void *vptr = 0;
|
6141
|
+
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GPS_TimeT_double_t, SWIG_POINTER_NO_NULL);
|
6142
|
+
_v = SWIG_CheckState(res);
|
6143
|
+
if (_v) {
|
6144
|
+
return _wrap_new_Time__SWIG_1(nargs, args, self);
|
6145
|
+
}
|
6146
|
+
}
|
6147
|
+
if (argc == 1) {
|
6148
|
+
int _v;
|
6149
|
+
{
|
6150
|
+
_v = (TYPE(argv[0]) == T_ARRAY) ? 1 : 0;
|
6151
|
+
}
|
6152
|
+
if (_v) {
|
6153
|
+
return _wrap_new_Time__SWIG_3(nargs, args, self);
|
6154
|
+
}
|
6155
|
+
}
|
6156
|
+
if (argc == 2) {
|
6157
|
+
int _v;
|
6158
|
+
{
|
6159
|
+
_v = (TYPE(argv[0]) == T_ARRAY) ? 1 : 0;
|
6160
|
+
}
|
6161
|
+
if (_v) {
|
6162
|
+
{
|
6163
|
+
int res = SWIG_AsVal_double(argv[1], NULL);
|
6164
|
+
_v = SWIG_CheckState(res);
|
6165
|
+
}
|
6166
|
+
if (_v) {
|
6167
|
+
return _wrap_new_Time__SWIG_2(nargs, args, self);
|
6168
|
+
}
|
6169
|
+
}
|
6170
|
+
}
|
6171
|
+
if (argc == 2) {
|
6172
|
+
int _v;
|
6173
|
+
{
|
6174
|
+
int res = SWIG_AsVal_int(argv[0], NULL);
|
6175
|
+
_v = SWIG_CheckState(res);
|
6176
|
+
}
|
6177
|
+
if (_v) {
|
6178
|
+
{
|
6179
|
+
int res = SWIG_AsVal_double(argv[1], NULL);
|
6180
|
+
_v = SWIG_CheckState(res);
|
6181
|
+
}
|
6182
|
+
if (_v) {
|
6183
|
+
return _wrap_new_Time__SWIG_4(nargs, args, self);
|
6184
|
+
}
|
6185
|
+
}
|
6186
|
+
}
|
6187
|
+
|
6188
|
+
fail:
|
6189
|
+
Ruby_Format_OverloadedError( argc, 2, "Time.new",
|
6190
|
+
" Time.new()\n"
|
6191
|
+
" Time.new(GPS_Time< double > const &t)\n"
|
6192
|
+
" Time.new(std::tm const &t, GPS_Time< double >::float_t const &leap_seconds)\n"
|
6193
|
+
" Time.new(std::tm const &t)\n"
|
6194
|
+
" Time.new(int const &week_, GPS_Time< double >::float_t const &seconds_, void *dummy)\n");
|
6195
|
+
|
6196
|
+
return Qnil;
|
6197
|
+
}
|
6198
|
+
|
6199
|
+
|
6237
6200
|
/*
|
6238
6201
|
Document-method: GPS_PVT::GPS::Time.to_a
|
6239
6202
|
|
@@ -19515,7 +19478,6 @@ SWIGEXPORT void Init_GPS(void) {
|
|
19515
19478
|
rb_define_method(SwigClassTime.klass, "week", VALUEFUNC(_wrap_Time_week_get), -1);
|
19516
19479
|
rb_define_method(SwigClassTime.klass, "seconds=", VALUEFUNC(_wrap_Time_seconds_set), -1);
|
19517
19480
|
rb_define_method(SwigClassTime.klass, "seconds", VALUEFUNC(_wrap_Time_seconds_get), -1);
|
19518
|
-
rb_define_method(SwigClassTime.klass, "canonicalize", VALUEFUNC(_wrap_Time_canonicalize), -1);
|
19519
19481
|
rb_define_singleton_method(SwigClassTime.klass, "now", VALUEFUNC(_wrap_Time_now), -1);
|
19520
19482
|
rb_define_method(SwigClassTime.klass, "serialize", VALUEFUNC(_wrap_Time_serialize), -1);
|
19521
19483
|
rb_define_method(SwigClassTime.klass, "+", VALUEFUNC(_wrap_Time___add__), -1);
|