nmea_parser 0.1.3 → 0.1.4

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
  SHA1:
3
- metadata.gz: 18e36f7e04174d30c1cd5235371ab3930eb85e6e
4
- data.tar.gz: 3a33efc56c20059080122511436a4080d6704209
3
+ metadata.gz: 1be9d4a828a3163104e7f00a64ea11bb28e752aa
4
+ data.tar.gz: 6a9d13aaff04e863ca89461bb5c69617404c76a4
5
5
  SHA512:
6
- metadata.gz: 5e6af034480d1c041c3e5d9ead14a43dce3509dfb8bd322f21aac50809c05c1bf02c3e54b36ed4534805f6d0029725e9b8fd8aca6c1454fe753b501d3d298bc3
7
- data.tar.gz: 0d17e54b18c101d37f4114bacd85e423cdb7413e62d50b4e34e929ec081cc9029c268cdb6f710ed1cbe707caa4e94226a53bfbc76561dfe6ef6a2ecfaafe44a5
6
+ metadata.gz: 86316fa84dff6999d4e299d9998322f0438b17a7ed40165d26c2c66f4ccb9b4ec9b4a92315fc3b3137b7f844c32aa30a896c958b0d06bd409c1b1a0e6ec89cc0
7
+ data.tar.gz: 7460b251b0f9a6fce2ecdaf6557b433b46fada649ae6a7b9ebf3ec47a68bd4f8cc8887e1b9bc7a28747c22c32db3cd8807a657b003d864ae8764919750e5d95c
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/nmea_parser.rb CHANGED
@@ -9,16 +9,10 @@ class NMEAParser
9
9
 
10
10
  attr_reader :longitude, :latitude, :time
11
11
 
12
- def initialize(s)
13
- parse(s)
12
+ def initialize(s=nil)
13
+ parse(s) if s
14
14
  end
15
15
 
16
- def to_h()
17
- {time: @time, latitude: @latitude, longitude: @longitude}
18
- end
19
-
20
- private
21
-
22
16
  def parse(raw_line)
23
17
 
24
18
  msgcode = raw_line[/^\$GP(\w+)/]
@@ -35,6 +29,12 @@ class NMEAParser
35
29
 
36
30
  end
37
31
 
32
+ def to_h()
33
+ {time: @time, latitude: @latitude, longitude: @longitude}
34
+ end
35
+
36
+ private
37
+
38
38
  def decimalize(raw_x, raw_nesw)
39
39
 
40
40
  nesw = {n: :+, e: :+, s: :-, w: :-}
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nmea_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file