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.
- checksums.yaml +4 -4
- data/README.md +23 -4
- data/lib/nmea_plus/ais_message_factory.rb +2 -3
- data/lib/nmea_plus/message/ais/vdo.rb +14 -0
- data/lib/nmea_plus/message/base.rb +17 -9
- data/lib/nmea_plus/message/nmea/apa.rb +24 -0
- data/lib/nmea_plus/message/nmea/base_nmea.rb +2 -2
- data/lib/nmea_plus/message/nmea/bec.rb +12 -0
- data/lib/nmea_plus/message/nmea/ber.rb +17 -0
- data/lib/nmea_plus/message/nmea/bpi.rb +17 -0
- data/lib/nmea_plus/message/nmea/bwr.rb +10 -0
- data/lib/nmea_plus/message/nmea/dbk.rb +9 -0
- data/lib/nmea_plus/message/nmea/dbs.rb +4 -0
- data/lib/nmea_plus/message/nmea/dcn.rb +47 -1
- data/lib/nmea_plus/message/nmea/dru.rb +33 -0
- data/lib/nmea_plus/message/nmea/gda.rb +39 -0
- data/lib/nmea_plus/message/nmea/gdf.rb +19 -0
- data/lib/nmea_plus/message/nmea/gdp.rb +19 -0
- data/lib/nmea_plus/message/nmea/gla.rb +20 -0
- data/lib/nmea_plus/message/nmea/glf.rb +19 -0
- data/lib/nmea_plus/message/nmea/glp.rb +19 -0
- data/lib/nmea_plus/message/nmea/goa.rb +20 -0
- data/lib/nmea_plus/message/nmea/gof.rb +19 -0
- data/lib/nmea_plus/message/nmea/gop.rb +19 -0
- data/lib/nmea_plus/message/nmea/gtd.rb +12 -0
- data/lib/nmea_plus/message/nmea/gxa.rb +14 -18
- data/lib/nmea_plus/message/nmea/gxf.rb +19 -0
- data/lib/nmea_plus/message/nmea/gxp.rb +19 -0
- data/lib/nmea_plus/message/nmea/hcc.rb +17 -0
- data/lib/nmea_plus/message/nmea/hcd.rb +28 -0
- data/lib/nmea_plus/message/nmea/hdg.rb +0 -1
- data/lib/nmea_plus/message/nmea/hdm.rb +5 -0
- data/lib/nmea_plus/message/nmea/hdt.rb +2 -0
- data/lib/nmea_plus/message/nmea/htc.rb +11 -0
- data/lib/nmea_plus/message/nmea/hvd.rb +23 -0
- data/lib/nmea_plus/message/nmea/hvm.rb +15 -0
- data/lib/nmea_plus/message/nmea/ima.rb +40 -0
- data/lib/nmea_plus/message/nmea/mda.rb +44 -0
- data/lib/nmea_plus/message/nmea/mhu.rb +22 -0
- data/lib/nmea_plus/message/nmea/mmb.rb +19 -0
- data/lib/nmea_plus/message/nmea/mta.rb +16 -0
- data/lib/nmea_plus/message/nmea/mwh.rb +18 -0
- data/lib/nmea_plus/message/nmea/mws.rb +18 -0
- data/lib/nmea_plus/message/nmea/oln.rb +42 -3
- data/lib/nmea_plus/message/nmea/olw.rb +15 -0
- data/lib/nmea_plus/message/nmea/omp.rb +16 -0
- data/lib/nmea_plus/message/nmea/onz.rb +14 -0
- data/lib/nmea_plus/message/nmea/{pashr.rb → proprietary/pashr.rb} +1 -1
- data/lib/nmea_plus/message/nmea/r00.rb +9 -1
- data/lib/nmea_plus/message/nmea/rmc.rb +1 -1
- data/lib/nmea_plus/message/nmea/rnn.rb +18 -0
- data/lib/nmea_plus/message/nmea/sbk.rb +17 -0
- data/lib/nmea_plus/message/nmea/scd.rb +22 -0
- data/lib/nmea_plus/message/nmea/scy.rb +17 -0
- data/lib/nmea_plus/message/nmea/sdb.rb +14 -0
- data/lib/nmea_plus/message/nmea/sgd.rb +21 -0
- data/lib/nmea_plus/message/nmea/sgr.rb +22 -0
- data/lib/nmea_plus/message/nmea/siu.rb +21 -0
- data/lib/nmea_plus/message/nmea/slc.rb +66 -0
- data/lib/nmea_plus/message/nmea/snc.rb +35 -0
- data/lib/nmea_plus/message/nmea/snu.rb +18 -0
- data/lib/nmea_plus/message/nmea/sps.rb +14 -0
- data/lib/nmea_plus/message/nmea/ssf.rb +29 -0
- data/lib/nmea_plus/message/nmea/stc.rb +12 -0
- data/lib/nmea_plus/message/nmea/str.rb +38 -0
- data/lib/nmea_plus/message/nmea/sys.rb +29 -0
- data/lib/nmea_plus/message/nmea/tec.rb +20 -0
- data/lib/nmea_plus/message/nmea/tep.rb +14 -0
- data/lib/nmea_plus/message/nmea/tga.rb +20 -0
- data/lib/nmea_plus/message/nmea/tif.rb +35 -0
- data/lib/nmea_plus/message/nmea/trf.rb +17 -1
- data/lib/nmea_plus/message/nmea/trp.rb +14 -0
- data/lib/nmea_plus/message/nmea/trs.rb +41 -0
- data/lib/nmea_plus/message/nmea/vcd.rb +23 -0
- data/lib/nmea_plus/message/nmea/vpe.rb +17 -0
- data/lib/nmea_plus/message/nmea/vta.rb +23 -0
- data/lib/nmea_plus/message/nmea/vti.rb +23 -0
- data/lib/nmea_plus/message/nmea/vwe.rb +14 -0
- data/lib/nmea_plus/message/nmea/vwr.rb +15 -2
- data/lib/nmea_plus/message/nmea/vwt.rb +35 -0
- data/lib/nmea_plus/message/nmea/wdc.rb +20 -0
- data/lib/nmea_plus/message/nmea/wdr.rb +12 -0
- data/lib/nmea_plus/message/nmea/wfm.rb +12 -0
- data/lib/nmea_plus/message/nmea/wnc.rb +7 -0
- data/lib/nmea_plus/message/nmea/wnr.rb +12 -0
- data/lib/nmea_plus/message/nmea/ywp.rb +17 -0
- data/lib/nmea_plus/message/nmea/yws.rb +26 -0
- data/lib/nmea_plus/message/nmea/zaa.rb +14 -0
- data/lib/nmea_plus/message/nmea/zcd.rb +25 -0
- data/lib/nmea_plus/message/nmea/zev.rb +25 -0
- data/lib/nmea_plus/message/nmea/zfi.rb +15 -0
- data/lib/nmea_plus/message/nmea/zfo.rb +1 -1
- data/lib/nmea_plus/message/nmea/zlz.rb +19 -0
- data/lib/nmea_plus/message/nmea/zpi.rb +15 -0
- data/lib/nmea_plus/message/nmea/zta.rb +15 -0
- data/lib/nmea_plus/message/nmea/zte.rb +15 -0
- data/lib/nmea_plus/message/nmea/zti.rb +12 -0
- data/lib/nmea_plus/message/nmea/zwp.rb +12 -0
- data/lib/nmea_plus/message/nmea/zzu.rb +15 -0
- data/lib/nmea_plus/nmea_message_factory.rb +82 -2
- data/lib/nmea_plus/version.rb +1 -1
- metadata +79 -3
@@ -0,0 +1,22 @@
|
|
1
|
+
require_relative "base_nmea"
|
2
|
+
|
3
|
+
module NMEAPlus
|
4
|
+
module Message
|
5
|
+
module NMEA
|
6
|
+
# SGR - Loran-C Chain Identifier
|
7
|
+
# The unique Loran-C Chain identifier, representing Group Repetition Interval (GRI)
|
8
|
+
class SGR < NMEAPlus::Message::NMEA::NMEAMessage
|
9
|
+
# Chain ID, representing tens of microseconds
|
10
|
+
field_reader :chain_identifier, 1, :_integer
|
11
|
+
|
12
|
+
# GRI, microseconds.
|
13
|
+
# @!parse attr_reader :gri_microseconds
|
14
|
+
# @return [Integer]
|
15
|
+
def gri_microseconds
|
16
|
+
return nil if chain_identifier.nil?
|
17
|
+
chain_identifier * 10
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require_relative "base_nmea"
|
2
|
+
|
3
|
+
module NMEAPlus
|
4
|
+
module Message
|
5
|
+
module NMEA
|
6
|
+
# SIU - Loran-C Stations in Use
|
7
|
+
#
|
8
|
+
# The use of $--GLC is recommended
|
9
|
+
# @see GLC
|
10
|
+
class SIU < NMEAPlus::Message::NMEA::NMEAMessage
|
11
|
+
# Array of flags for stations in use, indexed by station number
|
12
|
+
# @!parse attr_reader :stations_in_use
|
13
|
+
# @return [Array<Boolean>]
|
14
|
+
def stations_in_use
|
15
|
+
# dummy index 0, empty fields indicate stations not in use
|
16
|
+
[false] + (1..8).to_a.map { |x| !(@fields[x].nil? || @fields[x].empty?) }
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
require_relative "base_nmea"
|
2
|
+
|
3
|
+
module NMEAPlus
|
4
|
+
module Message
|
5
|
+
module NMEA
|
6
|
+
# SLC - Loran-C Status
|
7
|
+
class SLC < NMEAPlus::Message::NMEA::NMEAMessage
|
8
|
+
|
9
|
+
# container for Omega lane indicators
|
10
|
+
class SLCStationReport
|
11
|
+
# Used in lat/lon calculation
|
12
|
+
# @return [Boolean]
|
13
|
+
attr_accessor :used_in_calculation
|
14
|
+
|
15
|
+
# Status: Blink Warning Flag
|
16
|
+
# @return [Boolean]
|
17
|
+
attr_accessor :blink_warning
|
18
|
+
|
19
|
+
# Status: Cycle Lock Warning Flag
|
20
|
+
# @return [Boolean]
|
21
|
+
attr_accessor :cycle_lock_warning
|
22
|
+
|
23
|
+
# Status: SNR Warning Flag
|
24
|
+
# @return [Boolean]
|
25
|
+
attr_accessor :snr_warning
|
26
|
+
|
27
|
+
# SNR value, 000 to 999
|
28
|
+
# @return [Integer]
|
29
|
+
attr_accessor :snr
|
30
|
+
|
31
|
+
# @param arr [Array<String, Integer>] a string and 2 integers
|
32
|
+
def initialize(arr, is_master)
|
33
|
+
@arr = arr
|
34
|
+
@used_in_calculation = is_master ? true : NMEA::NMEAMessage._av_boolean(arr[0])
|
35
|
+
@blink_warning = NMEA::NMEAMessage._av_boolean(arr[1])
|
36
|
+
@cycle_lock_warning = NMEA::NMEAMessage._av_boolean(arr[2])
|
37
|
+
@snr_warning = NMEA::NMEAMessage._av_boolean(arr[3])
|
38
|
+
@snr = arr[4].to_i
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
# station Status
|
43
|
+
# @!parse attr_reader :master_station
|
44
|
+
# @return [SLCStationReport]
|
45
|
+
def master_station
|
46
|
+
SLCStationReport.new(@fields[0..4], true)
|
47
|
+
end
|
48
|
+
|
49
|
+
# Station statuses. Master station at index 0, all secondary stations at their index number
|
50
|
+
# @!parse attr_reader :stations
|
51
|
+
# @return [Array<SLCStationReport>]
|
52
|
+
def stations
|
53
|
+
[
|
54
|
+
master_station,
|
55
|
+
SLCStationReport.new(@fields[5..9], false),
|
56
|
+
SLCStationReport.new(@fields[10..14], false),
|
57
|
+
SLCStationReport.new(@fields[15..19], false),
|
58
|
+
SLCStationReport.new(@fields[20..24], false),
|
59
|
+
SLCStationReport.new(@fields[25..29], false)
|
60
|
+
]
|
61
|
+
end
|
62
|
+
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
require_relative "base_nmea"
|
2
|
+
|
3
|
+
module NMEAPlus
|
4
|
+
module Message
|
5
|
+
module NMEA
|
6
|
+
# SNC - Navigation Calculation Basis
|
7
|
+
# Basis for navigation calculations, Great Circle or Rhumb Line.
|
8
|
+
#
|
9
|
+
# Limited utility, no recommended replacement
|
10
|
+
class SNC < NMEAPlus::Message::NMEA::NMEAMessage
|
11
|
+
|
12
|
+
# Basis for navigation calculations, Great Circle or Rhumb Line
|
13
|
+
# @!parse attr_reader :calculation_basis
|
14
|
+
# @return [Symbol]
|
15
|
+
def calculation_basis
|
16
|
+
case @fields[1]
|
17
|
+
when 'G' then :great_circle
|
18
|
+
when 'R' then :rhumb_line
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
# Description of basis for navigation calculations
|
23
|
+
# @!parse attr_reader :calculation_basis_description
|
24
|
+
# @return [String]
|
25
|
+
def calculation_basis_description
|
26
|
+
case calculation_basis
|
27
|
+
when :great_circle then "Great Circle"
|
28
|
+
when :rhumb_line then "Rhumb Line"
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require_relative "base_nmea"
|
2
|
+
|
3
|
+
module NMEAPlus
|
4
|
+
module Message
|
5
|
+
module NMEA
|
6
|
+
# SNU - Loran-C SNR Status
|
7
|
+
#
|
8
|
+
# Loran-C warning flag for Signal-To-Noise-Ratio indicating that one or more Loran-C stations being used to produce
|
9
|
+
# Lat/Lon and other navigation data are unreliable.
|
10
|
+
# The use of $--GLC is recommended.
|
11
|
+
# @see GLC
|
12
|
+
class SNU < NMEAPlus::Message::NMEA::NMEAMessage
|
13
|
+
# Warning Flag
|
14
|
+
field_reader :warning_flag, 1, :_av_boolean
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require_relative "base_nmea"
|
2
|
+
|
3
|
+
module NMEAPlus
|
4
|
+
module Message
|
5
|
+
module NMEA
|
6
|
+
# SPS - Loran-C Predicted Signal Strength
|
7
|
+
# Limited utility, no recommended replacement.
|
8
|
+
class SPS < NMEAPlus::Message::NMEA::NMEAMessage
|
9
|
+
# Signal strength, dB
|
10
|
+
field_reader :signal_strength_db, 1, :_float
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require_relative "base_nmea"
|
2
|
+
|
3
|
+
module NMEAPlus
|
4
|
+
module Message
|
5
|
+
module NMEA
|
6
|
+
# SSF - Position Correction Offset
|
7
|
+
#
|
8
|
+
# Amount of offset, and direction of offset, applied to measured position Lat/Lon to produce a displayed position Lat/Lon.
|
9
|
+
# Limited utility, no recommended replacement
|
10
|
+
class SSF < NMEAPlus::Message::NMEA::NMEAMessage
|
11
|
+
|
12
|
+
# Latitude offset, minutes N/S
|
13
|
+
# @!parse attr_reader :latitude_offset_minutes
|
14
|
+
# @return [Float]
|
15
|
+
def latitude_offset_minutes
|
16
|
+
self.class.nsew_signed_float(@fields[1], @fields[2])
|
17
|
+
end
|
18
|
+
|
19
|
+
# Longitude offset, minutes E/W
|
20
|
+
# @!parse attr_reader :longitude_offset_minutes
|
21
|
+
# @return [Float]
|
22
|
+
def longitude_offset_minutes
|
23
|
+
self.class.nsew_signed_float(@fields[3], @fields[4])
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require_relative "base_nmea"
|
2
|
+
|
3
|
+
module NMEAPlus
|
4
|
+
module Message
|
5
|
+
module NMEA
|
6
|
+
# STR - Tracking Reference
|
7
|
+
#
|
8
|
+
# Transmitted prior to a sentence containing velocity-based data to indicate when velocity is measured over-the-ground or
|
9
|
+
# relative to the water.
|
10
|
+
#
|
11
|
+
# The use of appropriate ground or water-referenced approved sentences such as
|
12
|
+
# $--VBW, $--VHW or $--VTG is recommended.
|
13
|
+
# @see VBW
|
14
|
+
# @see VHW
|
15
|
+
# @see VTG
|
16
|
+
class STR < NMEAPlus::Message::NMEA::NMEAMessage
|
17
|
+
|
18
|
+
# @!parse attr_reader :tracking_reference
|
19
|
+
# @return [Symbol]
|
20
|
+
def tracking_reference
|
21
|
+
NMEA::NMEAMessage._av_boolean(@fields[1]) ? :ground : :water
|
22
|
+
|
23
|
+
end
|
24
|
+
|
25
|
+
# Description of tracking reference
|
26
|
+
# @!parse attr_reader :tracking_reference_description
|
27
|
+
# @return [String]
|
28
|
+
def tracking_reference_description
|
29
|
+
case tracking_reference
|
30
|
+
when :ground then "Ground reference"
|
31
|
+
when :water then "Water reference"
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require_relative "base_nmea"
|
2
|
+
|
3
|
+
module NMEAPlus
|
4
|
+
module Message
|
5
|
+
module NMEA
|
6
|
+
# SYS - Hybrid System Configuration
|
7
|
+
# Limited utility, no recommended replacement
|
8
|
+
class SYS < NMEAPlus::Message::NMEA::NMEAMessage
|
9
|
+
|
10
|
+
# Systems in use
|
11
|
+
# @!parse attr_reader :systems
|
12
|
+
# @return [Array<Symbol>]
|
13
|
+
def systems
|
14
|
+
abbr = {
|
15
|
+
'L' => :loran_c,
|
16
|
+
'O' => :omega,
|
17
|
+
'T' => :transit,
|
18
|
+
'G' => :gps,
|
19
|
+
'D' => :decca
|
20
|
+
}
|
21
|
+
|
22
|
+
# drop blank fields and convert to symbol
|
23
|
+
@fields[1..5].reject(&:empty?).map { |x| abbr[x] }
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require_relative "base_nmea"
|
2
|
+
|
3
|
+
module NMEAPlus
|
4
|
+
module Message
|
5
|
+
module NMEA
|
6
|
+
# TEC - TRANSIT Satellite Error Code & Doppler Count
|
7
|
+
# TRANSIT system is not operational, no recommended replacement.
|
8
|
+
class TEC < NMEAPlus::Message::NMEA::NMEAMessage
|
9
|
+
# Status: Maximum angle
|
10
|
+
field_reader :maximum_angle_flag, 1, :_av_boolean
|
11
|
+
|
12
|
+
# Status: Doppler count
|
13
|
+
field_reader :doppler_count_flag, 2, :_av_boolean
|
14
|
+
|
15
|
+
# Status: Iteration number
|
16
|
+
field_reader :iteration_number_flag, 3, :_av_boolean
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require_relative "base_nmea"
|
2
|
+
|
3
|
+
module NMEAPlus
|
4
|
+
module Message
|
5
|
+
module NMEA
|
6
|
+
# TEP - TRANSIT Satellite Predicted Elevation
|
7
|
+
# TRANSIT system is not operational, no recommended replacement.
|
8
|
+
class TEP < NMEAPlus::Message::NMEA::NMEAMessage
|
9
|
+
# Elevation, degrees
|
10
|
+
field_reader :elevation_degrees, 1, :_float
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require_relative "base_nmea"
|
2
|
+
|
3
|
+
module NMEAPlus
|
4
|
+
module Message
|
5
|
+
module NMEA
|
6
|
+
# TGA - TRANSIT Satellite Antenna & Geoidal Heights
|
7
|
+
# TRANSIT system is not operational, no recommended replacement.
|
8
|
+
class TGA < NMEAPlus::Message::NMEA::NMEAMessage
|
9
|
+
# Antenna height, meters
|
10
|
+
field_reader :antenna_height_meters, 1, :_float
|
11
|
+
|
12
|
+
# Geoidal height, meters
|
13
|
+
field_reader :geoidal_height_meters, 3, :_float
|
14
|
+
|
15
|
+
# Antenna geoidal height, meters
|
16
|
+
field_reader :antenna_geoidal_height_meters, 5, :_float
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
require_relative "base_nmea"
|
2
|
+
|
3
|
+
module NMEAPlus
|
4
|
+
module Message
|
5
|
+
module NMEA
|
6
|
+
# TIF - TRANSIT Satellite Initial Flag
|
7
|
+
# TRANSIT system is not operational, no recommended replacement
|
8
|
+
class TIF < NMEAPlus::Message::NMEA::NMEAMessage
|
9
|
+
|
10
|
+
# Satellite Initial Flag
|
11
|
+
# @!parse attr_reader :initial_flag
|
12
|
+
# @return [Symbol]
|
13
|
+
def initial_flag
|
14
|
+
case @fields[1]
|
15
|
+
when 'A' then :normal_operation
|
16
|
+
when 'V' then :set_initialization_data
|
17
|
+
when 'J' then :initialization_data_complete
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
# Description of initial flag
|
22
|
+
# @!parse attr_reader :initial_flag_description
|
23
|
+
# @return [String]
|
24
|
+
def initial_flag_description
|
25
|
+
case initial_flag
|
26
|
+
when :normal_operation then 'Normal operation'
|
27
|
+
when :set_initialization_data then 'Set initialization data'
|
28
|
+
when :initialization_data_complete then 'Initialization data complete'
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -4,30 +4,46 @@ module NMEAPlus
|
|
4
4
|
module Message
|
5
5
|
module NMEA
|
6
6
|
# TRF - TRANSIT Fix Data
|
7
|
+
# Time, date, position and information related to a TRANSIT fix.
|
8
|
+
# TRANSIT system is not operational, no recommended replacement.
|
7
9
|
class TRF < NMEAPlus::Message::NMEA::NMEAMessage
|
10
|
+
# UTC of position fix: Date and time
|
8
11
|
# @!parse attr_reader :utc_time
|
9
12
|
# @return [Time]
|
10
13
|
def utc_time
|
11
|
-
_utc_date_time(@fields[2], @fields[1])
|
14
|
+
self.class._utc_date_time(@fields[2], @fields[1])
|
12
15
|
end
|
13
16
|
|
17
|
+
# Latitude, N/S
|
14
18
|
# @!parse attr_reader :latitude
|
15
19
|
# @return [Float]
|
16
20
|
def latitude
|
17
21
|
self.class.degrees_minutes_to_decimal(@fields[3], @fields[4])
|
18
22
|
end
|
19
23
|
|
24
|
+
# Longitude, E/W
|
20
25
|
# @!parse attr_reader :longitude
|
21
26
|
# @return [Float]
|
22
27
|
def longitude
|
23
28
|
self.class.degrees_minutes_to_decimal(@fields[5], @fields[6])
|
24
29
|
end
|
25
30
|
|
31
|
+
# Elevation angle
|
26
32
|
field_reader :elevation_angle, 7, :_float
|
33
|
+
|
34
|
+
# Number of iterations
|
27
35
|
field_reader :iterations, 8, :_integer
|
36
|
+
|
37
|
+
# Number of Doppler intervals
|
28
38
|
field_reader :doppler_intervals, 9, :_integer
|
39
|
+
|
40
|
+
# Update distance, nautical miles
|
29
41
|
field_reader :update_distance_nautical_miles, 10, :_float
|
42
|
+
|
43
|
+
# Satellite ID
|
30
44
|
field_reader :satellite, 11, :_integer
|
45
|
+
|
46
|
+
# Data status
|
31
47
|
field_reader :valid?, 12, :_av_boolean
|
32
48
|
end
|
33
49
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require_relative "base_nmea"
|
2
|
+
|
3
|
+
module NMEAPlus
|
4
|
+
module Message
|
5
|
+
module NMEA
|
6
|
+
# TRP - TRANSIT Satellite Predicted Direction of Rise
|
7
|
+
# TRANSIT system is not operational, no recommended replacement
|
8
|
+
class TRP < NMEAPlus::Message::NMEA::NMEAMessage
|
9
|
+
# Southeasterly = SE, southwesterly = SW
|
10
|
+
field_reader :predicted_rise_direction, 1, :_string
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|