gps_pvt 0.10.1 → 0.10.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dc12b7e4590d91b7afacd099d36852acdde54d11e8418ff0c99386ac17e68ca4
4
- data.tar.gz: f3286d74e35a744a2c451768f8785c259f36f5d6a94d04daaad71857f472429a
3
+ metadata.gz: 291357170b42fbbecccdac288a218cd8a1b0730db5b93e9adb43c4635674a386
4
+ data.tar.gz: 2b7da00981f6a55db29dbfc88083eb6806ea744bbc0cc0b1a97fd2939bc95496
5
5
  SHA512:
6
- metadata.gz: 0611b095f8e2ccb80baa1dc9ba98291b6a5091dcbb14479b64058541260e5ccfd8ee1589aa40fc73393837b638f23633ac3dcfaa8fe23b396c1edfb960d47d75
7
- data.tar.gz: 90731b787b1a62c718a49da481adc87bdedd26d57c207f29d69b35dffb0859bdaf185a6fe739060be68370cf66587feb26ffd18f01a2ed6037900a6c9527e35b
6
+ metadata.gz: bc697b14d15e9ebb4d445e076284c97bf349df98c4f146f4ac96ff1875f1a6c9cac328e26af533a8abca89ae792b6ad70e1ce1172f0e97117c5dc28518105d35
7
+ data.tar.gz: 0536ce452ad85fe1e460e7c6e1dd577c63148505e275a4fa5bcb749d457c7fb80315833151d2aab54bd8f5a92b4b59941d7818d903de676823501d16d0d2a930
data/README.md CHANGED
@@ -172,7 +172,7 @@ Utility to get and dump GPS files. After installation of gps_pvt, to type
172
172
 
173
173
  $ gps_get file_or_URI(s) (options) > output_file
174
174
 
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.
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. It is also noted that supl received data are filtered to its LPP/RRLP content, and printed in JSON format. The following options are available.
176
176
 
177
177
  | key | value | comment | since |
178
178
  ----|----|----|----
@@ -1,3 +1,5 @@
1
+ require 'set'
2
+
1
3
  module GPS_PVT
2
4
  end
3
5
 
@@ -261,10 +263,10 @@ resolve_tree = proc{|root|
261
263
  res
262
264
  }
263
265
 
264
- # This proc is useless because assumed automatic tagging
265
- # does not require to re-order based on manual tags or class numbers
266
+ # This proc is used to re-order for non-automatic tagging transformation
266
267
  # @see https://stackoverflow.com/a/31450137
