nmea_plus 1.0.19 → 1.0.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +23 -4
  3. data/lib/nmea_plus/ais_message_factory.rb +2 -3
  4. data/lib/nmea_plus/message/ais/vdo.rb +14 -0
  5. data/lib/nmea_plus/message/base.rb +17 -9
  6. data/lib/nmea_plus/message/nmea/apa.rb +24 -0
  7. data/lib/nmea_plus/message/nmea/base_nmea.rb +2 -2
  8. data/lib/nmea_plus/message/nmea/bec.rb +12 -0
  9. data/lib/nmea_plus/message/nmea/ber.rb +17 -0
  10. data/lib/nmea_plus/message/nmea/bpi.rb +17 -0
  11. data/lib/nmea_plus/message/nmea/bwr.rb +10 -0
  12. data/lib/nmea_plus/message/nmea/dbk.rb +9 -0
  13. data/lib/nmea_plus/message/nmea/dbs.rb +4 -0
  14. data/lib/nmea_plus/message/nmea/dcn.rb +47 -1
  15. data/lib/nmea_plus/message/nmea/dru.rb +33 -0
  16. data/lib/nmea_plus/message/nmea/gda.rb +39 -0
  17. data/lib/nmea_plus/message/nmea/gdf.rb +19 -0
  18. data/lib/nmea_plus/message/nmea/gdp.rb +19 -0
  19. data/lib/nmea_plus/message/nmea/gla.rb +20 -0
  20. data/lib/nmea_plus/message/nmea/glf.rb +19 -0
  21. data/lib/nmea_plus/message/nmea/glp.rb +19 -0
  22. data/lib/nmea_plus/message/nmea/goa.rb +20 -0
  23. data/lib/nmea_plus/message/nmea/gof.rb +19 -0
  24. data/lib/nmea_plus/message/nmea/gop.rb +19 -0
  25. data/lib/nmea_plus/message/nmea/gtd.rb +12 -0
  26. data/lib/nmea_plus/message/nmea/gxa.rb +14 -18
  27. data/lib/nmea_plus/message/nmea/gxf.rb +19 -0
  28. data/lib/nmea_plus/message/nmea/gxp.rb +19 -0
  29. data/lib/nmea_plus/message/nmea/hcc.rb +17 -0
  30. data/lib/nmea_plus/message/nmea/hcd.rb +28 -0
  31. data/lib/nmea_plus/message/nmea/hdg.rb +0 -1
  32. data/lib/nmea_plus/message/nmea/hdm.rb +5 -0
  33. data/lib/nmea_plus/message/nmea/hdt.rb +2 -0
  34. data/lib/nmea_plus/message/nmea/htc.rb +11 -0
  35. data/lib/nmea_plus/message/nmea/hvd.rb +23 -0
  36. data/lib/nmea_plus/message/nmea/hvm.rb +15 -0
  37. data/lib/nmea_plus/message/nmea/ima.rb +40 -0
  38. data/lib/nmea_plus/message/nmea/mda.rb +44 -0
  39. data/lib/nmea_plus/message/nmea/mhu.rb +22 -0
  40. data/lib/nmea_plus/message/nmea/mmb.rb +19 -0
  41. data/lib/nmea_plus/message/nmea/mta.rb +16 -0
  42. data/lib/nmea_plus/message/nmea/mwh.rb +18 -0
  43. data/lib/nmea_plus/message/nmea/mws.rb +18 -0
  44. data/lib/nmea_plus/message/nmea/oln.rb +42 -3
  45. data/lib/nmea_plus/message/nmea/olw.rb +15 -0
  46. data/lib/nmea_plus/message/nmea/omp.rb +16 -0
  47. data/lib/nmea_plus/message/nmea/onz.rb +14 -0
  48. data/lib/nmea_plus/message/nmea/{pashr.rb → proprietary/pashr.rb} +1 -1
  49. data/lib/nmea_plus/message/nmea/r00.rb +9 -1
  50. data/lib/nmea_plus/message/nmea/rmc.rb +1 -1
  51. data/lib/nmea_plus/message/nmea/rnn.rb +18 -0
  52. data/lib/nmea_plus/message/nmea/sbk.rb +17 -0
  53. data/lib/nmea_plus/message/nmea/scd.rb +22 -0
  54. data/lib/nmea_plus/message/nmea/scy.rb +17 -0
  55. data/lib/nmea_plus/message/nmea/sdb.rb +14 -0
  56. data/lib/nmea_plus/message/nmea/sgd.rb +21 -0
  57. data/lib/nmea_plus/message/nmea/sgr.rb +22 -0
  58. data/lib/nmea_plus/message/nmea/siu.rb +21 -0
  59. data/lib/nmea_plus/message/nmea/slc.rb +66 -0
  60. data/lib/nmea_plus/message/nmea/snc.rb +35 -0
  61. data/lib/nmea_plus/message/nmea/snu.rb +18 -0
  62. data/lib/nmea_plus/message/nmea/sps.rb +14 -0
  63. data/lib/nmea_plus/message/nmea/ssf.rb +29 -0
  64. data/lib/nmea_plus/message/nmea/stc.rb +12 -0
  65. data/lib/nmea_plus/message/nmea/str.rb +38 -0
  66. data/lib/nmea_plus/message/nmea/sys.rb +29 -0
  67. data/lib/nmea_plus/message/nmea/tec.rb +20 -0
  68. data/lib/nmea_plus/message/nmea/tep.rb +14 -0
  69. data/lib/nmea_plus/message/nmea/tga.rb +20 -0
  70. data/lib/nmea_plus/message/nmea/tif.rb +35 -0
  71. data/lib/nmea_plus/message/nmea/trf.rb +17 -1
  72. data/lib/nmea_plus/message/nmea/trp.rb +14 -0
  73. data/lib/nmea_plus/message/nmea/trs.rb +41 -0
  74. data/lib/nmea_plus/message/nmea/vcd.rb +23 -0
  75. data/lib/nmea_plus/message/nmea/vpe.rb +17 -0
  76. data/lib/nmea_plus/message/nmea/vta.rb +23 -0
  77. data/lib/nmea_plus/message/nmea/vti.rb +23 -0
  78. data/lib/nmea_plus/message/nmea/vwe.rb +14 -0
  79. data/lib/nmea_plus/message/nmea/vwr.rb +15 -2
  80. data/lib/nmea_plus/message/nmea/vwt.rb +35 -0
  81. data/lib/nmea_plus/message/nmea/wdc.rb +20 -0
  82. data/lib/nmea_plus/message/nmea/wdr.rb +12 -0
  83. data/lib/nmea_plus/message/nmea/wfm.rb +12 -0
  84. data/lib/nmea_plus/message/nmea/wnc.rb +7 -0
  85. data/lib/nmea_plus/message/nmea/wnr.rb +12 -0
  86. data/lib/nmea_plus/message/nmea/ywp.rb +17 -0
  87. data/lib/nmea_plus/message/nmea/yws.rb +26 -0
  88. data/lib/nmea_plus/message/nmea/zaa.rb +14 -0
  89. data/lib/nmea_plus/message/nmea/zcd.rb +25 -0
  90. data/lib/nmea_plus/message/nmea/zev.rb +25 -0
  91. data/lib/nmea_plus/message/nmea/zfi.rb +15 -0
  92. data/lib/nmea_plus/message/nmea/zfo.rb +1 -1
  93. data/lib/nmea_plus/message/nmea/zlz.rb +19 -0
  94. data/lib/nmea_plus/message/nmea/zpi.rb +15 -0
  95. data/lib/nmea_plus/message/nmea/zta.rb +15 -0
  96. data/lib/nmea_plus/message/nmea/zte.rb +15 -0
  97. data/lib/nmea_plus/message/nmea/zti.rb +12 -0
  98. data/lib/nmea_plus/message/nmea/zwp.rb +12 -0
  99. data/lib/nmea_plus/message/nmea/zzu.rb +15 -0
  100. data/lib/nmea_plus/nmea_message_factory.rb +82 -2
  101. data/lib/nmea_plus/version.rb +1 -1
  102. metadata +79 -3
