-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPOS.yaml
More file actions
71 lines (66 loc) · 2.26 KB
/
Copy pathPOS.yaml
File metadata and controls
71 lines (66 loc) · 2.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
spec_version: "1"
plugin:
name: Label_44_POS
type: text
docs: https://github.com/airframesio/acars-message-documentation/blob/main/research/44/POS.md
decode_level: FULL
qualifiers:
labels: ["44"]
preambles: ["00POS01", "00POS02", "00POS03", "POS01", "POS02", "POS03"]
parse:
- regex: "^.*,(?<unsplit_coords>.*),(?<flight_level_or_ground>.*),(?<departure_icao>.*),(?<arrival_icao>.*),(?<current_date>.*),(?<current_time>.*),(?<eta_time>.*),(?<fuel_in_tons>.*)$"
on: $message.text
into: m
fields:
- name: position
from: $m.unsplit_coords
decode:
fn: coordinate_decimal_minutes
args: { style: combined, format: "NSDDMM_M_EWDDMM_M" }
- name: flight_level_raw
from: $m.flight_level_or_ground
# Intermediate value feeding `altitude`; legacy never stored it in raw.
raw: false
decode:
fn: custom
custom: parse_flight_level_or_ground
- name: altitude
from: $flight_level_raw
decode:
fn: custom
custom: flight_level_to_altitude_feet
- name: month
from: $m.current_date
decode: { fn: integer, args: { substring_start: 0, substring_length: 2 } }
- name: day
from: $m.current_date
decode: { fn: integer, args: { substring_start: 2, substring_length: 2 } }
- name: timestamp
from: $m.current_time
decode: { fn: timestamp_hhmmss, args: { append: "00" } }
- name: eta
from: $m.eta_time
decode: { fn: timestamp_hhmmss, args: { append: "00" } }
- name: fuel_in_tons
from: $m.fuel_in_tons
when: { not: { in: [$m.fuel_in_tons, ["***", "****"]] } }
decode: { fn: float }
- name: departure_icao
from: $m.departure_icao
decode: { fn: airport }
- name: arrival_icao
from: $m.arrival_icao
decode: { fn: airport }
formatted:
description: "Position Report"
items:
- { type: position, value: $position }
- { type: month, value: $month }
- { type: day, value: $day }
- { type: timestamp, value: $timestamp }
- { type: eta, value: $eta }
# fuel_in_tons is raw-only in the legacy plugin (no formatted item);
# the field's auto-raw emit covers it now that no formatter consumes it.
- { type: airport_origin, value: $departure_icao }
- { type: airport_destination, value: $arrival_icao }
- { type: altitude, value: $altitude }