// ignore_for_file: constant_identifier_names import 'sentence.dart'; import 'parser.dart'; const TypeGLL = "GLL"; // ValidGLL character const ValidGLL = "A"; // InvalidGLL character const InvalidGLL = "V"; class GLL { double latitude; double longitude; Time time; String validity; String ffaMode; GLL( {required this.latitude, required this.longitude, required this.time, required this.validity, required this.ffaMode}); static GLL newGLL(BaseSentence s) { var p = Parser(s); var ffaMode = ""; if (s.fields.length > 6) { ffaMode = p.string(6, "FAA mode"); } return GLL( latitude: p.latLong(0, 1, "latitude"), longitude: p.latLong(2, 3, "longitude"), time: p.time(4, "time"), validity: p.enumString(5, "validity", [ValidGLL, InvalidGLL]), ffaMode: ffaMode); } }