gps_pvt 0.5.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -7
- data/Rakefile +42 -23
- data/exe/gps_pvt +13 -6
- data/ext/gps_pvt/Coordinate/Coordinate_wrap.cxx +44 -0
- data/ext/gps_pvt/GPS/GPS_wrap.cxx +9015 -7695
- data/ext/ninja-scan-light/tool/algorithm/interpolate.h +121 -0
- data/ext/ninja-scan-light/tool/navigation/ANTEX.h +747 -0
- data/ext/ninja-scan-light/tool/navigation/GLONASS.h +37 -35
- data/ext/ninja-scan-light/tool/navigation/GLONASS_Solver.h +16 -13
- data/ext/ninja-scan-light/tool/navigation/GPS.h +121 -29
- data/ext/ninja-scan-light/tool/navigation/GPS_Solver.h +19 -12
- data/ext/ninja-scan-light/tool/navigation/GPS_Solver_Base.h +39 -11
- data/ext/ninja-scan-light/tool/navigation/RINEX.h +40 -171
- data/ext/ninja-scan-light/tool/navigation/SBAS.h +21 -13
- data/ext/ninja-scan-light/tool/navigation/SBAS_Solver.h +19 -16
- data/ext/ninja-scan-light/tool/navigation/SP3.h +1189 -0
- data/ext/ninja-scan-light/tool/navigation/coordinate.h +81 -1
- data/ext/ninja-scan-light/tool/swig/GPS.i +153 -40
- data/ext/ninja-scan-light/tool/swig/spec/GPS_spec.rb +503 -0
- data/ext/ninja-scan-light/tool/util/text_helper.h +248 -0
- data/lib/gps_pvt/receiver.rb +24 -0
- data/lib/gps_pvt/util.rb +25 -7
- data/lib/gps_pvt/version.rb +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a67291f7ea2d3146cace6c9e5f9c3262d89c1bd22534d6c147265c6189089c8
|
4
|
+
data.tar.gz: 211daa142bb6282341367f0ccd375d66a0083e6de01ec7841ac4833795c3a6cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80a279b8018856c9d0d73b311c44efd97ce2794dc12353f10462a1b1b65aedc177ae6284fc324feb1980a02da2c2127ab8649058f840fc8279340f1152af3f62
|
7
|
+
data.tar.gz: ce708fe585b811a99a8e0e42862df7bcac023d44859b17ea08b9e6816425845b5ab0a31b207b79a870ca6d52dc43313b00eb67a5b38746ace843c54264ceca1e
|
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
|
33
|
+
$ gps_pvt file_or_URI(s)
|
34
34
|
|
35
|
-
The format of
|
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
|
-
|
38
|
-
|
39
|
-
|
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
|
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
|
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
|
-
|
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
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
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),
|
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,
|
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
|
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
|
-
|
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);
|