gps_pvt 0.5.1 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6b4f5df780c4ff0977b025fab381c327b04a3e8fae742cc6ff672e08839d9c51
4
- data.tar.gz: cbbb233acbe548944d9b317449160465ec04d2041e56f54decc286a900503723
3
+ metadata.gz: 7ae7a4026e4f061c13eda89c325a64eba31907fc358433104a8f8bb2b185be4a
4
+ data.tar.gz: 2271e46713a750224bb700292552d670d7a3f483c3f6499b8fc719f686e3a88a
5
5
  SHA512:
6
- metadata.gz: a724b51f5fe55fe9c0d74d02176c26dbad63bcc1fc1fbd477c7a0707e06f832df5110f4a80c5c2807ac5e1ae2d0717846858a30365eec874847c96fb11e12b5e
7
- data.tar.gz: 97b3670fd401bc860d9f16ab473fe4c6c33ee87fcf6855757490ec724d8405a6aeb7df22aabaf7e37f559d80ce9b4ce1c764c550acccf591bb940805b3c660a6
6
+ metadata.gz: 69b901d4cd1b31c72423acfe0e6e2185a44c5df4b2eae7f6969e9525dec9cb807bab49fd1e1ae1e05c582b596cd0ebdbf0738d2cdbdc42fe87a4c2feb9510be5
7
+ data.tar.gz: 8bec3d3eac56beb25895dcdae4ffa084acf4967ae6c9b06b5234574bcca7197cdc01937ec27ef4547013e0bdd4b3e1e5e69a8f7494d1052d4bfc0b6cd47fba06
data/README.md CHANGED
@@ -30,17 +30,21 @@ For Windows users, this gem requires Devkit because of native compilation.
30
30
  ### For user who just generate PVT solution
31
31
  An attached executable is useful. After installation, type
32
32
 
33
- $ gps_pvt RINEX_or_UBX_file(s)
33
+ $ gps_pvt file_or_URI(s)
34
34
 
35
- The format of RINEX_or_UBX_file is automatically determined with its extension, such as .ubx will be treated as UBX format. A gz compressed file can be specified directly, and URI such as https://... is also acceptable since version 0.5.0. If you want to specify the file format, instead of RINEX_or_UBX_file(s), use the following arguments:
35
+ The format of file is automatically determined with its extension, such as .ubx will be treated as UBX format. A compressed file of .gz or .Z can be specified directly (decompression is internally performed), and URI such as http(s)://... and ftp:// is also acceptable. If you want to specify the file format, instead of file_or_URI(s), use the following arguments:
36
36
 