@@ -0,0 +1,39 @@
1
+ require_relative "base_nmea"
2
+
3
+ module NMEAPlus
4
+ module Message
5
+ module NMEA
6
+ # GDA - Dead Reckoning Positions
7
+ #
8
+ # The use of waypoint location $--WPL (for past positions) or $--GLL (for present position) followed by time tag $--ZDA
9
+ # is recommended for reporting past or present waypoint times; $--WPL followed by $--ZTG is recommended for
10
+ # estimated time.
11
+ # @see WPL
12
+ # @see GLL
13
+ # @see ZDA
14
+ # @see ZTG
15
+ class GDA < NMEAPlus::Message::NMEA::NMEAMessage
16
+
17
+ # UTC of position fix
18
+ field_reader :fix_time, 1, :_utctime_hms
19
+
20
+ # Latitude - N/S
21
+ # @!parse attr_reader :latitude
22
+ # @return [Float]
23
+ def latitude
24
+ self.class.degrees_minutes_to_decimal(@fields[2], @fields[3])
25
+ end
26
+
27
+ # Longitude - E/W
28
+ # @!parse attr_reader :longitude
29
+ # @return [Float]
30
+ def longitude
31
+ self.class.degrees_minutes_to_decimal(@fields[4], @fields[5])
32
+ end
33
+
34
+ # Waypoint ID
35
+ field_reader :waypoint_id, 6, :_string
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,19 @@
1
+ require_relative "gda"
2
+
3
+ module NMEAPlus
4
+ module Message
5
+ module NMEA
6
+ # GDF - Dead Reckoning Positions
7
+ #
8
+ # The use of waypoint location $--WPL (for past positions) or $--GLL (for present position) followed by time tag $--ZDA
9
+ # is recommended for reporting past or present waypoint times; $--WPL followed by $--ZTG is recommended for
10
+ # estimated time.
11
+ # @see WPL
12
+ # @see GLL
13
+ # @see ZDA
14
+ # @see ZTG
15
+ class GDF < NMEAPlus::Message::NMEA::GDA
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ require_relative "gda"
2
+
3
+ module NMEAPlus
4
+ module Message
5
+ module NMEA
6
+ # GDP - Dead Reckoning Positions
7
+ #
8
+ # The use of waypoint location $--WPL (for past positions) or $--GLL (for present position) followed by time tag $--ZDA
9
+ # is recommended for reporting past or present waypoint times; $--WPL followed by $--ZTG is recommended for
10
+ # estimated time.
11
+ # @see WPL
12
+ # @see GLL
13
+ # @see ZDA
14
+ # @see ZTG
15
+ class GDP < NMEAPlus::Message::NMEA::GDA
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,20 @@
1
+ require_relative "gda"
2
+
3
+ module NMEAPlus
4
+ module Message
5
+ module NMEA
6
+ # GLA - Loran-C Positions
7
+ # Same fields as GDA
8
+ #
9
+ # The use of waypoint location $--WPL (for past positions) or $--GLL (for present position) followed by time tag $--ZDA
10
+ # is recommended for reporting past or present waypoint times; $--WPL followed by $--ZTG is recommended for
11
+ # estimated time.
12
+ # @see WPL
13
+ # @see GLL
14
+ # @see ZDA
15
+ # @see ZTG
16
+ class GLA < NMEAPlus::Message::NMEA::GDA
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,19 @@
1
+ require_relative "gda"
2
+
3
+ module NMEAPlus
4
+ module Message
5
+ module NMEA
6
+ # GLF - Loran-C Determined Positions
7
+ #
8
+ # The use of waypoint location $--WPL (for past positions) or $--GLL (for present position) followed by time tag $--ZDA
9
+ # is recommended for reporting past or present waypoint times; $--WPL followed by $--ZTG is recommended for
10
+ # estimated time.
11
+ # @see WPL
12
+ # @see GLL
13
+ # @see ZDA
14
+ # @see ZTG
15
+ class GLF < NMEAPlus::Message::NMEA::GDA
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ require_relative "gda"
2
+
3
+ module NMEAPlus
4
+ module Message
5
+ module NMEA
6
+ # GLP - Loran-C Determined Positions
7
+ #
8
+ # The use of waypoint location $--WPL (for past positions) or $--GLL (for present position) followed by time tag $--ZDA
9
+ # is recommended for reporting past or present waypoint times; $--WPL followed by $--ZTG is recommended for
10
+ # estimated time.
11
+ # @see WPL
12
+ # @see GLL
13
+ # @see ZDA
14
+ # @see ZTG
15
+ class GLP < NMEAPlus::Message::NMEA::GDA
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,20 @@
1
+ require_relative "gda"
2
+
3
+ module NMEAPlus
4
+ module Message
5
+ module NMEA
6
+ # GOA - OMEGA Positions
7
+ # Same fields as GDA
8
+ #
9
+ # The use of waypoint location $--WPL (for past positions) or $--GLL (for present position) followed by time tag $--ZDA
10
+ # is recommended for reporting past or present waypoint times; $--WPL followed by $--ZTG is recommended for
11
+ # estimated time.
12
+ # @see WPL
13
+ # @see GLL
14
+ # @see ZDA
15
+ # @see ZTG
16
+ class GOA < NMEAPlus::Message::NMEA::GDA
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,19 @@
1
+ require_relative "gda"
2
+
3
+ module NMEAPlus
4
+ module Message
5
+ module NMEA
6
+ # GOF - Omega Determined Positions
7
+ #
8
+ # The use of waypoint location $--WPL (for past positions) or $--GLL (for present position) followed by time tag $--ZDA
9
+ # is recommended for reporting past or present waypoint times; $--WPL followed by $--ZTG is recommended for
10
+ # estimated time.
11
+ # @see WPL
12
+ # @see GLL
13
+ # @see ZDA
14
+ # @see ZTG
15
+ class GOF < NMEAPlus::Message::NMEA::GDA
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ require_relative "gda"
2
+
3
+ module NMEAPlus
4
+ module Message
5
+ module NMEA
6
+ # GOP - Omega Determined Positions
7
+ #
8
+ # The use of waypoint location $--WPL (for past positions) or $--GLL (for present position) followed by time tag $--ZDA
9
+ # is recommended for reporting past or present waypoint times; $--WPL followed by $--ZTG is recommended for
10
+ # estimated time.
11
+ # @see WPL
12
+ # @see GLL
13
+ # @see ZDA
14
+ # @see ZTG
15
+ class GOP < NMEAPlus::Message::NMEA::GDA
16
+ end
17
+ end
18
+ end
19
+ end
@@ -4,11 +4,23 @@ module NMEAPlus
4
4
  module Message
