gps_pvt 0.3.3 → 0.5.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 +4 -3
- data/Rakefile +2 -0
- data/exe/gps_pvt +37 -5
- data/ext/gps_pvt/GPS/GPS_wrap.cxx +5595 -131
- data/ext/ninja-scan-light/tool/algorithm/integral.h +91 -0
- data/ext/ninja-scan-light/tool/navigation/GLONASS.h +1329 -0
- data/ext/ninja-scan-light/tool/navigation/GLONASS_Solver.h +306 -0
- data/ext/ninja-scan-light/tool/navigation/GPS_Solver_Base.h +7 -0
- data/ext/ninja-scan-light/tool/navigation/RINEX.h +389 -4
- data/ext/ninja-scan-light/tool/swig/GPS.i +217 -6
- data/{sig/gps_pvt.rbs → gps_pvt.rbs} +0 -0
- data/lib/gps_pvt/receiver.rb +68 -16
- data/lib/gps_pvt/util.rb +32 -0
- data/lib/gps_pvt/version.rb +1 -1
- metadata +7 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83dff6013480dd4df4faacde170a901d712a605093fa006d0d4542c58f43ac45
|
4
|
+
data.tar.gz: 33728f6f9c4969f04ed528831e14977f3f90846b0f740ce0644f06de18ac7322
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd13f81c590a85ffeed54fe62dfb45858373cf687b08e5dc37bf45805f54398c50ad71f03e512a28015d214239e189c0581317d703cb4af99f4f9d258d162d12
|
7
|
+
data.tar.gz: 64df6a70a7b02f94e6f94c878ada85bc293871e5478698a5fdc285f77418fd2d27ecf9aece5b42ca197d6a3dc79ab9294f81b06411b83ca008f3428011245b83
|
data/README.md
CHANGED
@@ -32,15 +32,15 @@ An attached executable is useful. After installation, type
|
|
32
32
|
|
33
33
|
$ gps_pvt RINEX_or_UBX_file(s)
|
34
34
|
|
35
|
-
The format of RINEX_or_UBX_file is automatically determined with its
|
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:
|
36
36
|
|
37
37
|
--rinex_nav=filename
|
38
38
|
--rinex_obs=filename
|
39
39
|
--ubx=filename
|
40
40
|
|
41
|
-
|
41
|
+
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
42
|
|
43
|
-
$ gps_pvt --with=137 RINEX_or_UBX_file(s)
|
43
|
+
$ gps_pvt --with=137 --with=GLONASS RINEX_or_UBX_file(s)
|
44
44
|
|
45
45
|
Additionally, the following command options *--key=value* are available.
|
46
46
|
|
@@ -50,6 +50,7 @@ Additionally, the following command options *--key=value* are available.
|
|
50
50
|
| elevation_mask_deg | numeric | satellite elevation mask specified in degrees. *ex) --elevation_mask_deg=10* | v0.3.0 |
|
51
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
52
|
| 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 |
|
53
54
|
|
54
55
|
### For developer
|
55
56
|
|
data/Rakefile
CHANGED
@@ -29,9 +29,11 @@ namespace :git do
|
|
29
29
|
# same as #{repo}/.git/info/sparse-checkout
|
30
30
|
"sparse-checkout set" + (<<-__SPARSE_PATTERNS__).lines.collect{|str| str.chomp.gsub(/^ */, ' ')}.join,
|
31
31
|
/tool/param/
|
32
|
+
/tool/algorithm/integral.h
|
32
33
|
/tool/navigation/GPS*
|
33
34
|
/tool/navigation/SBAS*
|
34
35
|
/tool/navigation/QZSS*
|
36
|
+
/tool/navigation/GLONASS*
|
35
37
|
/tool/navigation/coordinate.h
|
36
38
|
/tool/navigation/EGM.h
|
37
39
|
/tool/navigation/MagneticField.h
|
data/exe/gps_pvt
CHANGED
@@ -1,16 +1,19 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
require 'gps_pvt'
|
4
|
+
require 'uri'
|
4
5
|
|
5
6
|
# runnable quick example to solve PVT by using RINEX NAV/OBS or u-blox ubx
|
6
7
|
|
7
8
|
$stderr.puts <<__STRING__
|
8
9
|
Usage: #{__FILE__} GPS_file1 GPS_file2 ...
|
9
|
-
As GPS_file, rinex_nav(*.YYn, *.YYh, *.YYq), rinex_obs(*.YYo), and ubx(*.ubx) format are currently supported.
|
10
|
+
As GPS_file, rinex_nav(*.YYn, *.YYh, *.YYq, *.YYg), rinex_obs(*.YYo), and ubx(*.ubx) format are currently supported.
|
11
|
+
(YY = last two digit of year)
|
10
12
|
File format is automatically determined based on its extention described in above parentheses.
|
11
13
|
If you want to specify its format manually, --rinex_(nav|obs)=file_name or --ubx=file_name are available.
|
12
14
|
Supported RINEX versions are 2 and 3.
|
13
|
-
|
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.
|
14
17
|
__STRING__
|
15
18
|
|
16
19
|
options = []
|
@@ -54,6 +57,9 @@ options.reject!{|opt|
|
|
54
57
|
end
|
55
58
|
misc_options[opt[0]] = t
|
56
59
|
true
|
60
|
+
when :online_ephemeris
|
61
|
+
misc_options[opt[0]] = opt[1]
|
62
|
+
true
|
57
63
|
else
|
58
64
|
false
|
59
65
|
end
|
@@ -61,19 +67,45 @@ options.reject!{|opt|
|
|
61
67
|
|
62
68
|
# Check file existence and extension
|
63
69
|
files.collect!{|fname, ftype|
|
64
|
-
raise "File not found: #{fname}" unless File::exist?(fname)
|
65
70
|
ftype ||= case fname
|
66
|
-
when /\.\d{2}[
|
67
|
-
when /\.\d{2}o
|
71
|
+
when /\.\d{2}[nhqg](?:\.gz)?$/; :rinex_nav
|
72
|
+
when /\.\d{2}o(?:\.gz)?$/; :rinex_obs
|
68
73
|
when /\.ubx$/; :ubx
|
69
74
|
else
|
70
75
|
raise "Format cannot be guessed, use --(format, ex. rinex_nav)=#{fname}"
|
71
76
|
end
|
77
|
+
fname = proc{
|
78
|
+
next fname if File::exist?(fname)
|
79
|
+
if uri = URI::parse(fname) and !uri.instance_of?(URI::Generic) then
|
80
|
+
next uri
|
81
|
+
end
|
82
|
+
raise "File not found: #{fname}"
|
83
|
+
}.call
|
72
84
|
[fname, ftype]
|
73
85
|
}
|
74
86
|
|
75
87
|
rcv = GPS_PVT::Receiver::new(options)
|
76
88
|
|
89
|
+
proc{|src|
|
90
|
+
next unless src
|
91
|
+
loader = proc{|t_meas|
|
92
|
+
utc = Time::utc(*t_meas.c_tm)
|
93
|
+
y, yday = [:year, :yday].collect{|f| utc.send(f)}
|
94
|
+
uri = URI::parse(
|
95
|
+
"ftp://gssc.esa.int/gnss/data/daily/" +
|
96
|
+
"%04d/brdc/BRDC00IGS_R_%04d%03d0000_01D_MN.rnx.gz"%[y, y, yday])
|
97
|
+
rcv.parse_rinex_nav(uri)
|
98
|
+
uri
|
99
|
+
}
|
100
|
+
run_orig = rcv.method(:run)
|
101
|
+
eph_list = {}
|
102
|
+
rcv.define_singleton_method(:run){|meas, t_meas, *args|
|
103
|
+
w_d = [t_meas.week, (t_meas.seconds.to_i / 86400)]
|
104
|
+
eph_list[w_d] ||= loader.call(t_meas)
|
105
|
+
run_orig.call(meas, t_meas, *args)
|
106
|
+
}
|
107
|
+
}.call(misc_options[:online_ephemeris])
|
108
|
+
|
77
109
|
proc{
|
78
110
|
run_orig = rcv.method(:run)
|
79
111
|
t_start, t_end = [nil, nil]
|