Class: OGNClient::SenderBeacon
- Defined in:
- lib/ogn_client/messages/sender_beacon.rb
Constant Summary collapse
- SENDER_BEACON_PATTERN =
%r( id(?<details>\w{2})(?<id>\w{6})\s? (?:(?<climb_rate>[+-]\d+?)fpm\s)? (?:(?<turn_rate>[+-][\d.]+?)rot\s)? (?:FL(?<flight_level>[\d.]+)\s)? (?:(?<signal_quality>[\d.]+?)dB\s)? (?:(?<errors>\d+)e\s)? (?:(?<frequency_offset>[+-][\d.]+?)kHz\s?)? (?:gps(?<gps_accuracy>\d+x\d+)\s?)? (?:s(?<flarm_software_version>[\d.]+)\s?)? (?:h(?<flarm_hardware_version>[\dA-F]{2})\s?)? (?:r(?<flarm_id>[\dA-F]+)\s?)? (?:(?<signal_power>[+-][\d.]+)dBm\s?)? (?:hear(?<proximity>.+))? $)x
- SENDER_TYPES =
{ 1 => :glider, 2 => :tow_plane, 3 => :helicopter_rotorcraft, 4 => :parachute, 5 => :drop_plane, 6 => :hang_glider, 7 => :para_glider, 8 => :powered_aircraft, 9 => :jet_aircraft, 10 => :ufo, 11 => :balloon, 12 => :airship, 13 => :uav, 15 => :static_object }
- ADDRESS_TYPES =
{ 0 => :random, 1 => :icao, 2 => :flarm, 3 => :ogn }
Constants inherited from Message
Instance Attribute Summary collapse
-
#address_type ⇒ Object
readonly
see ADDRESS_TYPES.
-
#climb_rate ⇒ Object
readonly
meters per second.
-
#errors ⇒ Object
readonly
number of CRC errors.
-
#flarm_hardware_version ⇒ Object
readonly
version as “major”.
-
#flarm_id ⇒ Object
readonly
FLARM device ID.
-
#flarm_software_version ⇒ Object
readonly
version as “major.minor”.
-
#flight_level ⇒ Object
readonly
100 feet QNE.
-
#frequency_offset ⇒ Object
readonly
kilohertz.
-
#gps_accuracy ⇒ Object
readonly
array [vertical meters, horizontal meters].
-
#id ⇒ Object
readonly
device ID.
-
#no_tracking ⇒ Object
readonly
boolean.
-
#proximity ⇒ Object
readonly
array of FLARM device ID tails.
-
#sender_type ⇒ Object
readonly
see SENDER_TYPES.
-
#signal_power ⇒ Object
readonly
power ratio in dBm.
-
#signal_quality ⇒ Object
readonly
signal-to-noise ratio in decibel.
-
#stealth_mode ⇒ Object
readonly
boolean.
-
#turn_rate ⇒ Object
readonly
revolutions per minute.
Attributes inherited from Message
#altitude, #callsign, #ground_speed, #heading, #latitude, #longitude, #raw, #receiver, #time
Method Summary
Methods inherited from Message
Instance Attribute Details
#address_type ⇒ Object (readonly)
see ADDRESS_TYPES
46 47 48 |
# File 'lib/ogn_client/messages/sender_beacon.rb', line 46 def address_type @address_type end |
#climb_rate ⇒ Object
meters per second
51 52 53 |
# File 'lib/ogn_client/messages/sender_beacon.rb', line 51 def climb_rate @climb_rate end |
#errors ⇒ Object
number of CRC errors
55 56 57 |
# File 'lib/ogn_client/messages/sender_beacon.rb', line 55 def errors @errors end |
#flarm_hardware_version ⇒ Object
version as “major”
59 60 61 |
# File 'lib/ogn_client/messages/sender_beacon.rb', line 59 def flarm_hardware_version @flarm_hardware_version end |
#flarm_id ⇒ Object
FLARM device ID
60 61 62 |
# File 'lib/ogn_client/messages/sender_beacon.rb', line 60 def flarm_id @flarm_id end |
#flarm_software_version ⇒ Object
version as “major.minor”
58 59 60 |
# File 'lib/ogn_client/messages/sender_beacon.rb', line 58 def flarm_software_version @flarm_software_version end |
#flight_level ⇒ Object
100 feet QNE
50 51 52 |
# File 'lib/ogn_client/messages/sender_beacon.rb', line 50 def flight_level @flight_level end |
#frequency_offset ⇒ Object
kilohertz
56 57 58 |
# File 'lib/ogn_client/messages/sender_beacon.rb', line 56 def frequency_offset @frequency_offset end |
#gps_accuracy ⇒ Object
array [vertical meters, horizontal meters]
57 58 59 |
# File 'lib/ogn_client/messages/sender_beacon.rb', line 57 def gps_accuracy @gps_accuracy end |
#id ⇒ Object
device ID
47 48 49 |
# File 'lib/ogn_client/messages/sender_beacon.rb', line 47 def id @id end |
#no_tracking ⇒ Object (readonly)
boolean
49 50 51 |
# File 'lib/ogn_client/messages/sender_beacon.rb', line 49 def no_tracking @no_tracking end |
#proximity ⇒ Object
array of FLARM device ID tails
61 62 63 |
# File 'lib/ogn_client/messages/sender_beacon.rb', line 61 def proximity @proximity end |
#sender_type ⇒ Object (readonly)
see SENDER_TYPES
45 46 47 |
# File 'lib/ogn_client/messages/sender_beacon.rb', line 45 def sender_type @sender_type end |
#signal_power ⇒ Object
power ratio in dBm
53 54 55 |
# File 'lib/ogn_client/messages/sender_beacon.rb', line 53 def signal_power @signal_power end |
#signal_quality ⇒ Object
signal-to-noise ratio in decibel
54 55 56 |
# File 'lib/ogn_client/messages/sender_beacon.rb', line 54 def signal_quality @signal_quality end |
#stealth_mode ⇒ Object (readonly)
boolean
48 49 50 |
# File 'lib/ogn_client/messages/sender_beacon.rb', line 48 def stealth_mode @stealth_mode end |
#turn_rate ⇒ Object
revolutions per minute
52 53 54 |
# File 'lib/ogn_client/messages/sender_beacon.rb', line 52 def turn_rate @turn_rate end |