5
5
  module NMEA
6
6
  # GTD - Geographic Location in Time Differences
7
+ # Loran-C Time Difference (TD) lines of position for present vessel position.
8
+ # The use of $--GLC is recommended
9
+ # @see GLC
7
10
  class GTD < NMEAPlus::Message::NMEA::NMEAMessage
11
+ # TD 1, micro-seconds
8
12
  field_reader :difference1, 1, :_float
13
+
14
+ # TD 2, micro-seconds
9
15
  field_reader :difference2, 2, :_float
16
+
17
+ # TD 3, micro-seconds
10
18
  field_reader :difference3, 3, :_float
19
+
20
+ # TD 4, micro-seconds
11
21
  field_reader :difference4, 4, :_float
22
+
23
+ # TD 5, micro-seconds
12
24
  field_reader :difference5, 5, :_float
13
25
  end
14
26
  end
@@ -1,26 +1,22 @@
1
- require_relative "base_nmea"
1
+ require_relative "gda"
2
2
 
3
3
  module NMEAPlus
4
4
  module Message
5
5
  module NMEA
6
6
  # GXA - TRANSIT Position - Latitude/Longitude
7
- class GXA < NMEAPlus::Message::NMEA::NMEAMessage
8
-
9
- field_reader :fix_time, 1, :_utctime_hms
10
-
11
- # @!parse attr_reader :latitude
12
- # @return [Float]
13
- def latitude
14
- self.class.degrees_minutes_to_decimal(@fields[2], @fields[3])
15
- end
16
-
17
- # @!parse attr_reader :longitude
18
- # @return [Float]
19
- def longitude
20
- self.class.degrees_minutes_to_decimal(@fields[4], @fields[5])
21
- end
22
-
23
- field_reader :waypoint_id, 6, :_integer
7
+ #
8
+ # Location and time of TRANSIT fix at waypoint "c--c".
9
+ # TRANSIT system is not operational, no recommended replacement.
10
+ #
11
+ # The use of waypoint location $--WPL (for past positions) or $--GLL (for present position) followed by time tag $--ZDA
12
+ # is recommended for reporting past or present waypoint times; $--WPL followed by $--ZTG is recommended for
13
+ # estimated time.
14
+ # @see WPL
15
+ # @see GLL
16
+ # @see ZDA
17
+ # @see ZTG
18
+ class GXA < NMEAPlus::Message::NMEA::GDA
19
+ # Satellite number
24
20
  field_reader :satellite, 7, :_integer
