gps_pvt 0.9.4 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -7
- data/Rakefile +18 -1
- data/exe/gps2ubx +12 -5
- data/exe/gps_pvt +7 -2
- data/ext/gps_pvt/GPS/GPS_wrap.cxx +837 -52
- data/ext/ninja-scan-light/tool/navigation/GLONASS_Solver.h +11 -3
- data/ext/ninja-scan-light/tool/navigation/GPS.h +2 -1
- data/ext/ninja-scan-light/tool/navigation/GPS_Solver.h +20 -16
- data/ext/ninja-scan-light/tool/navigation/GPS_Solver_Base.h +84 -46
- data/ext/ninja-scan-light/tool/navigation/GPS_Solver_RAIM.h +2 -1
- data/ext/ninja-scan-light/tool/navigation/SBAS_Solver.h +10 -2
- data/ext/ninja-scan-light/tool/swig/GPS.i +76 -5
- data/ext/ninja-scan-light/tool/swig/spec/GPS_spec.rb +7 -7
- data/gps_pvt.gemspec +3 -2
- data/lib/gps_pvt/asn1/asn1.rb +888 -0
- data/lib/gps_pvt/asn1/asn1.y +903 -0
- data/lib/gps_pvt/asn1/per.rb +182 -0
- data/lib/gps_pvt/receiver/agps.rb +31 -0
- data/lib/gps_pvt/receiver/extension.rb +21 -0
- data/lib/gps_pvt/receiver/rtcm3.rb +2 -1
- data/lib/gps_pvt/receiver.rb +28 -20
- data/lib/gps_pvt/rtcm3.rb +17 -32
- data/lib/gps_pvt/supl.rb +567 -0
- data/lib/gps_pvt/ubx.rb +15 -0
- data/lib/gps_pvt/upl/LPP-V17_5_0-Release17.asn +6441 -0
- data/lib/gps_pvt/upl/RRLP-V17_0_0-Release17.asn +2780 -0
- data/lib/gps_pvt/upl/ULP-V2_0_6-20200720-D.asn +2185 -0
- data/lib/gps_pvt/upl/upl.json.gz +0 -0
- data/lib/gps_pvt/upl/upl.rb +99 -0
- data/lib/gps_pvt/util.rb +1 -0
- data/lib/gps_pvt/version.rb +1 -1
- metadata +26 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc12b7e4590d91b7afacd099d36852acdde54d11e8418ff0c99386ac17e68ca4
|
4
|
+
data.tar.gz: f3286d74e35a744a2c451768f8785c259f36f5d6a94d04daaad71857f472429a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0611b095f8e2ccb80baa1dc9ba98291b6a5091dcbb14479b64058541260e5ccfd8ee1589aa40fc73393837b638f23633ac3dcfaa8fe23b396c1edfb960d47d75
|
7
|
+
data.tar.gz: 90731b787b1a62c718a49da481adc87bdedd26d57c207f29d69b35dffb0859bdaf185a6fe739060be68370cf66587feb26ffd18f01a2ed6037900a6c9527e35b
|
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), 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:
|
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). A-GPS to get ephemeris quickly is supported via special URI like ```supl://supl.google.com/``` (version >= 0.10.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
|
----|----
|
@@ -43,6 +43,7 @@ The format of file is automatically determined with its extension, such as .ubx
|
|
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
45
|
| <a name=opt_rtcm3>--rtcm3=file_or_URI</a> | [RTCM 10403.x](https://rtcm.myshopify.com/collections/differential-global-navigation-satellite-dgnss-standards). (supported gps_pvt version >= 0.9.0) The latest version uses message type Observation(GPS: 1001..1004; GLONASS: 1009..1012), Epehemris(GPS: 1019; GLOANSS: 1020; SBAS: 1043; QZSS: 1044), MSM(GPS: 1071..1077; GLONASS: 1081..1087; SBAS: 1101..1107; QZSS: 1111..1117) |
|
46
|
+
| <a name=opt_supl>--supl=URI</a> | [SUPL, secure user plane location](https://www.openmobilealliance.org/release/SUPL/). (supported gps_pvt version >= 0.10.0) Both [LPP](https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=3710)(default) and [RRLP](https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=2688) are internally used, which can be manually selected by adding ```?protocol=lpp_or_rrlp``` URI query string. |
|
46
47
|
|
47
48
|
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
|
48
49
|
|
@@ -109,17 +110,18 @@ receiver.solver.gps_options.elevation_mask = Math::PI / 180 * 10 # example 10 [d
|
|
109
110
|
|
110
111
|
# Precise control of properties for each satellite and for each iteration
|
111
112
|
receiver.solver.hooks[:relative_property] = proc{|prn, rel_prop, meas, rcv_e, t_arv, usr_pos, usr_vel|
|
112
|
-
|
113
|
+
weight_range, range_c, range_r, weight_rate, rate_rel_neg, *los_neg = rel_prop # relative property
|
113
114
|
# meas is measurement represented by pseudo range of the selected satellite.
|
114
115
|
# rcv_e, t_arv, usr_pos, usr_vel are temporary solution of
|
115
116
|
# receiver clock error [m], time of arrival [s], user position and velocity in ECEF, respectively.
|
117
|
+
# Note: weight_rate is added since v0.10.1
|
116
118
|
|
117
|
-
|
119
|
+
weight_range = 1 # quick example: identical weight for each visible satellite
|
118
120
|
# or weight based on elevation, for example:
|
119
121
|
# elv = GPS_PVT::Coordinate::ENU::relative_rel(GPS_PVT::Coordinate::XYZ::new(*los_neg), usr_pos).elevation
|
120
|
-
#
|
122
|
+
# weight_range = (Math::sin(elv)/0.8)**2
|
121
123
|
|
122
|
-
[
|
124
|
+
[weight_range, range_c, range_r, weight_rate, rate_rel_neg] + los_neg # must return relative property
|
123
125
|
}
|
124
126
|
|
125
127
|
# Range correction (since v0.3.0)
|
@@ -157,7 +159,7 @@ Utility to convert observation into u-blox ubx format and dump standard input. A
|
|
157
159
|
|
158
160
|
$ gps2ubx file_or_URI(s) (options) > out.ubx
|
159
161
|
|
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.
|
162
|
+
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), [supl](#opt_supl) and [online_ephemeris](#opt_online_ephemeris). In addition, the following options are available.
|
161
163
|
|
162
164
|
| key | value | comment | since |
|
163
165
|
----|----|----|----
|
@@ -170,7 +172,7 @@ Utility to get and dump GPS files. After installation of gps_pvt, to type
|
|
170
172
|
|
171
173
|
$ gps_get file_or_URI(s) (options) > output_file
|
172
174
|
|
173
|
-
saves data into output_file by using redirection. http(s), ftp, and
|
175
|
+
saves data into output_file by using redirection. http(s), ftp, ntrip, and supl 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
176
|
|
175
177
|
| key | value | comment | since |
|
176
178
|
----|----|----|----
|
data/Rakefile
CHANGED
@@ -107,6 +107,23 @@ task :swig do
|
|
107
107
|
}
|
108
108
|
end
|
109
109
|
|
110
|
+
desc "Update upl.json.gz by using upl/*.asn"
|
111
|
+
task "upl.json" do
|
112
|
+
parser_dir = File::join(File::dirname(__FILE__), 'lib', 'gps_pvt', 'asn1')
|
113
|
+
upl_dir = File::join(parser_dir, '..', 'upl')
|
114
|
+
upl_files = Dir::glob(File::join(upl_dir, '*.asn'))
|
115
|
+
chdir(parser_dir){
|
116
|
+
sh [:racc, 'asn1.y', '--debug'].join(' ')
|
117
|
+
require 'zlib'
|
118
|
+
Zlib::GzipWriter.wrap(open(File::join(upl_dir, 'upl.json.gz'), 'w')){|gz|
|
119
|
+
json_str = `#{['ruby', 'asn1.tab.rb', *upl_files].join(' ')}`
|
120
|
+
puts "generating JSON => #{json_str.gsub(/\s+/, ' ').slice(0, 100)} ... "
|
121
|
+
gz.write json_str
|
122
|
+
}
|
123
|
+
remove_file('asn1.tab.rb')
|
124
|
+
}
|
125
|
+
end
|
126
|
+
|
110
127
|
file "ext/ninja-scan-light/tool" do |t|
|
111
128
|
Rake::Task["git:submodules:init"].invoke
|
112
129
|
end
|
@@ -116,6 +133,6 @@ GitHubChangelogGenerator::RakeTask.new :changelog do |config|
|
|
116
133
|
Dir::glob(File::join(File::dirname(__FILE__), '*.gemspec')).first).homepage
|
117
134
|
config.user = $1
|
118
135
|
config.project = $2
|
119
|
-
end if require 'github_changelog_generator/task'
|
136
|
+
end if (begin; require 'github_changelog_generator/task'; rescue Exception; false; end)
|
120
137
|
|
121
138
|
task :default => ["ext/ninja-scan-light/tool", :compile, :spec]
|
data/exe/gps2ubx
CHANGED
@@ -17,7 +17,8 @@ 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
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
|
+
Ntrip specified in URI as ntrip://(username):(password)@(caster_host):(port)/(mount_point) is also supported, and its format is automatically detected.
|
21
|
+
Assisted GPS by using SUPL (Secure user plane location) is also supported by using supl://(host) URI.
|
21
22
|
__STRING__
|
22
23
|
|
23
24
|
options = []
|
@@ -44,7 +45,10 @@ files.collect!{|fname, ftype|
|
|
44
45
|
when /\.ubx$/; :ubx
|
45
46
|
end
|
46
47
|
if (!(uri = URI::parse(fname)).instance_of?(URI::Generic) rescue false) then
|
47
|
-
ftype ||=
|
48
|
+
ftype ||= case uri
|
49
|
+
when URI::Ntrip; uri.read_format
|
50
|
+
when URI::Supl; :supl
|
51
|
+
end
|
48
52
|
fname = uri
|
49
53
|
end
|
50
54
|
raise "Format cannot be guessed, use --(format, ex. rinex_obs)=#{fname}" unless ftype
|
@@ -69,6 +73,7 @@ rcv = GPS_PVT::Receiver::new(options)
|
|
69
73
|
obs = Queue::new
|
70
74
|
rcv.define_singleton_method(:run){|meas, t_meas, *args|
|
71
75
|
obs << [t_meas, meas]
|
76
|
+
nil
|
72
77
|
}
|
73
78
|
|
74
79
|
proc{|src|
|
@@ -86,22 +91,24 @@ proc{
|
|
86
91
|
}
|
87
92
|
}.call
|
88
93
|
|
89
|
-
# parse RINEX NAV
|
94
|
+
# parse RINEX NAV first
|
90
95
|
files.each{|fname, ftype|
|
91
96
|
case ftype
|
92
97
|
when :rinex_nav; rcv.parse_rinex_nav(fname)
|
93
98
|
end
|
94
99
|
}
|
95
100
|
|
96
|
-
# other files
|
101
|
+
# then, other files
|
97
102
|
threads = files.collect{|fname, ftype|
|
98
103
|
task = case ftype
|
99
104
|
when :ubx; proc{rcv.parse_ubx(fname){}}
|
100
105
|
when :rinex_obs; proc{rcv.parse_rinex_obs(fname){}}
|
101
106
|
when :rtcm3; proc{rcv.parse_rtcm3(fname){}}
|
107
|
+
when :supl; proc{rcv.parse_supl(fname)}
|
108
|
+
when :rinex_nav; proc{}
|
102
109
|
end
|
103
110
|
case fname
|
104
|
-
when URI::Ntrip; Thread::new(&task)
|
111
|
+
when URI::Ntrip, URI::Supl; Thread::new(&task)
|
105
112
|
else; task.call; nil
|
106
113
|
end
|
107
114
|
}.compact
|
data/exe/gps_pvt
CHANGED
@@ -11,11 +11,12 @@ 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
|
-
|
14
|
+
In addition to --rinex_nav, --rinex_obs, --rinex_clk, --ubx, --sp3, --antex, --rtcm3, and --supl 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
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
18
|
Ntrip specified in URI as ntrip://(username):(password)@(caster_host):(port)/(mount_point) is also supported, and its format is automatically detected.
|
19
|
+
Assisted GPS by using SUPL (Secure user plane location) is also supported by using supl://(host) URI.
|
19
20
|
__STRING__
|
20
21
|
|
21
22
|
options = []
|
@@ -78,7 +79,10 @@ files.collect!{|fname, ftype|
|
|
78
79
|
when /\.clk$/; :rinex_clk
|
79
80
|
end
|
80
81
|
if (!(uri = URI::parse(fname)).instance_of?(URI::Generic) rescue false) then
|
81
|
-
ftype ||=
|
82
|
+
ftype ||= case uri
|
83
|
+
when URI::Ntrip; uri.read_format
|
84
|
+
when URI::Supl; :supl
|
85
|
+
end
|
82
86
|
fname = uri
|
83
87
|
end
|
84
88
|
raise "Format cannot be guessed, use --(format, ex. rinex_nav)=#{fname}" unless ftype
|
@@ -137,6 +141,7 @@ files.collect{|fname, ftype|
|
|
137
141
|
when :ubx; Thread::new{rcv.parse_ubx(fname)}
|
138
142
|
when :rinex_obs; Thread::new{rcv.parse_rinex_obs(fname)}
|
139
143
|
when :rtcm3; Thread::new{rcv.parse_rtcm3(fname)}
|
144
|
+
when :supl; Thread::new{rcv.parse_supl(fname)}
|
140
145
|
else; nil
|
141
146
|
end
|
142
147
|
}.compact.each{|th| th.join}
|