gps_pvt 0.10.0 → 0.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1191,7 +1191,12 @@ GANSSRefTimeInfo ::= SEQUENCE {
1191
1191
  GANSSTOD ::= INTEGER (0 .. 86399)
1192
1192
 
1193
1193
  -- GANSS TOD uncertainty
1194
- GANSSTODUncertainty ::= INTEGER (0 .. 127) -- Coding according to Annex
1194
+ GANSSTODUncertainty ::= INTEGER (0 .. 127) -- Coding according to Annex
1195
+
1196
+ -- GANSS Reference Time Rel-10 Extension:
1197
+ GANSSReferenceTime-R10-Ext ::= SEQUENCE {
1198
+ ganssDayCycleNumber INTEGER(0..7) -- coding according to annex
1199
+ }
1195
1200
 
1196
1201
  -- GANSS TOD-GSM Time association
1197
1202
  GANSSTOD-GSMTimeAssociation ::= SEQUENCE {
Binary file
@@ -26,6 +26,54 @@ ASN1::dig(upl, :ULP, :"ULP-PDU", :message, :msSUPLPOS, :posPayLoad, :rrlpPayload
26
26
  },
27
27
  })
28
28
 
29
+ ASN1::dig(upl, :"MAP-LCS-DataTypes", :"Ext-GeographicalInformation")[:type][1].merge!({
30
+ :hook_decode => proc{
31
+ gen_ut = proc{|c, x| proc{|k| ((x + 1) ** k - 1) * c} }
32
+ tbl_task = {
33
+ :lat => [3, proc{|v| Rational((v & 0x7FFFFF) * 90, 1 << 23).to_f * (((v >> 23) == 1) ? -1 : 1)}],
34
+ :lng => [3, proc{|v| Rational((v >= (1 << 23) ? v - (1 << 24) : v) * 180, 1 << 23).to_f}],
35
+ :ucode => 1,
36
+ :usmaj => [1, gen_ut.call(10, 0.1)],
37
+ :usmin => [1, gen_ut.call(10, 0.1)],
38
+ :omaj => 1,
39
+ :cnf => 1,
40
+ :alt => [2, proc{|v| (v & 0x7FFF) * (((v >> 15) == 1) ? -1 : 1)}],
41
+ :ualt => [1, gen_ut.call(45, 0.025)],
42
+ :irad => [2, proc{|v| v * 5}],
43
+ :urad => [1, gen_ut.call(10, 0.1)],
44
+ :oang => [1, proc{|v| v * 2}],
45
+ :iang => [1, proc{|v| (v + 1) * 2}],
46
+ }
47
+ tbl_item = { # 7.2 Table 2a in 3GPP TS 23.032
48
+ # (a) 7.3.2 Ellipsoid point with uncertainty Circle
49
+ 1 => [8, :lat, :lng, :ucode],
50
+ # (b) 7.3.3 Ellipsoid point with uncertainty Ellipse
51
+ 3 => [11, :lat, :lng, :usmaj, :usmin, :omaj, :cnf],
52
+ # (c) 7.3.6 Ellipsoid point with altitude and uncertainty Ellipsoid
53
+ 9 => [14, :lat, :lng, :alt, :usmaj, :usmin, :omaj, :ualt, :cnf],
54
+ # (d) 7.3.7 Ellipsoid Arc
55
+ 10 => [13, :lat, :lng, :irad, :urad, :oang, :iang, :cnf],
56
+ # (e) 7.3.1 Ellipsoid Point
57
+ 0 => [7, :lat, :lng],
58
+ }
59
+ proc{|data|
60
+ data.define_singleton_method(:decode){
61
+ len, *items = tbl_item[self[0] >> 4]
62
+ next nil unless self.length == len
63
+ offset = 1
64
+ Hash[*(items.collect{|k|
65
+ len2, task = tbl_task[k]
66
+ v = self.slice(offset, len2).inject(0){|res, v2| (res << 8) + v2}
67
+ v = task.call(v) if task
68
+ offset += len2
69
+ [k, v]
70
+ }.flatten(1))]
71
+ }
72
+ data
73
+ }
74
+ }.call,
75
+ })
76
+
29
77
  # LPP payload conversion
30
78
  ASN1::dig(upl, :ULP, :"ULP-PDU", :message, :msSUPLPOS, :posPayLoad, :"ver2-PosPayLoad-extension", :lPPPayload)[:type][1].merge!({
31
79
  :hook_encode => proc{|data|
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GPS_PVT
4
- VERSION = "0.10.0"
4
+ VERSION = "0.10.2"
5
5
 
6
6
  def GPS_PVT.version_compare(a, b)
7
7
  Gem::Version::new(a) <=> Gem::Version::new(b)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gps_pvt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - fenrir(M.Naruoka)
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-03-27 00:00:00.000000000 Z
11
+ date: 2024-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyserial
@@ -174,6 +174,7 @@ files:
174
174
  - lib/gps_pvt/supl.rb
175
175
  - lib/gps_pvt/ubx.rb
176
176
  - lib/gps_pvt/upl/LPP-V17_5_0-Release17.asn
177
+ - lib/gps_pvt/upl/MAP-LCS-DataTypes-V17_4_0-Release17.asn
177
178
  - lib/gps_pvt/upl/RRLP-V17_0_0-Release17.asn
178
179
  - lib/gps_pvt/upl/ULP-V2_0_6-20200720-D.asn
179
180
  - lib/gps_pvt/upl/upl.json.gz