25
21
  end
26
22
  end
@@ -0,0 +1,19 @@
1
+ require_relative "gxa"
2
+
3
+ module NMEAPlus
4
+ module Message
5
+ module NMEA
6
+ # GXF - TRANSIT Determined Positions
7
+ #
8
+ # The use of waypoint location $--WPL (for past positions) or $--GLL (for present position) followed by time tag $--ZDA
9
+ # is recommended for reporting past or present waypoint times; $--WPL followed by $--ZTG is recommended for
10
+ # estimated time.
11
+ # @see WPL
12
+ # @see GLL
13
+ # @see ZDA
14
+ # @see ZTG
15
+ class GXF < NMEAPlus::Message::NMEA::GXA
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ require_relative "gxa"
2
+
3
+ module NMEAPlus
4
+ module Message
5
+ module NMEA
6
+ # GXP - TRANSIT Determined Positions
7
+ #
8
+ # The use of waypoint location $--WPL (for past positions) or $--GLL (for present position) followed by time tag $--ZDA
9
+ # is recommended for reporting past or present waypoint times; $--WPL followed by $--ZTG is recommended for
10
+ # estimated time.
11
+ # @see WPL
12
+ # @see GLL
13
+ # @see ZDA
14
+ # @see ZTG
15
+ class GXP < NMEAPlus::Message::NMEA::GXA
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,17 @@
1
+ require_relative "base_nmea"
2
+
3
+ module NMEAPlus
4
+ module Message
5
+ module NMEA
6
+ # HCC - Compass Heading
7
+ # Vessel compass heading, which differs from magnetic heading by the amount of uncorrected magnetic deviation.
8
+ #
9
+ # The use of $--HDG is recommended.
10
+ # @see HCC
11
+ class HCC < NMEAPlus::Message::NMEA::NMEAMessage
12
+ # Compass heading, degrees
13
+ field_reader :compass_heading_degrees, 1, :_float
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,28 @@
1
+ require_relative "hdm"
2
+
3
+ module NMEAPlus
4
+ module Message
5
+ module NMEA
6
+ # HCD - Heading and Deviation
7
+ # Actual vessel magnetic heading, indicated compass heading and the difference (deviation) between them.
8
+ #
9
+ # Easterly deviation (E) subtracts from Compass Heading
10
+ # Westerly deviation (W) adds to Compass Heading
11
+ #
12
+ # The use of $--HDG is recommended.
13
+ # @see HDG
14
+ class HCD < NMEAPlus::Message::NMEA::HDM
15
+ # Compass heading, degrees
16
+ field_reader :compass_heading_degrees, 3, :_float
17
+
18
+ # Magnetic deviation, degrees E/W
19
+ # @!parse attr_reader :magnetic_deviation_degrees
20
+ # @return [Float]
21
+ def magnetic_deviation_degrees
22
+ self.class.nsew_signed_float(@fields[5], @fields[6])
23
+ end
24
+
25
+ end
26
+ end
27
+ end
28
+ end
@@ -1,4 +1,3 @@
1
- require_relative "base_nmea"
2
1
  require_relative "hdm"
