X-Git-Url: https://git.xandkar.net/?p=erlang-x-plane-data.git;a=blobdiff_plain;f=src%2Fx_plane_data_group_speeds.erl;fp=src%2Fx_plane_data_group_speeds.erl;h=c8f9253b7f619047628091d8e5d122ce9df8623c;hp=0000000000000000000000000000000000000000;hb=84fa8ccb7143428a0aa49ceeb632ff45b374d8b8;hpb=10d6d4c7bd29e99c67024e8a08a2b35f8da1c4de diff --git a/src/x_plane_data_group_speeds.erl b/src/x_plane_data_group_speeds.erl new file mode 100644 index 0000000..c8f9253 --- /dev/null +++ b/src/x_plane_data_group_speeds.erl @@ -0,0 +1,30 @@ +-module(x_plane_data_group_speeds). + +-include("include/x_plane_data_group_speeds.hrl"). + +-export_type( + [ t/0 + ]). + +-export( + [ of_raw_values_v10/1 + ]). + +-define(T, #?MODULE). + +-type t() :: + ?T{}. + +-spec of_raw_values_v10(x_plane_data_raw:group_values()) -> + t(). +of_raw_values_v10({V1, V2, V3, V4, _, V6, V7, V8}) -> + ?T + { vind_kias = V1 + , vind_keas = V2 + , vtrue_ktas = V3 + , vtrue_ktgs = V4 + + , vind_mph = V6 + , vtrue_mphas = V7 + , vtrue_mphgs = V8 + }.