267
268
  get_universal_class_number = proc{|type|
269
+ # TODO where is CHOICE class number definition?
268
270
  next get_universal_class_number.call(type[1][:root][0][:type]) if type[0] == :CHOICE
269
271
  { # @see Table.1 unless any comment
270
272
  :BOOLEAN => 1,
@@ -274,6 +276,9 @@ resolve_tree = proc{|root|
274
276
  :NULL => 5,
275
277
  :ENUMERATED => 10,
276
278
  :SEQUENCE => 16,
279
+ :SEQUENCE_OF => 16,
280
+ :SET => 17,
281
+ :SET_OF => 17,
277
282
  :NumericString => 18, # @see Table.6
278
283
  :PrintableString => 19, # @see Table.6
279
284
  :IA5String => 22, # @see Table.6
@@ -281,6 +286,23 @@ resolve_tree = proc{|root|
281
286
  :UTCTime => 23, # @see 43.3
282
287
  }[type[0]]
283
288
  }
289
+
290
+ reorder_children = proc{|type_opts|
291
+ # reordering when automatic tagging transformation is not selected
292
+ tags = Set[]
293
+ [type_opts[:root], type_opts[:extension]].compact.each{|items|
294
+ items.collect!{|v|
295
+ tag = v[:type][1][:tag]
296
+ tag_class_num = case tag
297
+ when Array; [{"APPLICATION" => 1, "PRIVATE" => 3}[tag[0]], tag[1]]
298
+ when Integer; [2, tag] # (Context-specific)
299
+ else; [0, get_universal_class_number.call(v[:type])] # UNIVERSAL
300
+ end
301
+ raise unless tags.add?(tag_class_num) # Identical tag is already existed!
302
+ [v, tag_class_num]
303
+ }.sort!{|a, b| a[1] <=> b[1]}.collect!{|v| v[0]}
304
+ }
305
+ }
284
306
 
285
307
  prepare_coding = proc{|tree|
286
308
  next tree.each{|k, v|
@@ -313,7 +335,8 @@ resolve_tree = proc{|root|
313
335
  }
314
336
  when :BIT_STRING, :OCTET_STRING
315
337
  opts[:size_range] = find_range.call(opts, :size)
316
- when :SEQUENCE
338
+ when :SEQUENCE, :SET
339
+ reorder_children.call(opts) if (opts[:automatic_tagging] == false) # only for SET
317
340
  (opts[:root] + (opts[:extension] || [])).each.with_index{|v, i|
318
341
  v[:name] = v[:name] ? v[:name].to_sym : i
319
342
  v[:type][1][:typename] ||= v[:name] if v[:name].kind_of?(Symbol) && v[:type] # for debugger
@@ -325,11 +348,11 @@ resolve_tree = proc{|root|
325
348
  v2[:name]
326
349
  } if v[:group]
327
350
  }
328
- when :SEQUENCE_OF
351
+ when :SEQUENCE_OF, :SET_OF
329
352
  opts[:size_range] = find_range.call(opts, :size)
330
353
  prepare_coding.call(opts)
331
354
  when :CHOICE
332
- # Skip reordering based on automatic tagging assumption
355
+ reorder_children.call(opts) if (opts[:automatic_tagging] == false)
333
356
  opts[:extension] = opts[:extension].collect{|v|
334
357
  v[:group] || [v] # 22. Note says "Version brackets have no effect"
335
358
  }.flatten(1) if opts[:extension]
@@ -372,7 +395,7 @@ generate_skeleton = proc{|tree, data|
372
395
  when :BIT_STRING, :OCTET_STRING
373
396
  data || ({:BIT_STRING => [0], :OCTET_STRING => [0xFF]}[type] \
374
397
  * (opts[:size_range][:root].first rescue 0))
375
- when :SEQUENCE
398
+ when :SEQUENCE, :SET
376
399
  data ||= {}
377
400
  Hash[*((opts[:root] + (opts[:extension] || [])).collect{|v|
378
401
  if v[:group] then
@@ -386,7 +409,7 @@ generate_skeleton = proc{|tree, data|
386
409
  end
387
410
  end
388
411
  }.compact.flatten(2))]
389
- when :SEQUENCE_OF
412
+ when :SEQUENCE_OF, :SET_OF
390
413
  next data.collect{|v| generate_skeleton.call(opts, v)} if data
391
414
  v = Marshal::dump(generate_skeleton.call(opts))
392
415
  (opts[:size_range][:root].first rescue 0).times.collect{
@@ -488,7 +511,7 @@ encode = proc{|tree, data|
488
511
  end
489
512
  end
490
513
  res += data.collect{|v| "%0#{bits}b"%[v]}.join
491
- when :SEQUENCE
514
+ when :SEQUENCE, :SET
492
515
  opt_def_flags, root_encoded = opts[:root].collect{|v| # 18.2
493
516
  has_elm = data.include?(v[:name])
494
517
  elm = data[v[:name]]
@@ -532,7 +555,7 @@ encode = proc{|tree, data|
532
555
  end
533
556
 
534
557
  "#{ext_bit}#{opt_def_flags.join}#{root_encoded.join}#{ext_encoded}"
535
- when :SEQUENCE_OF
558
+ when :SEQUENCE_OF, :SET_OF
536
559
  ext_bit, len_enc = case (cat = opts[:size_range].belong_to(data.size))
537
560
  when :additional
538
561
  # 19.4 -> 10.9.4.2(semi_constrained_whole_number)
@@ -691,7 +714,7 @@ decode = proc{|tree, str|
691
714
  end
692
715
  end
693
716
  str.slice!(0, bits * len).scan(/.{#{bits}}/).collect{|chunk| chunk.to_i(2)}
694
- when :SEQUENCE
717
+ when :SEQUENCE, :SET
695
718
  has_extension = (opts[:extension] && (str.slice!(0) == '1'))
696
719
  data = Hash[*(
697
720
  opts[:root].collect{|v| [v[:name], v[:default]] if v[:default]}.compact.flatten(1)
@@ -709,7 +732,7 @@ decode = proc{|tree, str|
709
732
  v[:group] ? decoded.to_a : [[v[:name], decoded]]
710
733
  }.compact.flatten(2))]) if has_extension
711
734
  data
712
- when :SEQUENCE_OF
735
+ when :SEQUENCE_OF, :SET_OF
713
736
  len_dec = if opts[:size_range][:additional] && (str.slice!(0) == '1') then
714
737
  # 19.4 -> 10.9.4.2(semi_constrained_whole_number)
715
738
  :length_otherwise
@@ -46,10 +46,10 @@ rule
46
46
  DefinitiveNameAndNumberForm : identifier LCBRACE DefinitiveNumberForm RCBRACE
47
47
 
48
48
  TagDefault :
49
- EXPLICIT TAGS {raise} # not supported
50
- | IMPLICIT TAGS {raise} # not supported
51
- | AUTOMATIC TAGS
52
- | {raise} # not supported
49
+ EXPLICIT TAGS {@tags = val[0]}
50
+ | IMPLICIT TAGS {@tags = val[0]}
51
+ | AUTOMATIC TAGS {@tags = val[0]} # 12.3
52
+ | {@tags = :EXPLICIT} # 12.2
53
53
 
54
54
  ExtensionDefault :
55
55
  EXTENSIBILITY IMPLIED
@@ -179,8 +179,8 @@ rule
179
179
  #| RelativeOIDType
180
180
  | SequenceType
181
181
  | SequenceOfType
182
- #| SetType
183
- #| SetOfType
182
+ | SetType
183
+ | SetOfType
184
184
  | TaggedType
185
185
  | UTCTime # 43. Universal time
186
186
 
@@ -199,32 +199,34 @@ rule
199
199
  | ObjectClassFieldValue
200
200
 
201
201
  BuiltinValue : # 16.9
202
- BitStringValue
203
- | BooleanValue
204
- | CharacterStringValue
205
- | ChoiceValue
202
+ BitStringValue # String, Array, Hash (possible returned value, same below)
203
+ | BooleanValue # true/false
204
+ | CharacterStringValue # String, Array, Hash
205
+ | ChoiceValue # Hash
206
206
  #| EmbeddedPDVValue
207
- | EnumeratedValue
207
+ | EnumeratedValue # String
208
208
  #| ExternalValue
209
209
  #| InstanceOfValue
210
- | IntegerValue
211
- | NullValue
212
- | ObjectIdentifierValue
213
- | OctetStringValue
214
- | RealValue
210
+ | IntegerValue # Number, String
211
+ | NullValue # nil
212
+ | ObjectIdentifierValue # Array
213
+ | OctetStringValue # String, Hash
214
+ | RealValue # Number, Hash(M * B^E), String([PLUS|MINUS]_INFINITY)
215
215
  #| RelativeOIDValue
216
- | SequenceValue
217
- | SequenceOfValue
218
- #| SetValue
219
- #| SetOfValue
216
+ | SequenceValue # Hash
217
+ | SequenceOfValue # Array, Hash
218
+ | SetValue # Hash
219
+ | SetOfValue # Array, Hash
220
220
  #| TaggedValue
221
221
 
222
222
  #ReferencedValue : DefinedValue | ValueFromObject # 16.11
223
223
  #ReferencedValue : identifier
224
224
 
225
+ NamedValue : identifier Value {result = {val[0] => val[1]}} # 16.13
226
+
225
227
  # 17. Notation for the boolean type
226
228
  BooleanType : BOOLEAN
227
- BooleanValue : TRUE | FALSE
229
+ BooleanValue : TRUE {result = true} | FALSE {result = false}
228
230
 
229
231
  # 18. Notation for the integer type
230
232
  IntegerType :
@@ -240,7 +242,7 @@ rule
240
242
  number
241
243
  | MINUS number {result = -val[1]}
242
244
 
243
- IntegerValue :
245
+ IntegerValue : # returning Number or String
244
246
  SignedNumber
245
247
  | identifier
246
248
 
@@ -299,13 +301,13 @@ rule
299
301
  # 20. Notation for the real type
300
302
  RealType : REAL
301
303
 
302
- RealValue :
304
+ RealValue : # returning Number, Hash (M * B^E) or String ([PLUS|MINUS]_INFINITY)
303
305
  NumericRealValue
304
306
  | SpecialRealValue
305
307
  NumericRealValue :
306
308
  realnumber
307
- | MINUS realnumber
308
- | SequenceValue
309
+ | MINUS realnumber {result = -val[1]}
310
+ | SequenceValue # 20.3 in M * B^E format
309
311
  SpecialRealValue : PLUS_INFINITY | MINUS_INFINITY
310
312
 
311
313
  # 21. Notation for the bitstring
@@ -319,22 +321,22 @@ rule
319
321
  identifier LCBRACE number RCBRACE {result = {val[0] => val[2]}}
320
322
  | identifier LCBRACE DefinedValue RCBRACE {result = {val[0] => val[2]}}
321
323
 
322
- BitStringValue :
324
+ BitStringValue : # returning String, Array or Hash
323
325
  bstring
324
326
  | hstring
325
- | LBRACE IdentifierList RBRACE
326
- | LBRACE RBRACE
327
- | CONTAINING Value
327
+ | LBRACE IdentifierList RBRACE {result = val[1]}
328
+ | LBRACE RBRACE {result = []}
329
+ | CONTAINING Value {result = {:containing => val[1]}}
328
330
  IdentifierList :
329
- identifier
330
- | IdentifierList COMMA identifier
331
+ identifier {result = [val[0]]}
332
+ | IdentifierList COMMA identifier {result << val[2]}
331
333
 
332
334
  # 22. Notation for the octetstring type
333
335
  OctetStringType : OCTET STRING {result = {:type => :OCTET_STRING}}
334
- OctetStringValue :
336
+ OctetStringValue : # returning String or Hash
335
337
  bstring
336
338
  | hstring
337
- | CONTAINING Value
339
+ | CONTAINING Value {result = {:containing => val[1]}}
338
340
 
339
341
  # 23. Notation for the null type
340
342
  NullType : NULL
@@ -409,12 +411,12 @@ rule
409
411
  | NamedType DEFAULT Value {result = val[0].merge({:default => val[2]})}
410
412
  | COMPONENTS OF Type {result = val[2]; raise} /* TODO 24.4 says only root components of SEQUENCE are included */
411
413
 
412
- SequenceValue :
413
- LBRACE ComponentValueList RBRACE
414
- | LBRACE RBRACE
414
+ SequenceValue : # returning Hash
415
+ LBRACE ComponentValueList RBRACE {result = val[1]}
416
+ | LBRACE RBRACE {result = {}}
415
417
  ComponentValueList :
416
- NamedValue
417
- | ComponentValueList COMMA NamedValue
418
+ NamedValue {result = val[0]}
419
+ | ComponentValueList COMMA NamedValue {result = val[0].merge(val[2])}
418
420
 
419
421
  # 25 Notation for sequence-of types
420
422
  SequenceOfType :
@@ -423,19 +425,50 @@ rule
423
425
  }
424
426
  SequenceOfType_t : Type | NamedType
425
427
 
426
- SequenceOfValue :
427
- LBRACE ValueList RBRACE
428
- | LBRACE NamedValueList RBRACE
429
- | LBRACE RBRACE
428
+ SequenceOfValue : # returning Array or Hash
429
+ LBRACE ValueList RBRACE {result = val[1]}
430
+ | LBRACE NamedValueList RBRACE {result = val[1]}
431
+ | LBRACE RBRACE {result = {}}
430
432
  ValueList :
431
- Value
432
- | ValueList COMMA Value
433
+ Value {result = [val[0]]}
434
+ | ValueList COMMA Value {result << val[2]}
433
435
  NamedValueList :
434
- NamedValue
435
- | NamedValueList COMMA NamedValue
436
+ NamedValue {result = val[0]}
437
+ | NamedValueList COMMA NamedValue {result = val[0].merge(val[2])}
438
+
439
+ # 26. Notation for set types
440
+ SetType :
441
+ /*SET LBRACE RBRACE
442
+ | SET LBRACE ExtensionAndException OptionalExtensionMarker RBRACE
443
+ |*/ SET LBRACE ComponentTypeLists RBRACE {
444
+ # 26.3
445
+ val[2].merge!({:automatic_tagging => false}) \
446
+ if (@tags != :AUTOMATIC) \
447
+ || (val[2][:root] + (val[2][:extension] || [])).any?{|v|
448
+ v[:type][1][:tag] rescue false
449
+ }
450
+ result = {:type => [val[0], val[2]]}
451
+ }
452
+
453
+ SetValue : SequenceValue # returning Hash
454
+
455
+ # 27. Notation for set-of types
456
+ SetOfType :
457
+ SET OF SetOfType_t {
458
+ result = {:type => ["#{val[0]}_#{val[1]}".to_sym, val[2]]}
459
+ }
460
+ SetOfType_t : Type | NamedType
461
+
462
+ SetOfValue : SequenceOfValue # returning Array or Hash
436
463
 
437
464
  # 28. Notation for choice types
438
465
  ChoiceType : CHOICE LBRACE AlternativeTypeLists RBRACE {
466
+ # 28.2
467
+ val[2].merge!({:automatic_tagging => false}) \
468
+ if (@tags != :AUTOMATIC) \
469
+ || (val[2][:root] + (val[2][:extension] || [])).any?{|v|
470
+ v[:type][1][:tag] rescue false
471
+ }
439
472
  result = {:type => [val[0], val[2]]}
440
473
  }
441
474
  /*
@@ -472,14 +505,30 @@ rule
472
505
  NamedType {result = [val[0]]}
473
506
  | AlternativeTypeList COMMA NamedType {result << val[2]}
474
507
 
475
- ChoiceValue : identifier COLON Value
508
+ ChoiceValue : # returning Hash
509
+ identifier COLON Value {result = {val[0] => val[2]}}
476
510
 
477
511
  # 30. Notation for tagged types
478
- TaggedType :
512
+ /*TaggedType :
479
513
  Tag Type
480
514
  | Tag IMPLICIT Type
481
- | Tag EXPLICIT Type
482
- Tag : LBRACKET Class ClassNumber RBRACKET
515
+ | Tag EXPLICIT Type*/
516
+ TaggedType :
517
+ Tag TaggingConstruction Type {
518
+ result = val[2] # => {} having :type or :typeref keys
519
+ result[:type] = [result[:type]].flatten(1)
520
+ (result[:type][1] ||= {}).merge!({:tag => val[0]})
521
+ # TODO 30.6 c) to check whether Type is an untagged CHOICE after extraction of ReferencedType
522
+ result[:type][1].merge!({:tag_cnstr => val[1]}) if val[1]
523
+ }
524
+ TaggingConstruction :
525
+ IMPLICIT {result = nil}
526
+ | EXPLICIT # 30.6 a)
527
+ | {result = :EXPLICIT if @tags == :EXPLICIT} # 30.6 b)
528
+ Tag :
529
+ LBRACKET Class ClassNumber RBRACKET
530
+ {result = val[1] ? val[1..2] : val[2]}
531
+ # if class specified, array is returned; otherwise, integer.
483
532
  ClassNumber :
484
533
  number
485
534
  | DefinedValue
@@ -494,12 +543,12 @@ rule
494
543
  # 31. Notation for the object identifier type
495
544
  ObjectIdentifierType : OBJECT IDENTIFIER
496
545
 
497
- ObjectIdentifierValue :
498
- LBRACE ObjIdComponentsList RBRACE
499
- | LBRACKET DefinedValue ObjIdComponentsList RBRACKET
546
+ ObjectIdentifierValue : # returning Array
547
+ LBRACE ObjIdComponentsList RBRACE {result = val[1]}
548
+ | LBRACKET DefinedValue ObjIdComponentsList RBRACKET {result = [val[1]] + val[2]}
500
549
  ObjIdComponentsList :
501
- ObjIdComponents
502
- | ObjIdComponentsList ObjIdComponents
550
+ ObjIdComponents {result = [val[0]]}
551
+ | ObjIdComponentsList ObjIdComponents {result << val[1]}
503
552
  ObjIdComponents :
504
553
  NameForm
505
554
  | NumberForm
@@ -509,13 +558,13 @@ rule
509
558
  NumberForm :
510
559
  number
511
560
  | DefinedValue
512
- NameAndNumberForm : identifier LCBRACE NumberForm RCBRACE
561
+ NameAndNumberForm : identifier LCBRACE NumberForm RCBRACE {result = val.values_at(0, 2)}
513
562
 
514
563
  # 36. Notation for character string types
515
564
  CharacterStringType :
516
565
  RestrictedCharacterStringType
517
566
  | UnrestrictedCharacterStringType
518
- CharacterStringValue :
567
+ CharacterStringValue : # returning String, Array or Hash
519
568
  RestrictedCharacterStringValue
520
569
  | UnrestrictedCharacterStringValue
521
570
 
@@ -535,26 +584,26 @@ rule
535
584
  | VideotexString*/
536
585
  | VisibleString
537
586
 
538
- RestrictedCharacterStringValue :
587
+ RestrictedCharacterStringValue : # returning String or Array
539
588
  cstring
540
589
  | CharacterStringList
541
590
  | Quadruple
542
591
  | Tuple
543
- CharacterStringList : LBRACE CharSyms RBRACE
592
+ CharacterStringList : LBRACE CharSyms RBRACE {result = val[1]}
544
593
  CharSyms :
545
- CharsDefn
546
- | CharSyms COMMA CharsDefn
594
+ CharsDefn {result = [val[0]]}
595
+ | CharSyms COMMA CharsDefn {result << val[2]}
547
596
  CharsDefn :
548
597
  cstring
549
598
  | Quadruple
550
599
  | Tuple
551
600
  | DefinedValue
552
- Quadruple : LBRACE Group COMMA Plane COMMA Row COMMA Cell RBRACE
601
+ Quadruple : LBRACE Group COMMA Plane COMMA Row COMMA Cell RBRACE {result = val.values_at(1, 3, 5, 7)}
553
602
  Group : number
554
603
  Plane : number
555
604
  Row : number
556
605
  Cell : number
557
- Tuple : LBRACE TableColumn COMMA TableRow RBRACE
606
+ Tuple : LBRACE TableColumn COMMA TableRow RBRACE {result = val.values_at(1, 3)}
558
607
  TableColumn : number
559
608
  TableRow : number
560
609
 
@@ -0,0 +1,740 @@
1
+ MAP-LCS-DataTypes {
2
+ itu-t identified-organization (4) etsi (0) mobileDomain (0)
3
+ gsm-Network (1) modules (3) map-LCS-DataTypes (25) version20 (20)}
4
+
5
+ DEFINITIONS
6
+ IMPLICIT TAGS
7
+ ::=
8
+ BEGIN
9
+
10
+ EXPORTS
11
+ RoutingInfoForLCS-Arg,
12
+ RoutingInfoForLCS-Res,
13
+ ProvideSubscriberLocation-Arg,
14
+ ProvideSubscriberLocation-Res,
15
+ SubscriberLocationReport-Arg,
16
+ SubscriberLocationReport-Res,
17
+ LocationType,
18
+ DeferredLocationEventType,
19
+ LCSClientName,
20
+ LCS-QoS,
21
+ Horizontal-Accuracy,
22
+ ResponseTime,
23
+ Ext-GeographicalInformation,
24
+ VelocityEstimate,
25
+ SupportedGADShapes,
26
+ Add-GeographicalInformation,
27
+ LCSRequestorID,
28
+ LCS-ReferenceNumber,
29
+ LCSCodeword,
30
+ AreaEventInfo,
31
+ ReportingPLMNList,
32
+ PeriodicLDRInfo,
33
+ SequenceNumber,
34
+ LCSClientType,
35
+ LCS-Priority,
36
+ OccurrenceInfo,
37
+ IntervalTime
38
+ ;
39
+
40
+ IMPORTS
41
+ AddressString,
42
+ ISDN-AddressString,
43
+ IMEI,
44
+ IMSI,
45
+ LMSI,
46
+ SubscriberIdentity,
47
+ AgeOfLocationInformation,
48
+ LCSClientExternalID,
49
+ LCSClientInternalID,
50
+ LCSServiceTypeID,
51
+ CellGlobalIdOrServiceAreaIdOrLAI,
52
+ PLMN-Id,
53
+ GSN-Address,
54
+ DiameterIdentity
55
+ FROM MAP-CommonDataTypes {
56
+ itu-t identified-organization (4) etsi (0) mobileDomain (0)
57
+ gsm-Network (1) modules (3) map-CommonDataTypes (18) version20 (20)}
58
+
59
+ ExtensionContainer,
60
+ SLR-ArgExtensionContainer
61
+ FROM MAP-ExtensionDataTypes {
62
+ itu-t identified-organization (4) etsi (0) mobileDomain (0)
63
+ gsm-Network (1) modules (3) map-ExtensionDataTypes (21) version20 (20)}
64
+
65
+ USSD-DataCodingScheme,
66
+ USSD-String
67
+ FROM MAP-SS-DataTypes {
68
+ itu-t identified-organization (4) etsi (0) mobileDomain (0) gsm-Network (1) modules (3)
69
+ map-SS-DataTypes (14) version20 (20)}
70
+
71
+ APN,
72
+ SupportedLCS-CapabilitySets
73
+ FROM MAP-MS-DataTypes {
74
+ itu-t identified-organization (4) etsi (0) mobileDomain (0)
75
+ gsm-Network (1) modules (3) map-MS-DataTypes (11) version20 (20)}
76
+
77
+ Additional-Number
78
+ FROM MAP-SM-DataTypes {
79
+ itu-t identified-organization (4) etsi (0) mobileDomain (0)
80
+ gsm-Network (1) modules (3) map-SM-DataTypes (16) version20 (20)}
81
+ ;
82
+
83
+
84
+ RoutingInfoForLCS-Arg ::= SEQUENCE {
85
+ mlcNumber [0] ISDN-AddressString,
86
+ targetMS [1] SubscriberIdentity,
87
+ extensionContainer [2] ExtensionContainer OPTIONAL,
88
+ ...}
89
+
90
+ RoutingInfoForLCS-Res ::= SEQUENCE {
91
+ targetMS [0] SubscriberIdentity,
92
+ lcsLocationInfo [1] LCSLocationInfo,
93
+ extensionContainer [2] ExtensionContainer OPTIONAL,
94
+ ...,
95
+ v-gmlc-Address [3] GSN-Address OPTIONAL,
96
+ h-gmlc-Address [4] GSN-Address OPTIONAL,
97
+ ppr-Address [5] GSN-Address OPTIONAL,
98
+ additional-v-gmlc-Address [6] GSN-Address OPTIONAL }
99
+
100
+ LCSLocationInfo ::= SEQUENCE {
101
+ networkNode-Number ISDN-AddressString,
102
+ -- NetworkNode-number can be msc-number, sgsn-number or a dummy value of "0"
103
+ lmsi [0] LMSI OPTIONAL,
104
+ extensionContainer [1] ExtensionContainer OPTIONAL,
105
+ ... ,
106
+ gprsNodeIndicator [2] NULL OPTIONAL,
107
+ -- gprsNodeIndicator is set only if the SGSN number is sent as the Network Node Number
108
+ additional-Number [3] Additional-Number OPTIONAL,
109
+ supportedLCS-CapabilitySets [4] SupportedLCS-CapabilitySets OPTIONAL,
110
+ additional-LCS-CapabilitySets [5] SupportedLCS-CapabilitySets OPTIONAL,
111
+ mme-Name [6] DiameterIdentity OPTIONAL,
112
+ aaa-Server-Name [8] DiameterIdentity OPTIONAL,
113
+ sgsn-Name [9] DiameterIdentity OPTIONAL,
114
+ sgsn-Realm [10] DiameterIdentity OPTIONAL
115
+ }
116
+
117
+ ProvideSubscriberLocation-Arg ::= SEQUENCE {
118
+ locationType LocationType,
119
+ mlc-Number ISDN-AddressString,
120
+ lcs-ClientID [0] LCS-ClientID OPTIONAL,
121
+ privacyOverride [1] NULL OPTIONAL,
122
+ imsi [2] IMSI OPTIONAL,
123
+ msisdn [3] ISDN-AddressString OPTIONAL,
124
+ lmsi [4] LMSI OPTIONAL,
125
+ imei [5] IMEI OPTIONAL,
126
+ lcs-Priority [6] LCS-Priority OPTIONAL,
127
+ lcs-QoS [7] LCS-QoS OPTIONAL,
128
+ extensionContainer [8] ExtensionContainer OPTIONAL,
129
+ ... ,
130
+ supportedGADShapes [9] SupportedGADShapes OPTIONAL,
131
+ lcs-ReferenceNumber [10] LCS-ReferenceNumber OPTIONAL,
132
+ lcsServiceTypeID [11] LCSServiceTypeID OPTIONAL,
133
+ lcsCodeword [12] LCSCodeword OPTIONAL,
134
+ lcs-PrivacyCheck [13] LCS-PrivacyCheck OPTIONAL,
135
+ areaEventInfo [14] AreaEventInfo OPTIONAL,
136
+ h-gmlc-Address [15] GSN-Address OPTIONAL,
137
+ mo-lrShortCircuitIndicator [16] NULL OPTIONAL,
138
+ periodicLDRInfo [17] PeriodicLDRInfo OPTIONAL,
139
+ reportingPLMNList [18] ReportingPLMNList OPTIONAL }
140
+
141
+ -- one of imsi or msisdn is mandatory
142
+ -- If a location estimate type indicates activate deferred location or cancel deferred
143
+ -- location, a lcs-Reference number shall be included.
144
+
145
+ LocationType ::= SEQUENCE {
146
+ locationEstimateType [0] LocationEstimateType,
147
+ ...,
148
+ deferredLocationEventType [1] DeferredLocationEventType OPTIONAL }
149
+
150
+ LocationEstimateType ::= ENUMERATED {
151
+ currentLocation (0),
152
+ currentOrLastKnownLocation (1),
153
+ initialLocation (2),
154
+ ...,
155
+ activateDeferredLocation (3),
156
+ cancelDeferredLocation (4) ,
157
+ notificationVerificationOnly (5) }
158
+ -- exception handling:
159
+ -- a ProvideSubscriberLocation-Arg containing an unrecognized LocationEstimateType
160
+ -- shall be rejected by the receiver with a return error cause of unexpected data value
161
+
162
+ DeferredLocationEventType ::= BIT STRING {
163
+ msAvailable (0) ,
164
+ enteringIntoArea (1),
165
+ leavingFromArea (2),
166
+ beingInsideArea (3) ,
167
+ periodicLDR (4) } (SIZE (1..16))
168
+ -- beingInsideArea is always treated as oneTimeEvent regardless of the possible value
169
+ -- of occurrenceInfo inside areaEventInfo.
170
+ -- exception handling:
171
+ -- a ProvideSubscriberLocation-Arg containing other values than listed above in
172
+ -- DeferredLocationEventType shall be rejected by the receiver with a return error cause of
173
+ -- unexpected data value.
174
+
175
+ LCS-ClientID ::= SEQUENCE {
176
+ lcsClientType [0] LCSClientType,
177
+ lcsClientExternalID [1] LCSClientExternalID OPTIONAL,
178
+ lcsClientDialedByMS [2] AddressString OPTIONAL,
179
+ lcsClientInternalID [3] LCSClientInternalID OPTIONAL,
180
+ lcsClientName [4] LCSClientName OPTIONAL,
181
+ ...,
182
+ lcsAPN [5] APN OPTIONAL,
183
+ lcsRequestorID [6] LCSRequestorID OPTIONAL }
184
+
185
+ LCSClientType ::= ENUMERATED {
186
+ emergencyServices (0),
187
+ valueAddedServices (1),
188
+ plmnOperatorServices (2),
189
+ lawfulInterceptServices (3),
190
+ ... }
191
+ -- exceptionhandling:
192
+ -- unrecognized values may be ignored if the LCS client uses the privacy override
193
+ -- otherwise, an unrecognized value shall be treated as unexpected data by a receiver
194
+ -- a return error shall then be returned if received in a MAP invoke
195
+
196
+ LCSClientName ::= SEQUENCE {
197
+ dataCodingScheme [0] USSD-DataCodingScheme,
198
+ nameString [2] NameString,
199
+ ...,
200
+ lcs-FormatIndicator [3] LCS-FormatIndicator OPTIONAL }
201
+
202
+ -- The USSD-DataCodingScheme shall indicate use of the default alphabet through the
203
+ -- following encoding
204
+ -- bit 7 6 5 4 3 2 1 0
205
+ -- 0 0 0 0 1 1 1 1
206
+
207
+ NameString ::= USSD-String (SIZE (1..maxNameStringLength))
208
+
209
+ maxNameStringLength INTEGER ::= 63
210
+
211
+ LCSRequestorID ::= SEQUENCE {
212
+ dataCodingScheme [0] USSD-DataCodingScheme,
213
+ requestorIDString [1] RequestorIDString,
214
+ ...,
215
+ lcs-FormatIndicator [2] LCS-FormatIndicator OPTIONAL }
216
+
217
+ RequestorIDString ::= USSD-String (SIZE (1..maxRequestorIDStringLength))
218
+
219
+ maxRequestorIDStringLength INTEGER ::= 63
220
+
221
+ LCS-FormatIndicator ::= ENUMERATED {
222
+ logicalName (0),
223
+ e-mailAddress (1),
224
+ msisdn (2),
225
+ url (3),
226
+ sipUrl (4),
227
+ ... }
228
+
229
+ LCS-Priority ::= OCTET STRING (SIZE (1))
230
+ -- 0 = highest priority
231
+ -- 1 = normal priority
232
+ -- all other values treated as 1
233
+
234
+ LCS-QoS ::= SEQUENCE {
235
+ horizontal-accuracy [0] Horizontal-Accuracy OPTIONAL,
236
+ verticalCoordinateRequest [1] NULL OPTIONAL,
237
+ vertical-accuracy [2] Vertical-Accuracy OPTIONAL,
238
+ responseTime [3] ResponseTime OPTIONAL,
239
+ extensionContainer [4] ExtensionContainer OPTIONAL,
240
+ ...,
241
+ velocityRequest [5] NULL OPTIONAL,
242
+ lcs-qos-class [6] LCS-QoS-Class OPTIONAL
243
+ }
244
+ -- lcs-qos-class may only be included in MO-LR request sent by the UE to the network.
245
+
246
+
247
+ Horizontal-Accuracy ::= OCTET STRING (SIZE (1))
248
+ -- bit 8 = 0
249
+ -- bits 7-1 = 7 bit Uncertainty Code defined in 3GPP TS 23.032. The horizontal location
250
+ -- error should be less than the error indicated by the uncertainty code with 67%
251
+ -- confidence.
252
+
253
+ Vertical-Accuracy ::= OCTET STRING (SIZE (1))
254
+ -- bit 8 = 0
255
+ -- bits 7-1 = 7 bit Vertical Uncertainty Code defined in 3GPP TS 23.032.
256
+ -- The vertical location error should be less than the error indicated
257
+ -- by the uncertainty code with 67% confidence.
258
+
259
+ ResponseTime ::= SEQUENCE {
260
+ responseTimeCategory ResponseTimeCategory,
261
+ ...}
262
+ -- note: an expandable SEQUENCE simplifies later addition of a numeric response time.
263
+
264
+ ResponseTimeCategory ::= ENUMERATED {
265
+ lowdelay (0),
266
+ delaytolerant (1),
267
+ ... }
268
+ -- exception handling:
269
+ -- an unrecognized value shall be treated the same as value 1 (delaytolerant)
270
+
271
+ LCS-QoS-Class ::= ENUMERATED {
272
+ bestEffort (0),
273
+ assured (1),
274
+ ... }
275
+ -- exception handling:
276
+ -- an unrecognized value shall be treated the same as value 0 (bestEffort)
277
+
278
+ SupportedGADShapes ::= BIT STRING {
279
+ ellipsoidPoint (0),
280
+ ellipsoidPointWithUncertaintyCircle (1),
281
+ ellipsoidPointWithUncertaintyEllipse (2),
282
+ polygon (3),
283
+ ellipsoidPointWithAltitude (4),
284
+ ellipsoidPointWithAltitudeAndUncertaintyElipsoid (5),
285
+ ellipsoidArc (6) } (SIZE (7..16))
286
+ -- A node shall mark in the BIT STRING all Shapes defined in 3GPP TS 23.032 it supports.
287
+ -- exception handling: bits 7 to 15 shall be ignored if received.
288
+
289
+ LCS-ReferenceNumber::= OCTET STRING (SIZE(1))
290
+
291
+ LCSCodeword ::= SEQUENCE {
292
+ dataCodingScheme [0] USSD-DataCodingScheme,
293
+ lcsCodewordString [1] LCSCodewordString,
294
+ ...}
295
+
296
+ LCSCodewordString ::= USSD-String (SIZE (1..maxLCSCodewordStringLength))
297
+
298
+ maxLCSCodewordStringLength INTEGER ::= 20
299
+
300
+ LCS-PrivacyCheck ::= SEQUENCE {
301
+ callSessionUnrelated [0] PrivacyCheckRelatedAction,
302
+ callSessionRelated [1] PrivacyCheckRelatedAction OPTIONAL,
303
+ ...}
304
+
305
+ PrivacyCheckRelatedAction ::= ENUMERATED {
306
+ allowedWithoutNotification (0),
307
+ allowedWithNotification (1),
308
+ allowedIfNoResponse (2),
309
+ restrictedIfNoResponse (3),
310
+ notAllowed (4),
311
+ ...}
312
+ -- exception handling:
313
+ -- a ProvideSubscriberLocation-Arg containing an unrecognized PrivacyCheckRelatedAction
314
+ -- shall be rejected by the receiver with a return error cause of unexpected data value
315
+
316
+ AreaEventInfo ::= SEQUENCE {
317
+ areaDefinition [0] AreaDefinition,
318
+ occurrenceInfo [1] OccurrenceInfo OPTIONAL,
319
+ intervalTime [2] IntervalTime OPTIONAL,
320
+ ...}
321
+
322
+ AreaDefinition ::= SEQUENCE {
323
+ areaList [0] AreaList,
324
+ ...}
325
+
326
+ AreaList ::= SEQUENCE SIZE (1..maxNumOfAreas) OF Area
327
+
328
+ maxNumOfAreas INTEGER ::= 10
329
+
330
+ Area ::= SEQUENCE {
331
+ areaType [0] AreaType,
332
+ areaIdentification [1] AreaIdentification,
333
+ ...}
334
+
335
+ AreaType ::= ENUMERATED {
336
+ countryCode (0),
337
+ plmnId (1),
338
+ locationAreaId (2),
339
+ routingAreaId (3),
340
+ cellGlobalId (4),
341
+ ...,
342
+ utranCellId (5) }
343
+
344
+ AreaIdentification ::= OCTET STRING (SIZE (2..7))
345
+ -- The internal structure is defined as follows:
346
+ -- octet 1 bits 4321 Mobile Country Code 1st digit
347
+ -- bits 8765 Mobile Country Code 2nd digit
348
+ -- octet 2 bits 4321 Mobile Country Code 3rd digit
349
+ -- bits 8765 Mobile Network Code 3rd digit if 3 digit MNC included
350
+ -- or filler (1111)
351
+ -- octet 3 bits 4321 Mobile Network Code 1st digit
352
+ -- bits 8765 Mobile Network Code 2nd digit
353
+ -- octets 4 and 5 Location Area Code (LAC) for Local Area Id,
354
+ -- Routing Area Id and Cell Global Id
355
+ -- octet 6 Routing Area Code (RAC) for Routing Area Id
356
+ -- octets 6 and 7 Cell Identity (CI) for Cell Global Id
357
+ -- octets 4 until 7 Utran Cell Identity (UC-Id) for Utran Cell Id
358
+
359
+ OccurrenceInfo ::= ENUMERATED {
360
+ oneTimeEvent (0),
361
+ multipleTimeEvent (1),
362
+ ...}
363
+
364
+ IntervalTime ::= INTEGER (1..32767)
365
+ -- minimum interval time between area reports in seconds
366
+
367
+ PeriodicLDRInfo ::= SEQUENCE {
368
+ reportingAmount ReportingAmount,
369
+ reportingInterval ReportingInterval,
370
+ ...,
371
+ reportingOptionMilliseconds [0] ReportingOptionMilliseconds OPTIONAL
372
+ }
373
+ -- reportingInterval x reportingAmount shall not exceed 8639999 (99 days, 23 hours,
374
+ -- 59 minutes and 59 seconds) for compatibility with OMA MLP and RLP
375
+ -- When reportingOptionMilliseconds is provided and supported, reportingInterval &
376
+ -- reportingAmount shall be ignored.
377
+
378
+ ReportingAmount ::= INTEGER (1..maxReportingAmount)
379
+
380
+ maxReportingAmount INTEGER ::= 8639999
381
+
382
+ ReportingInterval ::= INTEGER (1..maxReportingInterval)
383
+ -- ReportingInterval is in seconds
384
+
385
+ maxReportingInterval INTEGER ::= 8639999
386
+
387
+ ReportingOptionMilliseconds ::= SEQUENCE {
388
+ reportingAmountMilliseconds ReportingAmountMilliseconds,
389
+ reportingIntervalMilliseconds ReportingIntervalMilliseconds,
390
+ ...}
391
+ -- reportingAmountMilliseconds x reportingIntervalMilliseconds shall not exceed 8639999000
392
+ -- (99 days, 23 hours, 59 minutes and 59 seconds) for compatibility with OMA MLP and RLP
393
+
394
+ ReportingAmountMilliseconds ::= INTEGER (1..maxReportingAmountMilliseconds)
395
+
396
+ maxReportingAmountMilliseconds INTEGER ::= 8639999000
397
+
398
+ ReportingIntervalMilliseconds ::= INTEGER (1..maxReportingIntervalMilliseconds)
399
+
400
+ maxReportingIntervalMilliseconds INTEGER ::= 999
401
+
402
+ ReportingPLMNList::= SEQUENCE {
403
+ plmn-ListPrioritized [0] NULL OPTIONAL,
404
+ plmn-List [1] PLMNList,
405
+ ...}
406
+
407
+ PLMNList::= SEQUENCE SIZE (1..maxNumOfReportingPLMN) OF
408
+ ReportingPLMN
409
+
410
+ maxNumOfReportingPLMN INTEGER ::= 20
411
+
412
+ ReportingPLMN::= SEQUENCE {
413
+ plmn-Id [0] PLMN-Id,
414
+ ran-Technology [1] RAN-Technology OPTIONAL,
415
+ ran-PeriodicLocationSupport [2] NULL OPTIONAL,
416
+ ...}
417
+
418
+ RAN-Technology ::= ENUMERATED {
419
+ gsm (0),
420
+ umts (1),
421
+ ...}
422
+
423
+ ProvideSubscriberLocation-Res ::= SEQUENCE {
424
+ locationEstimate Ext-GeographicalInformation,
425
+ ageOfLocationEstimate [0] AgeOfLocationInformation OPTIONAL,
426
+ extensionContainer [1] ExtensionContainer OPTIONAL,
427
+ ... ,
428
+ add-LocationEstimate [2] Add-GeographicalInformation OPTIONAL,
429
+ deferredmt-lrResponseIndicator [3] NULL OPTIONAL,
430
+ geranPositioningData [4] PositioningDataInformation OPTIONAL,
431
+ utranPositioningData [5] UtranPositioningDataInfo OPTIONAL,
432
+ cellIdOrSai [6] CellGlobalIdOrServiceAreaIdOrLAI OPTIONAL,
433
+ sai-Present [7] NULL OPTIONAL,
434
+ accuracyFulfilmentIndicator [8] AccuracyFulfilmentIndicator OPTIONAL,
435
+ velocityEstimate [9] VelocityEstimate OPTIONAL,
436
+ mo-lrShortCircuitIndicator [10] NULL OPTIONAL,
437
+ geranGANSSpositioningData [11] GeranGANSSpositioningData OPTIONAL,
438
+ utranGANSSpositioningData [12] UtranGANSSpositioningData OPTIONAL,
439
+ targetServingNodeForHandover [13] ServingNodeAddress OPTIONAL,
440
+ utranAdditionalPositioningData [14] UtranAdditionalPositioningData OPTIONAL,
441
+ utranBaroPressureMeas [15] UtranBaroPressureMeas OPTIONAL,
442
+ utranCivicAddress [16] UtranCivicAddress OPTIONAL }
443
+
444
+ -- if deferredmt-lrResponseIndicator is set, locationEstimate is ignored.
445
+
446
+ -- the add-LocationEstimate parameter shall not be sent to a node that did not indicate the
447
+ -- geographic shapes supported in the ProvideSubscriberLocation-Arg
448
+ -- The locationEstimate and the add-locationEstimate parameters shall not be sent if
449
+ -- the supportedGADShapes parameter has been received in ProvideSubscriberLocation-Arg
450
+ -- and the shape encoded in locationEstimate or add-LocationEstimate is not marked
451
+ -- as supported in supportedGADShapes. In such a case ProvideSubscriberLocation
452
+ -- shall be rejected with error FacilityNotSupported with additional indication
453
+ -- shapeOfLocationEstimateNotSupported.
454
+ -- sai-Present indicates that the cellIdOrSai parameter contains a Service Area Identity.
455
+
456
+ AccuracyFulfilmentIndicator ::= ENUMERATED {
457
+ requestedAccuracyFulfilled (0),
458
+ requestedAccuracyNotFulfilled (1),
459
+ ... }
460
+
461
+ Ext-GeographicalInformation ::= OCTET STRING (SIZE (1..maxExt-GeographicalInformation))
462
+ -- Refers to geographical Information defined in 3GPP TS 23.032.
463
+ -- This is composed of 1 or more octets with an internal structure according to
464
+ -- 3GPP TS 23.032
465
+ -- Octet 1: Type of shape, only the following shapes in 3GPP TS 23.032 are allowed:
466
+ -- (a) Ellipsoid point with uncertainty circle
467
+ -- (b) Ellipsoid point with uncertainty ellipse
468
+ -- (c) Ellipsoid point with altitude and uncertainty ellipsoid
469
+ -- (d) Ellipsoid Arc
470
+ -- (e) Ellipsoid Point
471
+ -- Any other value in octet 1 shall be treated as invalid
472
+ -- Octets 2 to 8 for case (a) - Ellipsoid point with uncertainty circle
473
+ -- Degrees of Latitude 3 octets
474
+ -- Degrees of Longitude 3 octets
475
+ -- Uncertainty code 1 octet
476
+ -- Octets 2 to 11 for case (b) - Ellipsoid point with uncertainty ellipse:
477
+ -- Degrees of Latitude 3 octets
478
+ -- Degrees of Longitude 3 octets
479
+ -- Uncertainty semi-major axis 1 octet
480
+ -- Uncertainty semi-minor axis 1 octet
481
+ -- Angle of major axis 1 octet
482
+ -- Confidence 1 octet
483
+ -- Octets 2 to 14 for case (c) - Ellipsoid point with altitude and uncertainty ellipsoid
484
+ -- Degrees of Latitude 3 octets
485
+ -- Degrees of Longitude 3 octets
486
+ -- Altitude 2 octets
487
+ -- Uncertainty semi-major axis 1 octet
488
+ -- Uncertainty semi-minor axis 1 octet
489
+ -- Angle of major axis 1 octet
490
+ -- Uncertainty altitude 1 octet
491
+ -- Confidence 1 octet
492
+ -- Octets 2 to 13 for case (d) - Ellipsoid Arc
493
+ -- Degrees of Latitude 3 octets
494
+ -- Degrees of Longitude 3 octets
495
+ -- Inner radius 2 octets
496
+ -- Uncertainty radius 1 octet
497
+ -- Offset angle 1 octet
498
+ -- Included angle 1 octet
499
+ -- Confidence 1 octet
500
+ -- Octets 2 to 7 for case (e) - Ellipsoid Point
501
+ -- Degrees of Latitude 3 octets
502
+ -- Degrees of Longitude 3 octets
503
+
504
+ --
505
+ -- An Ext-GeographicalInformation parameter comprising more than one octet and
506
+ -- containing any other shape or an incorrect number of octets or coding according
507
+ -- to 3GPP TS 23.032 shall be treated as invalid data by a receiver.
508
+ --
509
+ -- An Ext-GeographicalInformation parameter comprising one octet shall be discarded
510
+ -- by the receiver if an Add-GeographicalInformation parameter is received
511
+ -- in the same message.
512
+ --
513
+ -- An Ext-GeographicalInformation parameter comprising one octet shall be treated as
514
+ -- invalid data by the receiver if an Add-GeographicalInformation parameter is not
515
+ -- received in the same message.
516
+
517
+ maxExt-GeographicalInformation INTEGER ::= 20
518
+ -- the maximum length allows for further shapes in 3GPP TS 23.032 to be included in later
519
+ -- versions of 3GPP TS 29.002
520
+
521
+ VelocityEstimate ::= OCTET STRING (SIZE (4..7))
522
+ -- Refers to Velocity description defined in 3GPP TS 23.032.
523
+ -- This is composed of 4 or more octets with an internal structure according to
524
+ -- 3GPP TS 23.032
525
+ -- Octet 1: Type of velocity, only the following types in 3GPP TS 23.032 are allowed:
526
+ -- (a) Horizontal Velocity
527
+ -- (b) Horizontal with Vertical Velocity
528
+ -- (c) Horizontal Velocity with Uncertainty
529
+ -- (d) Horizontal with Vertical Velocity and Uncertainty
530
+ -- For types Horizontal with Vertical Velocity and Horizontal with Vertical Velocity
531
+ -- and Uncertainty, the direction of the Vertical Speed is also included in Octet 1
532
+ -- Any other value in octet 1 shall be treated as invalid
533
+ -- Octets 2 to 4 for case (a) Horizontal velocity:
534
+ -- Bearing 1 octet
535
+ -- Horizontal Speed 2 octets
536
+ -- Octets 2 to 5 for case (b) - Horizontal with Vertical Velocity:
537
+ -- Bearing 1 octet
538
+ -- Horizontal Speed 2 octets
539
+ -- Vertical Speed 1 octet
540
+ -- Octets 2 to 5 for case (c) - Horizontal velocity with Uncertainty:
541
+ -- Bearing 1 octet
542
+ -- Horizontal Speed 2 octets
543
+ -- Uncertainty Speed 1 octet
544
+ -- Octets 2 to 7 for case (d) - Horizontal with Vertical Velocity and Uncertainty:
545
+ -- Bearing 1 octet
546
+ -- Horizontal Speed 2 octets
547
+ -- Vertical Speed 1 octet
548
+ -- Horizontal Uncertainty Speed 1 octet
549
+ -- Vertical Uncertainty Speed 1 octet
550
+
551
+ PositioningDataInformation ::= OCTET STRING (SIZE (2..maxPositioningDataInformation))
552
+ -- Refers to the Positioning Data defined in 3GPP TS 49.031.
553
+ -- This is composed of 2 or more octets with an internal structure according to
554
+ -- 3GPP TS 49.031.
555
+
556
+ maxPositioningDataInformation INTEGER ::= 10
557
+ --
558
+
559
+ UtranPositioningDataInfo ::= OCTET STRING (SIZE (3..maxUtranPositioningDataInfo))
560
+ -- Refers to the Position Data defined in 3GPP TS 25.413.
561
+ -- This is composed of the positioningDataDiscriminator and the positioningDataSet
562
+ -- included in positionData as defined in 3GPP TS 25.413.
563
+
564
+ maxUtranPositioningDataInfo INTEGER ::= 11
565
+ --
566
+
567
+ GeranGANSSpositioningData ::= OCTET STRING (SIZE (2..maxGeranGANSSpositioningData))
568
+ -- Refers to the GANSS Positioning Data defined in 3GPP TS 49.031.
569
+ -- This is composed of 2 or more octets with an internal structure according to
570
+ -- 3GPP TS 49.031.
571
+
572
+ maxGeranGANSSpositioningData INTEGER ::= 10
573
+ --
574
+
575
+ UtranGANSSpositioningData ::= OCTET STRING (SIZE (1..maxUtranGANSSpositioningData))
576
+ -- Refers to the Position Data defined in 3GPP TS 25.413.
577
+ -- This is composed of the GANSS-PositioningDataSet only, included in PositionData
578
+ -- as defined in 3GPP TS 25.413.
579
+
580
+ maxUtranGANSSpositioningData INTEGER ::= 9
581
+ --
582
+
583
+ UtranAdditionalPositioningData ::= OCTET STRING (SIZE (1..maxUtranAdditionalPositioningData))
584
+ -- Refers to the Position Data defined in 3GPP TS 25.413.
585
+ -- This is composed of the Additional-PositioningDataSet only, included in PositionData
586
+ -- as defined in 3GPP TS 25.413.
587
+
588
+ maxUtranAdditionalPositioningData INTEGER ::= 8
589
+ --
590
+
591
+ UtranBaroPressureMeas ::= INTEGER (30000..115000)
592
+ -- Refers to the barometric pressure measurement defined in 3GPP TS 25.413.
593
+ -- This is composed of the BarometricPressureMeasurement only as defined in 3GPP TS
594
+ -- 25.413.
595
+
596
+ UtranCivicAddress ::= OCTET STRING
597
+ -- Refers to the civic address defined in 3GPP TS 25.413.
598
+ -- This is composed of the CivicAddress only as defined in 3GPP TS 25.413.
599
+
600
+ Add-GeographicalInformation ::= OCTET STRING (SIZE (1..maxAdd-GeographicalInformation))
601
+ -- Refers to geographical Information defined in 3GPP TS 23.032.
602
+ -- This is composed of 1 or more octets with an internal structure according to
603
+ -- 3GPP TS 23.032
604
+ -- Octet 1: Type of shape, all the shapes defined in 3GPP TS 23.032 are allowed:
605
+ -- Octets 2 to n (where n is the total number of octets necessary to encode the shape
606
+ -- according to 3GPP TS 23.032) are used to encode the shape itself in accordance with
607
+ -- the
608
+ -- encoding defined in 3GPP TS 23.032
609
+ --
610
+ -- An Add-GeographicalInformation parameter, whether valid or invalid, received
611
+ -- together with a valid Ext-GeographicalInformation parameter in the same message
612
+ -- shall be discarded.
613
+ --
614
+ -- An Add-GeographicalInformation parameter containing any shape not defined in
615
+ -- 3GPP TS 23.032 or an incorrect number of octets or coding according to
616
+ -- 3GPP TS 23.032 shall be treated as invalid data by a receiver if not received
617
+ -- together with a valid Ext-GeographicalInformation parameter in the same message.
618
+
619
+ maxAdd-GeographicalInformation INTEGER ::= 91
620
+ -- the maximum length allows support for all the shapes currently defined in 3GPP TS
621
+ -- .032
622
+
623
+ SubscriberLocationReport-Arg ::= SEQUENCE {
624
+ lcs-Event LCS-Event,
625
+ lcs-ClientID LCS-ClientID,
626
+ lcsLocationInfo LCSLocationInfo,
627
+ msisdn [0] ISDN-AddressString OPTIONAL,
628
+ imsi [1] IMSI OPTIONAL,
629
+ imei [2] IMEI OPTIONAL,
630
+ na-ESRD [3] ISDN-AddressString OPTIONAL,
631
+ na-ESRK [4] ISDN-AddressString OPTIONAL,
632
+ locationEstimate [5] Ext-GeographicalInformation OPTIONAL,
633
+ ageOfLocationEstimate [6] AgeOfLocationInformation OPTIONAL,
634
+ slr-ArgExtensionContainer [7] SLR-ArgExtensionContainer OPTIONAL,
635
+ ... ,
636
+ add-LocationEstimate [8] Add-GeographicalInformation OPTIONAL,
637
+ deferredmt-lrData [9] Deferredmt-lrData OPTIONAL,
638
+ lcs-ReferenceNumber [10] LCS-ReferenceNumber OPTIONAL,
639
+ geranPositioningData [11] PositioningDataInformation OPTIONAL,
640
+ utranPositioningData [12] UtranPositioningDataInfo OPTIONAL,
641
+ cellIdOrSai [13] CellGlobalIdOrServiceAreaIdOrLAI OPTIONAL,
642
+ h-gmlc-Address [14] GSN-Address OPTIONAL,
643
+ lcsServiceTypeID [15] LCSServiceTypeID OPTIONAL,
644
+ sai-Present [17] NULL OPTIONAL,
645
+ pseudonymIndicator [18] NULL OPTIONAL,
646
+ accuracyFulfilmentIndicator [19] AccuracyFulfilmentIndicator OPTIONAL,
647
+ velocityEstimate [20] VelocityEstimate OPTIONAL,
648
+ sequenceNumber [21] SequenceNumber OPTIONAL,
649
+ periodicLDRInfo [22] PeriodicLDRInfo OPTIONAL,
650
+ mo-lrShortCircuitIndicator [23] NULL OPTIONAL,
651
+ geranGANSSpositioningData [24] GeranGANSSpositioningData OPTIONAL,
652
+ utranGANSSpositioningData [25] UtranGANSSpositioningData OPTIONAL,
653
+ targetServingNodeForHandover [26] ServingNodeAddress OPTIONAL,
654
+ utranAdditionalPositioningData [27] UtranAdditionalPositioningData OPTIONAL,
655
+ utranBaroPressureMeas [28] UtranBaroPressureMeas OPTIONAL,
656
+ utranCivicAddress [29] UtranCivicAddress OPTIONAL }
657
+
658
+ -- one of msisdn or imsi is mandatory
659
+ -- a location estimate that is valid for the locationEstimate parameter should
660
+ -- be transferred in this parameter in preference to the add-LocationEstimate.
661
+ -- the deferredmt-lrData parameter shall be included if and only if the lcs-Event
662
+ -- indicates a deferredmt-lrResponse.
663
+ -- if the lcs-Event indicates a deferredmt-lrResponse then the locationEstimate
664
+ -- and the add-locationEstimate parameters shall not be sent if the
665
+ -- supportedGADShapes parameter had been received in ProvideSubscriberLocation-Arg
666
+ -- and the shape encoded in locationEstimate or add-LocationEstimate was not marked
667
+ -- as supported in supportedGADShapes. In such a case terminationCause
668
+ -- in deferredmt-lrData shall be present with value
669
+ -- shapeOfLocationEstimateNotSupported.
670
+ -- If a lcs event indicates deferred mt-lr response, the lcs-Reference number shall be
671
+ -- included.
672
+ -- sai-Present indicates that the cellIdOrSai parameter contains a Service Area Identity.
673
+
674
+ Deferredmt-lrData ::= SEQUENCE {
675
+ deferredLocationEventType DeferredLocationEventType,
676
+ terminationCause [0] TerminationCause OPTIONAL,
677
+ lcsLocationInfo [1] LCSLocationInfo OPTIONAL,
678
+ ...}
679
+ -- lcsLocationInfo may be included only if a terminationCause is present
680
+ -- indicating mt-lrRestart.
681
+
682
+ LCS-Event ::= ENUMERATED {
683
+ emergencyCallOrigination (0),
684
+ emergencyCallRelease (1),
685
+ mo-lr (2),
686
+ ...,
687
+ deferredmt-lrResponse (3) ,
688
+ deferredmo-lrTTTPInitiation (4),
689
+ emergencyCallHandover (5) }
690
+ -- deferredmt-lrResponse is applicable to the delivery of a location estimate
691
+ -- for an LDR initiated earlier by either the network (via an MT-LR activate deferred
692
+ -- location) or the UE (via a deferred MO-LR TTTP initiation)
693
+ -- exception handling:
694
+ -- a SubscriberLocationReport-Arg containing an unrecognized LCS-Event
695
+ -- shall be rejected by a receiver with a return error cause of unexpected data value
696
+
697
+ TerminationCause ::= ENUMERATED {
698
+ normal (0),
699
+ errorundefined (1),
700
+ internalTimeout (2),
701
+ congestion (3),
702
+ mt-lrRestart (4),
703
+ privacyViolation (5),
704
+ ...,
705
+ shapeOfLocationEstimateNotSupported (6) ,
706
+ subscriberTermination (7),
707
+ uETermination (8),
708
+ networkTermination (9) }
709
+ -- mt-lrRestart shall be used to trigger the GMLC to restart the location procedure,
710
+ -- either because the sending node knows that the terminal has moved under coverage
711
+ -- of another MSC or SGSN (e.g. Send Identification received), or because the subscriber
712
+ -- has been deregistered due to a Cancel Location received from HLR.
713
+ --
714
+ -- exception handling
715
+ -- an unrecognized value shall be treated the same as value 1 (errorundefined)
716
+
717
+ SequenceNumber ::= INTEGER (1..maxReportingAmount)
718
+
719
+ ServingNodeAddress ::= CHOICE {
720
+ msc-Number [0] ISDN-AddressString,
721
+ sgsn-Number [1] ISDN-AddressString,
722
+ mme-Number [2] DiameterIdentity }
723
+
724
+ SubscriberLocationReport-Res ::= SEQUENCE {
725
+ extensionContainer ExtensionContainer OPTIONAL,
726
+ ...,
727
+ na-ESRK [0] ISDN-AddressString OPTIONAL,
728
+ na-ESRD [1] ISDN-AddressString OPTIONAL,
729
+ h-gmlc-Address [2] GSN-Address OPTIONAL,
730
+ mo-lrShortCircuitIndicator [3] NULL OPTIONAL,
731
+ reportingPLMNList [4] ReportingPLMNList OPTIONAL,
732
+ lcs-ReferenceNumber [5] LCS-ReferenceNumber OPTIONAL }
733
+
734
+ -- na-ESRK and na-ESRD are mutually exclusive
735
+ --
736
+ -- exception handling
737
+ -- receipt of both na-ESRK and na-ESRD shall be treated the same as a return error
738
+
739
+
740
+ END
@@ -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.1"
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.1
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-28 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