IGC.Parser (igc v1.0.0)

Link to this section Summary

Types

The record emitted by the stream

Functions

Parses an IGC file and creates a stream of the following IGC record types

Like parse/1, but filters the stream to only the specified types. For example, to only get the positional updates

Link to this section Types

@type record() :: {:fix, IGC.Fix.t(), IGC.Headers.t()}

The record emitted by the stream

Link to this section Functions

Parses an IGC file and creates a stream of the following IGC record types:

  • :fix [B record]: Positional updates
  • :pilot_event [E record]: Pilot event
  • :data [K record]: Additional data as described in the headers
  • :satellite_constellation [F record]: Satellite constellation data and changes
  • :logbook [L records]: Logbook entries

Each stem entry is a tuple following the format {type, data, headers}.

Link to this function

parse(stream, filter)

Like parse/1, but filters the stream to only the specified types. For example, to only get the positional updates:

IGC.parse(stream, [:fix])
Link to this function

take(line, n, value \\ "")

@spec take(String.t(), non_neg_integer(), String.t()) ::
  {:ok, String.t(), String.t()} | {:error, atom()}
@spec take(String.t(), non_neg_integer(), :int) ::
  {:ok, integer(), String.t()} | {:error, atom()}