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

32 lines
782 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 TypeHEADINGA = "HEADINGA";
class HEADINGA {
double length;
double heading;
double pitch;
int numberSv;
int numberSa;
HEADINGA(
{required this.length,
required this.heading,
required this.pitch,
required this.numberSv,
required this.numberSa});
// HEADINGA({required this.heading, required this.isTrue});
static HEADINGA newHEADINGA(BaseSentence s) {
var p = Parser(s);
return HEADINGA(
length: p.float64(10, "length"),
heading: p.float64(11, "heading"),
pitch: p.float64(12, "pitch"),
numberSv: p.int64(17, "number of satellites"),
numberSa: p.int64(18, "number of satellites used"),
);
}
}