Simple golang implementation of a parser for the SCT2 file format as used in VATSIM. Based on the specification in the VRC documentation ((1), (2)).
Basic usage:
contents, err := os.ReadFile(filename)
if err != nil {
fmt.Fprintf(os.Stderr, "%s: %s", filename, err)
}
errorCallback := func(err string) {
fmt.Fprint(os.Stderr, err)
}
sectorFile, err := sct2.Parse(contents, filename, errorCallback)
if err != nil {
fmt.Fprintf(os.Stderr, "%s: %s", filename, err)
} else {
sectorFile.Write(os.Stdout)
}
The provided sct2print
utility parses a SCT2 file and then prints its
contents to standard output.