gnssview_old/plugins/gnss/lib/nmea/hdt.dart

21 lines
401 B
Dart
Raw Permalink Normal View History

2024-07-31 19:04:11 +08:00
// ignore_for_file: constant_identifier_names
import 'parser.dart';
import 'sentence.dart';
const TypeHDT = "HDT";
class HDT {
double heading;
bool isTrue;
HDT({required this.heading, required this.isTrue});
static HDT newHDT(BaseSentence s) {
var p = Parser(s);
return HDT(
heading: p.float64(0, "heading"),
isTrue: p.enumString(1, "true", ["T"]) == "T",
);
}
}