Documentation
¶
Overview ¶
Package igc parses IGC files.
See https://www.fai.org/sites/default/files/igc_fr_specification_with_al8_2023-2-1_0.pdf.
Index ¶
- Variables
- type ARecord
- type BRecord
- type CRecordDeclaration
- type CRecordWaypoint
- type DRecord
- type ERecord
- type ERecordWithoutTLC
- type Error
- type FRecord
- type GPSQualifier
- type GRecord
- type HFDTERecord
- type HRecord
- type HRecordWithInvalidSource
- type IGC
- type IRecord
- type JRecord
- type KRecord
- type LRecord
- type LRecordWithoutTLC
- type MRecord
- type Manufacturer
- type NRecord
- type ParseOption
- type Record
- type RecordAddition
- type Source
- type Validity
Constants ¶
This section is empty.
Variables ¶
var ( // ApprovedManufacturersByTLC is a map of three-letter codes to approved manufacturers. ApprovedManufacturersByTLC map[string]*Manufacturer // ManufacturersByTLC is a map of three-letter codes to approved or non-approved manufacturers. ManufacturersByTLC map[string]*Manufacturer )
var ApprovedManufacturers = []Manufacturer{
{TLC: "ACT", SCC: 'I', Name: "Aircotec"},
{TLC: "AVX", Name: "Avionix"},
{TLC: "CAM", SCC: 'C', Name: "Cambridge Aero Instruments"},
{TLC: "CNI", Name: "ClearNav Instruments"},
{TLC: "DSX", SCC: 'D', Name: "Data Swan/DSX"},
{TLC: "EWA", SCC: 'E', Name: "EW Avionics"},
{TLC: "FIL", SCC: 'F', Name: "Filser"},
{TLC: "FLA", SCC: 'G', Name: "Flarm (Flight Alarm)"},
{TLC: "FLY", Name: "Flytech"},
{TLC: "GCS", SCC: 'A', Name: "Garrecht"},
{TLC: "IMI", SCC: 'M', Name: "IMI Gliding Equipment"},
{TLC: "LGS", Name: "Logstream"},
{TLC: "LXN", SCC: 'L', Name: "LX Navigation"},
{TLC: "LXV", SCC: 'V', Name: "LXNAV d.o.o."},
{TLC: "NAV", Name: "Naviter"},
{TLC: "NTE", SCC: 'N', Name: "New Technologies s.r.l."},
{TLC: "NKL", SCC: 'K', Name: "Nielsen Kellerman"},
{TLC: "PES", SCC: 'P', Name: "Peschges"},
{TLC: "PFE", Name: "PressFinish Electronics"},
{TLC: "PRT", SCC: 'R', Name: "Print Technik"},
{TLC: "RCE", Name: "RC Electronics"},
{TLC: "SCH", SCC: 'H', Name: "Scheffel"},
{TLC: "SDI", SCC: 'S', Name: "Streamline Data Instruments"},
{TLC: "TRI", SCC: 'T', Name: "Triadis Engineering GmbH"},
{TLC: "ZAN", SCC: 'Z', Name: "Zander"},
}
ApprovedManufacturers is the list of approved manufacturers.
var NonApprovedManufacturers = []Manufacturer{
{TLC: "XAH", SCC: 'X', Name: "Ascent"},
{TLC: "XBM", SCC: 'X', Name: "Burnair"},
{TLC: "XCM", SCC: 'X', Name: "Naviter"},
{TLC: "XCS", SCC: 'X', Name: "XCSoar"},
{TLC: "XCT", SCC: 'X', Name: "XC Track"},
{TLC: "XGD", SCC: 'X', Name: "GpsDump"},
{TLC: "XFH", SCC: 'X', Name: "Flyskyhy"},
{TLC: "XFL", SCC: 'X', Name: "FlyMe"},
{TLC: "XFM", SCC: 'X', Name: "Flymaster"},
{TLC: "XLK", SCC: 'X', Name: "LK8000"},
{TLC: "XNA", SCC: 'X', Name: "Naviter"},
{TLC: "XSD", SCC: 'X', Name: "Stodeus"},
{TLC: "XSE", SCC: 'X', Name: "Syride"},
{TLC: "XSR", SCC: 'X', Name: "Syride"},
{TLC: "XSX", SCC: 'X', Name: "Skytraxx"},
{TLC: "XTR", SCC: 'X', Name: "XC Tracer"},
{TLC: "XTT", SCC: 'X', Name: "LiveTrack24"},
{TLC: "XVB", SCC: 'X', Name: "VairBration"},
{TLC: "XVV", SCC: 'V', Name: "Vector Vario"},
}
NonApprovedManufacturers is an unofficial list of non-approved manufacturers.
Functions ¶
This section is empty.
Types ¶
type BRecord ¶
type BRecord struct { Time time.Time Lat float64 Lon float64 Validity Validity AltWGS84 float64 AltBarometric float64 Additions map[string]int }
A BRecord is a B record, which contains a fix.
type CRecordDeclaration ¶
type CRecordDeclaration struct { DeclarationTime time.Time FlightYear int FlightMonth int FlightDay int TaskNumber int NumberOfTurnpoints int Text string }
A CRecordDeclaration is a first C record, which contains the first line of a pre-declared task.
func (*CRecordDeclaration) Type ¶
func (r *CRecordDeclaration) Type() byte
func (*CRecordDeclaration) Valid ¶
func (r *CRecordDeclaration) Valid() bool
type CRecordWaypoint ¶
A CRecordWaypoint is a C record, which contains a waypoint in a declared task.
func (*CRecordWaypoint) Type ¶
func (r *CRecordWaypoint) Type() byte
func (*CRecordWaypoint) Valid ¶
func (r *CRecordWaypoint) Valid() bool
type DRecord ¶
type DRecord struct { GPSQualifier GPSQualifier DGPSStationID int }
A DRecord is a D record, which contains differential GPS information.
type ERecordWithoutTLC ¶
An ERecordWithoutTLC is an E record without a three-letter code, which contains an event.
func (*ERecordWithoutTLC) Type ¶
func (r *ERecordWithoutTLC) Type() byte
func (*ERecordWithoutTLC) Valid ¶
func (r *ERecordWithoutTLC) Valid() bool
type GPSQualifier ¶
type GPSQualifier byte
A GPSQualifier is a GPS qualifier.
const ( GPSQualifierGPS GPSQualifier = '1' GPSQualifierDGPS GPSQualifier = '2' )
GPSQualifiers.
type GRecord ¶
type GRecord struct {
Text string
}
A GRecord is a G record, which is a security record.
func (*GRecord) Valid ¶
Valid returns whether the G record does not have any syntax errors. Since G records have freeform text, they never contain syntax errors, so this function always returns true.
To determine whether a G record is valid cryptographically, use github.com/twpayne/go-igc/civlovs instead.
type HFDTERecord ¶
An HFDTERecord is an HFDTE record, which is a header containing the date.
type HRecordWithInvalidSource ¶
An HRecordWithInvalidSource is an H record, which is a header.
func (*HRecordWithInvalidSource) Type ¶
func (r *HRecordWithInvalidSource) Type() byte
func (*HRecordWithInvalidSource) Valid ¶
func (r *HRecordWithInvalidSource) Valid() bool
type IGC ¶
type IGC struct { Records []Record BRecords []*BRecord HRecordsByTLC map[string]*HRecord KRecords []*KRecord Errs []error }
An IGC is a parsed IGC file.
func Parse ¶
func Parse(r io.Reader, options ...ParseOption) (*IGC, error)
Parse parses an IGC from r.
func ParseLines ¶
func ParseLines(lines []string, options ...ParseOption) (*IGC, error)
Parse parses an IGC from lines.
type IRecord ¶
type IRecord struct {
Additions []RecordAddition
}
An IRecord is an I record, which contains additions to B records.
type JRecord ¶
type JRecord struct {
Additions []RecordAddition
}
A JRecord is a J record, which contains additions to K records.
type KRecord ¶
A KRecord is a K record, which contains information needed less frequently than fixes.
type LRecordWithoutTLC ¶
type LRecordWithoutTLC struct {
Text string
}
An LRecordWithoutTLC is an L record without a three-letter code, which contains a log message.
func (*LRecordWithoutTLC) Type ¶
func (r *LRecordWithoutTLC) Type() byte
func (*LRecordWithoutTLC) Valid ¶
func (r *LRecordWithoutTLC) Valid() bool
type MRecord ¶
type MRecord struct {
Additions []RecordAddition
}
An MRecord is an M record, which contains additions to N records.
type Manufacturer ¶
A Manufacturer is a manufacturer.
func (*Manufacturer) Approved ¶
func (m *Manufacturer) Approved() bool
Approved returns whether m is approved.
type ParseOption ¶
type ParseOption func(*parser)
func WithAllowInvalidChars ¶
func WithAllowInvalidChars(allowInvalidChars bool) ParseOption
type RecordAddition ¶
An RecordAddition is an addition to a B, K, or N record.
Directories
¶
Path | Synopsis |
---|---|
Package civlovs provides a client interface to CIVL's Open Validation Server.
|
Package civlovs provides a client interface to CIVL's Open Validation Server. |
cmd
|
|
parse-all
command
|
|
summarize-igc
command
|
|
validate-igc
command
|