This commit is contained in:
2025-02-21 08:20:41 +01:00
parent 1be6b0681f
commit ff9636b75b
330 changed files with 0 additions and 36926 deletions
-35
View File
@@ -1,35 +0,0 @@
import 'package:nmea/nmea.dart';
class Gngga extends TalkerSentence {
static const String id = "GNGGA";
Gngga({required super.raw});
@override
bool get valid => super.valid && fields.length == 15;
String get utcOfPositionFix => fields[1];
int get gpsQualityIndicator => int.parse(fields[6]);
double get latitude => _getCoordinateFromGpsLatitude(fields[2]);
String get latitudeDirection => fields[3];
double get longitude => _getCoordinateFromGpsLongitude(fields[4]);
String get longitudeDirection => fields[5];
int get numberOfSvsInUse => int.parse(fields[7]);
double get hdop => double.parse(fields[8]);
double get altitudeAboveMeanSeaLevel => double.parse(fields[9]);
double get geoidSeparation => double.parse(fields[11]);
double _getCoordinateFromGpsLongitude(String coordinate) {
double result =
double.parse("${coordinate[0]}${coordinate[1]}${coordinate[2]}") +
double.parse(coordinate.substring(3)) / 60;
return result;
}
double _getCoordinateFromGpsLatitude(String coordinate) {
double result = double.parse("${coordinate[0]}${coordinate[1]}") +
double.parse(coordinate.substring(2)) / 60;
return result;
}
}
-18
View File
@@ -1,18 +0,0 @@
import 'package:nmea/nmea.dart';
class Gngst extends TalkerSentence {
static const String id = "GNGST";
Gngst({required super.raw});
@override
bool get valid => super.valid && fields.length == 9;
String get utcOfPositionFix => fields[1];
double get rms => double.parse(fields[2]);
double get errorEllipseSemiMajorAxis => double.parse(fields[3]);
double get errorEllipseSemiMinorAxis => double.parse(fields[4]);
double get errorEllipseOrientation => double.parse(fields[5]);
double get longitudeError => double.parse(fields[6]);
double get latitudeError => double.parse(fields[7]);
double get heightError => double.parse(fields[8]);
}
-38
View File
@@ -1,38 +0,0 @@
import 'package:nmea/nmea.dart';
class Gnrmc extends TalkerSentence {
static const String id = "GNRMC";
Gnrmc({required super.raw});
@override
bool get valid => super.valid && fields.length == 14;
String get messageId => fields[0];
String get utcOfPositionFix => fields[1];
String get Status => fields[2];
double get latitude => _getCoordinateFromGpsLatitude(fields[3]);
String get latitudeDirection => fields[4];
double get longitude => _getCoordinateFromGpsLongitude(fields[5]);
String get longitudeDirection => fields[6];
double get speedOverGroundKnots => double.parse(fields[7]);
double get courseOverGround => double.parse(fields[8]);
String get date => fields[9];
double get magneticVariation => double.parse(fields[10]);
String get magneticVariationDirection => fields[11];
String get positioningSystemModeIndicator => fields[12];
double _getCoordinateFromGpsLongitude(String coordinate) {
double result =
double.parse("${coordinate[0]}${coordinate[1]}${coordinate[2]}") +
double.parse(coordinate.substring(3)) / 60;
return result;
}
double _getCoordinateFromGpsLatitude(String coordinate) {
double result = double.parse("${coordinate[0]}${coordinate[1]}") +
double.parse(coordinate.substring(2)) / 60;
return result;
}
}