gps_pvt 0.8.4 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +17 -4
- data/exe/{to_ubx → gps2ubx} +6 -4
- data/exe/gps_get +70 -0
- data/exe/gps_pvt +7 -5
- data/ext/gps_pvt/GPS/GPS_wrap.cxx +615 -84
- data/ext/ninja-scan-light/tool/navigation/GLONASS.h +24 -10
- data/ext/ninja-scan-light/tool/navigation/GPS_Solver_Base.h +2 -1
- data/ext/ninja-scan-light/tool/navigation/RINEX.h +1 -1
- data/ext/ninja-scan-light/tool/swig/GPS.i +32 -23
- data/ext/ninja-scan-light/tool/swig/spec/GPS_spec.rb +2 -0
- data/lib/gps_pvt/ntrip.rb +40 -7
- data/lib/gps_pvt/receiver/rtcm3.rb +110 -0
- data/lib/gps_pvt/receiver.rb +1 -0
- data/lib/gps_pvt/rtcm3.rb +364 -0
- data/lib/gps_pvt/util.rb +44 -0
- data/lib/gps_pvt/version.rb +1 -1
- metadata +8 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9977db11c202c0e16e0db9a06a91419011732835f8d406194f4663342e79eef
|
4
|
+
data.tar.gz: 485793ee595d5245e383f70de03efd77f98f1e4228ba74b782c80fb2d0e06946
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee59dd138de2243ea47a170c8d0724803fb3a5e19b28b5fe360649614c827b020000dc264dfd810b48346cfb3ddd0929925633d9769848a782ee6c65feeb0143
|
7
|
+
data.tar.gz: 63230d1fee5eadb80487df64d679300144a457efaaa6f9874a6574bb600c47307f4cedab607385d9bfd73a5c43e0e066f22ee09ccd0b81a6294d688c753d3e08
|
data/README.md
CHANGED
@@ -32,7 +32,7 @@ An attached executable is useful. After installation, type
|
|
32
32
|
|
33
33
|
$ gps_pvt file_or_URI(s)
|
34
34
|
|
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). URI such as http(s)://... and ftp://, and serial port (COMn for Windows and /dev/tty* for *NIX, version >= 0.8.0) are also acceptable. Moreover, Ntrip URI of ntrip://(username):(password)@(caster_host):(port)/(mount_point), for exmaple, ```ntrip://test%40example.com:none@rtk2go.com:2101/NAIST-UBX``` (%40 is recognized as '@') is supported (version >= 0.8.4). If you want to specify the file format, instead of file_or_URI(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). URI such as http(s)://... and ftp://, and serial port (COMn for Windows and /dev/tty* for *NIX, version >= 0.8.0) are also acceptable. Moreover, Ntrip URI of ntrip://(username):(password)@(caster_host):(port)/(mount_point), for exmaple, ```ntrip://test%40example.com:none@rtk2go.com:2101/NAIST-UBX``` (%40 is recognized as '@') is supported (version >= 0.8.4), and its content format can be automatically determined (version >= 0.9.0). If you want to specify the file format, instead of file_or_URI(s), use the following arguments:
|
36
36
|
|
37
37
|
| specification | recoginized as |
|
38
38
|
----|----
|
@@ -42,6 +42,7 @@ The format of file is automatically determined with its extension, such as .ubx
|
|
42
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
43
|
| --antex=file_or_URI | [Antenna Exchange Format](https://igs.org/wg/antenna#files) (supported gps_pvt version >= 0.6.0) |
|
44
44
|
| --rinex_clk=file_or_URI | [RINEX clock](https://files.igs.org/pub/data/format/rinex_clock304.txt) file (supported gps_pvt version >= 0.7.0) |
|
45
|
+
| <a name=opt_rtcm3>--rtcm3=file_or_URI</a> | [RTCM 10403.x](https://rtcm.myshopify.com/collections/differential-global-navigation-satellite-dgnss-standards), ephemeris and MSM7 are used. (supported gps_pvt version >= 0.9.0) |
|
45
46
|
|
46
47
|
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
|
47
48
|
|
@@ -150,19 +151,31 @@ receiver.solver.correction = { # provide by using a Hash
|
|
150
151
|
|
151
152
|
## Additional utilities
|
152
153
|
|
153
|
-
### [to_ubx](exe/to_ubx)
|
154
|
+
### [gps2ubx](exe/gps2ubx) <sub>(formerly [to_ubx](../../tree/v0.8.4/exe/to_ubx))</sub>
|
154
155
|
|
155
156
|
Utility to convert observation into u-blox ubx format and dump standard input. After installation of gps_pvt, to type
|
156
157
|
|
157
|
-
$
|
158
|
+
$ gps2ubx file_or_URI(s) (options) > out.ubx
|
158
159
|
|
159
|
-
saves resultant into out.ubx by using redirection. The shared options with gps_pvt executable are [rinex_obs](#opt_rinex_obs), [rinex_nav](#opt_rinex_nav), [ubx](#opt_ubx), and [online_ephemeris](#opt_online_ephemeris). In addition, the following options are available.
|
160
|
+
saves resultant into out.ubx by using redirection. The shared options with gps_pvt executable are [rinex_obs](#opt_rinex_obs), [rinex_nav](#opt_rinex_nav), [ubx](#opt_ubx), [rtcm3](#opt_rtcm3) and [online_ephemeris](#opt_online_ephemeris). In addition, the following options are available.
|
160
161
|
|
161
162
|
| key | value | comment | since |
|
162
163
|
----|----|----|----
|
163
164
|
| ubx_rawx | | Change output packet types to UBX-RAWX from its default UBX-RAW. | v0.8.1 |
|
164
165
|
| broadcast_data | | In addition to observation, ephemeris is inserted by using UBX-SFRB packets. If ubx_rawx option is specified, UBX-SFRBX is used instead of UBX-SFRB. | v0.8.1 |
|
165
166
|
|
167
|
+
### [gps_get](exe/gps_get)
|
168
|
+
|
169
|
+
Utility to get and dump GPS files. After installation of gps_pvt, to type
|
170
|
+
|
171
|
+
$ gps_get file_or_URI(s) (options) > output_file
|
172
|
+
|
173
|
+
saves data into output_file by using redirection. http(s), ftp, and ntrip can be used as scheme of URI. Serial port is also supported. Note that compressed data is automatically decompressed before output. The following options are available.
|
174
|
+
|
175
|
+
| key | value | comment | since |
|
176
|
+
----|----|----|----
|
177
|
+
| out | file | Change output target from the standard output. In addition to file, serial port is supported. | v0.8.5 |
|
178
|
+
|
166
179
|
## Development
|
167
180
|
|
168
181
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake` to build library and run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/exe/{to_ubx → gps2ubx}
RENAMED
@@ -9,14 +9,15 @@ require 'gps_pvt/ubx'
|
|
9
9
|
|
10
10
|
$stderr.puts <<__STRING__
|
11
11
|
Usage: #{__FILE__} GPS_file ... > as_you_like.ubx
|
12
|
-
As GPS_file,
|
12
|
+
As GPS_file, rinex_obs(*.YYo) and rtcm3 stream are supported.
|
13
13
|
(YY = last two digit of year)
|
14
14
|
File format is automatically determined based on its extention described in above parentheses.
|
15
15
|
If you want to specify its format manually, command options like --rinex_obs=file_name are available.
|
16
16
|
Supported RINEX versions are 2 and 3.
|
17
17
|
RXM-RAWX and RXM-SFRBX are included in output UBX if corresponding file(s) is given.
|
18
18
|
A file having additional ".gz" or ".Z" extension is recognized as a compressed file.
|
19
|
-
Major URL such as http(s)://... or ftp://... is acceptable as an input file name.
|
19
|
+
Major URL such as http(s)://... or ftp://... is acceptable as an input file name.
|
20
|
+
Ntrip specified in URI as ntrip://(username):(password)@(caster_host):(port)/(mount_point) is also supported, and its format is automatically detected.
|
20
21
|
__STRING__
|
21
22
|
|
22
23
|
options = []
|
@@ -41,16 +42,16 @@ files.collect!{|fname, ftype|
|
|
41
42
|
when /\.\d{2}[nhqg](?:\.gz)?$/; :rinex_nav
|
42
43
|
when /\.\d{2}o(?:\.gz)?$/; :rinex_obs
|
43
44
|
when /\.ubx$/; :ubx
|
44
|
-
else
|
45
|
-
raise "Format cannot be guessed, use --(format, ex. rinex_obs)=#{fname}"
|
46
45
|
end
|
47
46
|
fname = proc{
|
48
47
|
next fname if File::exist?(fname)
|
49
48
|
if uri = URI::parse(fname) and !uri.instance_of?(URI::Generic) then
|
49
|
+
ftype ||= uri.read_format if uri.instance_of?(URI::Ntrip)
|
50
50
|
next uri
|
51
51
|
end
|
52
52
|
raise "File not found: #{fname}"
|
53
53
|
}.call
|
54
|
+
raise "Format cannot be guessed, use --(format, ex. rinex_obs)=#{fname}" unless ftype
|
54
55
|
[fname, ftype]
|
55
56
|
}
|
56
57
|
|
@@ -101,6 +102,7 @@ files.each{|fname, ftype|
|
|
101
102
|
case ftype
|
102
103
|
when :ubx; rcv.parse_ubx(fname){}
|
103
104
|
when :rinex_obs; rcv.parse_rinex_obs(fname){}
|
105
|
+
when :rtcm3; rcv.parse_rtcm3(fname){}
|
104
106
|
end
|
105
107
|
}
|
106
108
|
|
data/exe/gps_get
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'gps_pvt/util'
|
4
|
+
require 'uri'
|
5
|
+
|
6
|
+
$stderr.puts <<__STRING__
|
7
|
+
Usage: #{__FILE__} file_or_URI(s) ...
|
8
|
+
This utility outputs GNSS data specified with file_or_URI(s).
|
9
|
+
A file_or_URI having additional ".gz" or ".Z" extension is recognized as a compressed file, and the decompression is performed before output.
|
10
|
+
In addition to a local file, major URIs such as http(s)://..., ftp://..., and ntrip:// are supported.
|
11
|
+
Serial port (COMn for Windows, /dev/tty* for *NIX) is also acceptable as an input file name.
|
12
|
+
__STRING__
|
13
|
+
|
14
|
+
options = []
|
15
|
+
|
16
|
+
files = ARGV.collect{|arg|
|
17
|
+
next arg unless arg =~ /^--([^=]+)=?/
|
18
|
+
k, v = [$1.downcase.to_sym, $']
|
19
|
+
options << [$1.to_sym, $']
|
20
|
+
nil
|
21
|
+
}.compact
|
22
|
+
|
23
|
+
spec2io = proc{
|
24
|
+
io_pool = {}
|
25
|
+
proc{|spec, mode_r|
|
26
|
+
mode_r = true if (mode_r == nil)
|
27
|
+
next (io_pool[spec] ||= open(spec)) if Serial::SPEC =~ spec # serial port
|
28
|
+
if (uri = (URI::parse(spec) rescue nil)) and !uri.instance_of?(URI::Generic) then # URI
|
29
|
+
if mode_r then
|
30
|
+
case uri
|
31
|
+
when URI::Ntrip; next URI::open(uri)
|
32
|
+
else; next GPS_PVT::Util::get_txt(uri)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
raise "Unknown URI: #{spec}"
|
36
|
+
end
|
37
|
+
if mode_r then # file
|
38
|
+
next STDIN if spec == '-'
|
39
|
+
next open(GPS_PVT::Util::get_txt(spec), 'r') if File::exist?(spec)
|
40
|
+
raise "File not found: #{spec}"
|
41
|
+
else
|
42
|
+
next STDOUT if spec == '-'
|
43
|
+
open(spec, 'a+')
|
44
|
+
end
|
45
|
+
}
|
46
|
+
}.call
|
47
|
+
|
48
|
+
STDIN.binmode
|
49
|
+
STDOUT.binmode
|
50
|
+
dst, io_dst = proc{|spec| [spec, spec2io.call(spec, false)]}.call('-')
|
51
|
+
|
52
|
+
options.reject!{|k, v|
|
53
|
+
case k
|
54
|
+
when :out
|
55
|
+
dst, io_dst = [v, spec2io.call(v, false)]
|
56
|
+
next true
|
57
|
+
end
|
58
|
+
false
|
59
|
+
}
|
60
|
+
raise "Unknown option: #{options.first}" unless options.empty?
|
61
|
+
|
62
|
+
$stderr.puts "out: #{{'-' => '(stdout)'}[dst] || dst}"
|
63
|
+
threads = files.collect{|src|
|
64
|
+
$stderr.puts "in: #{{'-' => '(stdin)'}[src] || src}"
|
65
|
+
io_src = spec2io.call(src)
|
66
|
+
Thread.start{
|
67
|
+
io_dst.write(io_src.read(128)) until io_src.eof?
|
68
|
+
}
|
69
|
+
}
|
70
|
+
threads.each{|t| t.join}
|
data/exe/gps_pvt
CHANGED
@@ -11,10 +11,11 @@ As GPS_file, rinex_nav(*.YYn, *.YYh, *.YYq, *.YYg), rinex_obs(*.YYo), ubx(*.ubx)
|
|
11
11
|
(YY = last two digit of year)
|
12
12
|
File format is automatically determined based on its extention described in above parentheses.
|
13
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,
|
14
|
+
Other than --rinex_nav, --rinex_obs, --rinex_clk, --ubx, --sp3, --antex or --rtcm3 are supported.
|
15
15
|
Supported RINEX versions are 2 and 3.
|
16
16
|
A file having additional ".gz" or ".Z" extension is recognized as a compressed file.
|
17
|
-
Major
|
17
|
+
Major URI such as http(s)://... or ftp://..., and serial port (COMn for Windows, /dev/tty* for *NIX) is acceptable as an input file name.
|
18
|
+
Ntrip specified in URI as ntrip://(username):(password)@(caster_host):(port)/(mount_point) is also supported, and its format is automatically detected.
|
18
19
|
__STRING__
|
19
20
|
|
20
21
|
options = []
|
@@ -24,7 +25,7 @@ misc_options = {}
|
|
24
25
|
files = ARGV.collect{|arg|
|
25
26
|
next [arg, nil] unless arg =~ /^--([^=]+)=?/
|
26
27
|
k, v = [$1.downcase.to_sym, $']
|
27
|
-
next [v, k] if [:rinex_nav, :rinex_obs, :ubx, :sp3, :antex, :rinex_clk].include?(k) # file type
|
28
|
+
next [v, k] if [:rinex_nav, :rinex_obs, :ubx, :sp3, :antex, :rinex_clk, :rtcm3].include?(k) # file type
|
28
29
|
options << [$1.to_sym, $']
|
29
30
|
nil
|
30
31
|
}.compact
|
@@ -75,17 +76,17 @@ files.collect!{|fname, ftype|
|
|
75
76
|
when /\.sp3(?:\.Z)?$/; :sp3
|
76
77
|
when /\.atx(?:\.Z)?$/; :antex
|
77
78
|
when /\.clk$/; :rinex_clk
|
78
|
-
else
|
79
|
-
raise "Format cannot be guessed, use --(format, ex. rinex_nav)=#{fname}"
|
80
79
|
end
|
81
80
|
fname = proc{
|
82
81
|
next fname if File::exist?(fname)
|
83
82
|
next fname if ((fname =~ Serial::SPEC) rescue false)
|
84
83
|
if uri = URI::parse(fname) and !uri.instance_of?(URI::Generic) then
|
84
|
+
ftype ||= uri.read_format if uri.instance_of?(URI::Ntrip)
|
85
85
|
next uri
|
86
86
|
end
|
87
87
|
raise "File not found: #{fname}"
|
88
88
|
}.call
|
89
|
+
raise "Format cannot be guessed, use --(format, ex. rinex_nav)=#{fname}" unless ftype
|
89
90
|
[fname, ftype]
|
90
91
|
}
|
91
92
|
|
@@ -140,5 +141,6 @@ files.each{|fname, ftype|
|
|
140
141
|
case ftype
|
141
142
|
when :ubx; rcv.parse_ubx(fname)
|
142
143
|
when :rinex_obs; rcv.parse_rinex_obs(fname)
|
144
|
+
when :rtcm3; rcv.parse_rtcm3(fname)
|
143
145
|
end
|
144
146
|
}
|