37
- --rinex_nav=filename
38
- --rinex_obs=filename
39
- --ubx=filename
37
+ | specification | recoginized as |
38
+ ----|----
39
+ | --rinex_nav=file_or_URI | [RINEX](https://www.igs.org/wg/rinex/#documents-formats) navigation file |
40
+ | --rinex_obs=file_or_URI | [RINEX](https://www.igs.org/wg/rinex/#documents-formats) observation file |
41
+ | --ubx=file_or_URI | [U-blox](https://www.u-blox.com/) dedicated format |
42
+ | --sp3=file_or_URI | [Standard Product 3 Orbit Format](https://files.igs.org/pub/data/format/sp3c.txt) (supported gps_pvt version >= 0.6.0) |
43
+ | --antex=file_or_URI | [Antenna Exchange Format](https://igs.org/wg/antenna#files) (supported gps_pvt version >= 0.6.0) |
40
44
 
41
45
  Since version 0.2.0, SBAS and QZSS are supported in addition to GPS. Since version 0.4.0, GLONASS is also available. QZSS ranging is activated in default, however, SBAS is just utilized for ionospheric correction. GLONASS is also turned off by default. If you want to activate SBAS or GLONASS ranging, "--with=(system or PRN)" options are used with gps_pvt executable like
42
46
 
43
- $ gps_pvt --with=137 --with=GLONASS RINEX_or_UBX_file(s)
47
+ $ gps_pvt --with=137 --with=GLONASS file_or_URI(s)
44
48
 
45
49
  Additionally, the following command options *--key=value* are available.
46
50
 
@@ -50,7 +54,7 @@ Additionally, the following command options *--key=value* are available.
50
54
  | elevation_mask_deg | numeric | satellite elevation mask specified in degrees. *ex) --elevation_mask_deg=10* | v0.3.0 |
51
55
  | 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
56
  | end_time | time string | end time to perform solution. Its format is the same as start_time. | v0.3.3 |
53
- | online_ephemeris | | automatically load ephemeris published online based on observation | v0.5.0 |
57
+ | online_ephemeris | | based on observation, automatically load ephemeris which is previously broadcasted from satellite and currently published online | v0.5.0 |
54
58
 
55
59
  ### For developer
56
60
 
data/Rakefile CHANGED
@@ -12,9 +12,21 @@ Rake::ExtensionTask.new("gps_pvt") do |ext|
12
12
  end
13
13
 
14
14
  namespace :git do
15
+ task :version do
16
+ @git_version ||= proc{
17
+ res = Gem::Version::new(`git --version`.match(/\d+\.\d+\.\d+/)[0])
18
+ res.instance_eval{
19
+ cmp_orig = self.method(:<=>)
20
+ define_singleton_method(:<=>){|arg|
21
+ cmp_orig.call(arg.kind_of?(String) ? Gem::Version::new(arg) : arg)
22
+ }
23
+ }
24
+ res
25
+ }.call
26
+ end
15
27
  namespace :submodules do
16
28
  desc "Initialize git submodules"
17
- task :init do
29
+ task :init => ["git:version"] do
18
30
  sh "git submodule init"
19
31
  # for sparse-checkout; @see https://stackoverflow.com/a/59521050/15992898
20
32
  `git config --file .gitmodules --name-only --get-regexp path`.lines.each{|str|
@@ -25,30 +37,37 @@ namespace :git do
25
37
  }
26
38
  {
27
39
  'ext/ninja-scan-light' => [
28
- "sparse-checkout init", # same as "git -C #{repo} config core.sparseCheckout true"
40
+ # From git 2.37.0, cone mode, which denies part of pattern like .ignore, is its default.
41
+ # @see https://git-scm.com/docs/git-sparse-checkout/2.37.0#_internalscone_mode_handling
42
+ (@git_version < "2.37.0") ? "sparse-checkout init" : nil, # same as "git -C #{repo} config core.sparseCheckout true"
29
43
  # same as #{repo}/.git/info/sparse-checkout
30
- "sparse-checkout set" + (<<-__SPARSE_PATTERNS__).lines.collect{|str| str.chomp.gsub(/^ */, ' ')}.join,
31
- /tool/param/
32
- /tool/algorithm/integral.h
33
- /tool/navigation/GPS*
34
- /tool/navigation/SBAS*
35
- /tool/navigation/QZSS*
36
- /tool/navigation/GLONASS*
37
- /tool/navigation/coordinate.h
38
- /tool/navigation/EGM.h
39
- /tool/navigation/MagneticField.h
40
- /tool/navigation/NTCM.h
41
- /tool/navigation/RINEX.h
42
- /tool/navigation/WGS84.h
43
- /tool/swig/SylphideMath.i
44
- /tool/swig/GPS.i
45
- /tool/swig/Coordinate.i
46
- /tool/swig/makefile
47
- /tool/swig/extconf.rb
48
- /tool/swig/spec/GPS_spec.rb
49
- /tool/swig/spec/SylphideMath_spec.rb
44
+ "sparse-checkout set #{'--no-cone' if @git_version >= "2.37.0"}" \
45
+ + (<<-__SPARSE_PATTERNS__).lines.collect{|str| str.chomp.gsub(/^ */, ' ')}.join,
46
+ tool/param/
47
+ tool/util/text_helper.h
48
+ tool/algorithm/integral.h
49
+ tool/algorithm/interpolate.h
50
+ tool/navigation/GPS*
51
+ tool/navigation/SBAS*
52
+ tool/navigation/QZSS*
53
+ tool/navigation/GLONASS*
54
+ tool/navigation/coordinate.h
55
+ tool/navigation/EGM.h
56
+ tool/navigation/MagneticField.h
57
+ tool/navigation/NTCM.h
58
+ tool/navigation/RINEX.h
59
+ tool/navigation/WGS84.h
60
+ tool/navigation/SP3.h
61
+ tool/navigation/ANTEX.h
62
+ tool/swig/SylphideMath.i
63
+ tool/swig/GPS.i
64
+ tool/swig/Coordinate.i
65
+ tool/swig/makefile
66
+ tool/swig/extconf.rb
67
+ tool/swig/spec/GPS_spec.rb
68
+ tool/swig/spec/SylphideMath_spec.rb
50
69
  __SPARSE_PATTERNS__
51
- ]
70
+ ].compact
52
71
  }.each{|repo, commands|
53
72
  commands.each{|str| sh "git -C #{repo} #{str}"}
54
73
  }
data/exe/gps_pvt CHANGED
@@ -7,13 +7,14 @@ require 'uri'
7
7
 
8
8
  $stderr.puts <<__STRING__
9
9
  Usage: #{__FILE__} GPS_file1 GPS_file2 ...
10
- As GPS_file, rinex_nav(*.YYn, *.YYh, *.YYq, *.YYg), rinex_obs(*.YYo), and ubx(*.ubx) format are currently supported.
10
+ As GPS_file, rinex_nav(*.YYn, *.YYh, *.YYq, *.YYg), rinex_obs(*.YYo), ubx(*.ubx), SP3(*.sp3), and ANTEX(*.atx) format are currently supported.
11
11
  (YY = last two digit of year)
12
12
  File format is automatically determined based on its extention described in above parentheses.
13
- If you want to specify its format manually, --rinex_(nav|obs)=file_name or --ubx=file_name are available.
13
+ If you want to specify its format manually, command options like --rinex_nav=file_name are available.
14
+ Other than --rinex_nav, --rinex_obs, --ubx, --sp3 or --antex are supported.
14
15
  Supported RINEX versions are 2 and 3.
15
- A file having additional ".gz" extension is recognized as a file compressed by zlib.
16
- Major URL such as http(s)://... is acceptable as an input file name.
16
+ A file having additional ".gz" or ".Z" extension is recognized as a compressed file.
17
+ Major URL such as http(s)://... or ftp://... is acceptable as an input file name.
17
18
  __STRING__
18
19
 
19
20
  options = []
@@ -23,7 +24,7 @@ misc_options = {}
23
24
  files = ARGV.collect{|arg|
24
25
  next [arg, nil] unless arg =~ /^--([^=]+)=?/
25
26
  k, v = [$1.downcase.to_sym, $']
26
- next [v, k] if [:rinex_nav, :rinex_obs, :ubx].include?(k) # file type
27
+ next [v, k] if [:rinex_nav, :rinex_obs, :ubx, :sp3, :antex].include?(k) # file type
27
28
  options << [$1.to_sym, $']
28
29
  nil
29
30
  }.compact
@@ -71,6 +72,8 @@ files.collect!{|fname, ftype|
71
72
  when /\.\d{2}[nhqg](?:\.gz)?$/; :rinex_nav
72
73
  when /\.\d{2}o(?:\.gz)?$/; :rinex_obs
73
74
  when /\.ubx$/; :ubx
75
+ when /\.sp3(?:\.Z)?$/; :sp3
76
+ when /\.atx(?:\.Z)?$/; :antex
74
77
  else
75
78
  raise "Format cannot be guessed, use --(format, ex. rinex_nav)=#{fname}"
76
79
  end
@@ -138,7 +141,11 @@ puts rcv.header
138
141
 
139
142
  # parse RINEX NAV
140
143
  files.each{|fname, ftype|
141
- rcv.parse_rinex_nav(fname) if ftype == :rinex_nav
144
+ case ftype
145
+ when :rinex_nav; rcv.parse_rinex_nav(fname)
146
+ when :sp3; rcv.attach_sp3(fname)
147
+ when :antex; rcv.attach_antex(fname)
148
+ end
142
149
  }
143
150
 
144
151
  # other files
@@ -3917,6 +3917,49 @@ fail:
3917
3917
  }
3918
3918
 
3919
3919
 
3920
+ /*
3921
+ Document-method: GPS_PVT::Coordinate::XYZ.after
3922
+
3923
+ call-seq:
3924
+ after(double const & delay_sec) -> XYZ
3925
+
3926
+ An instance method.
3927
+
3928
+ */
3929
+ SWIGINTERN VALUE
3930
+ _wrap_XYZ_after(int argc, VALUE *argv, VALUE self) {
3931
+ System_XYZ< double,WGS84 > *arg1 = (System_XYZ< double,WGS84 > *) 0 ;
3932
+ double *arg2 = 0 ;
3933
+ void *argp1 = 0 ;
3934
+ int res1 = 0 ;
3935
+ double temp2 ;
3936
+ double val2 ;
3937
+ int ecode2 = 0 ;
3938
+ System_XYZ< double,WGS84 >::self_t result;
3939
+ VALUE vresult = Qnil;
3940
+
3941
+ if ((argc < 1) || (argc > 1)) {
3942
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3943
+ }
3944
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_System_XYZT_double_WGS84_t, 0 | 0 );
3945
+ if (!SWIG_IsOK(res1)) {
3946
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "System_XYZ< double,WGS84 > const *","after", 1, self ));
3947
+ }
3948
+ arg1 = reinterpret_cast< System_XYZ< double,WGS84 > * >(argp1);
3949
+ ecode2 = SWIG_AsVal_double(argv[0], &val2);
3950
+ if (!SWIG_IsOK(ecode2)) {
3951
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","after", 2, argv[0] ));
3952
+ }
3953
+ temp2 = static_cast< double >(val2);
3954
+ arg2 = &temp2;
3955
+ result = ((System_XYZ< double,WGS84 > const *)arg1)->after((double const &)*arg2);
3956
+ vresult = SWIG_NewPointerObj((new System_XYZ< double,WGS84 >::self_t(static_cast< const System_XYZ< double,WGS84 >::self_t& >(result))), SWIGTYPE_p_System_XYZT_double_WGS84_t, SWIG_POINTER_OWN | 0 );
3957
+ return vresult;
3958
+ fail:
3959
+ return Qnil;
3960
+ }
3961
+
3962
+
3920
3963
  /*
3921
3964
  Document-method: GPS_PVT::Coordinate::XYZ.x=
3922
3965
 
@@ -6549,6 +6592,7 @@ SWIGEXPORT void Init_Coordinate(void) {
6549
6592
  rb_define_singleton_method(SwigClassXYZ.klass, "b0", VALUEFUNC(_wrap_XYZ_b0_get), 0);
6550
6593
  rb_define_singleton_method(SwigClassXYZ.klass, "e0", VALUEFUNC(_wrap_XYZ_e0_get), 0);
6551
6594
  rb_define_method(SwigClassXYZ.klass, "llh", VALUEFUNC(_wrap_XYZ_llh), -1);
6595
+ rb_define_method(SwigClassXYZ.klass, "after", VALUEFUNC(_wrap_XYZ_after), -1);
6552
6596
  rb_define_method(SwigClassXYZ.klass, "x=", VALUEFUNC(_wrap_XYZ_xe___), -1);
6553
6597
  rb_define_method(SwigClassXYZ.klass, "y=", VALUEFUNC(_wrap_XYZ_ye___), -1);
6554
6598
  rb_define_method(SwigClassXYZ.klass, "z=", VALUEFUNC(_wrap_XYZ_ze___), -1);