3
2
 
4
3
  module NMEAPlus
@@ -4,7 +4,12 @@ module NMEAPlus
4
4
  module Message
5
5
  module NMEA
6
6
  # HDM - Heading - Magnetic
7
+ # Actual vessel heading in degrees Magnetic.
8
+ #
9
+ # The use of $--HDG is recommended.
10
+ # @see HDG
7
11
  class HDM < NMEAPlus::Message::NMEA::NMEAMessage
12
+ # Magnetic heading, degrees
8
13
  field_reader :magnetic_heading_degrees, 1, :_float
9
14
  end
10
15
  end
@@ -4,7 +4,9 @@ module NMEAPlus
4
4
  module Message
5
5
  module NMEA
6
6
  # HDT - Heading - True
7
+ # Actual vessel heading in degrees True produced by any device or system producing true heading
7
8
  class HDT < NMEAPlus::Message::NMEA::NMEAMessage
9
+ # Heading, degrees True
8
10
  field_reader :true_heading_degrees, 1, :_float
9
11
  end
10
12
  end
@@ -0,0 +1,11 @@
1
+ require_relative "hdt"
2
+
3
+ module NMEAPlus
4
+ module Message
5
+ module NMEA
6
+ # HTC - Heading, True
7
+ # Actual vessel heading in degrees True produced by any device or system producing true heading
8
+ class HTC < NMEAPlus::Message::NMEA::HDT; end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,23 @@
1
+ require_relative "base_nmea"
2
+
3
+ module NMEAPlus
4
+ module Message
5
+ module NMEA
6
+ # HVD - Magnetic Variation, Automatic
7
+ #
8
+ # Magnetic variation, automatically derived (calculated or from a data base)
9
+ #
10
+ # The use of $--HDG is recommended.
11
+ # @see HDG
12
+ class HVD < NMEAPlus::Message::NMEA::NMEAMessage
13
+ # Magnetic variation, degrees E/W
14
+ # @!parse attr_reader :magnetic_variation_degrees
15
+ # @return [Float]
16
+ def magnetic_variation_degrees
17
+ self.class.nsew_signed_float(@fields[1], @fields[2])
18
+ end
19
+
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,15 @@
1
+ require_relative "hvd"
2
+
3
+ module NMEAPlus
4
+ module Message
5
+ module NMEA
6
+ # HVM - Magnetic Variation, Manually Set
7
+ #
8
+ # Magnetic variation, manually entered
9
+ #
10
+ # The use of $--HDG is recommended.
11
+ # @see HDG
12
+ class HVM < NMEAPlus::Message::NMEA::HVD; end
13
+ end
14
+ end
15
+ end