bool LXDevice::ParseNMEA(const char *String, NMEAInfo &info) { if (!VerifyNMEAChecksum(String)) return false; NMEAInputLine line(String); char type[16]; line.Read(type, 16); if (StringIsEqual(type, "$LXWP0")) return LXWP0(line, info); if (StringIsEqual(type, "$LXWP1")) return LXWP1(line, info); if (StringIsEqual(type, "$LXWP2")) return LXWP2(line, info); if (StringIsEqual(type, "$LXWP3")) return LXWP3(line, info); if (StringIsEqual(type, "$PLXVF")) return PLXVF(line, info); if (StringIsEqual(type, "$PLXVS")) return PLXVS(line, info); return false; }
bool ZanderDevice::ParseNMEA(const char *String, NMEAInfo &info) { if (!VerifyNMEAChecksum(String)) return false; NMEAInputLine line(String); char type[16]; line.Read(type, 16); if (StringIsEqual(type, "$PZAN1")) return PZAN1(line, info); if (StringIsEqual(type, "$PZAN2")) return PZAN2(line, info); if (StringIsEqual(type, "$PZAN3")) return PZAN3(line, info); if (StringIsEqual(type, "$PZAN4")) return PZAN4(line, info); if (StringIsEqual(type, "$PZAN5")) return PZAN5(line, info); return false; }
bool EWMicroRecorderDevice::ParseNMEA(const char *String, NMEAInfo &info) { if (!VerifyNMEAChecksum(String)) return false; NMEAInputLine line(String); char type[16]; line.Read(type, 16); if (StringIsEqual(type, "$PGRMZ")) { fixed value; /* The normal Garmin $PGRMZ line contains the "true" barometric altitude above MSL (corrected with QNH), but EWMicroRecorder differs here slightly: it emits the uncorrected barometric altitude. That is the only reason why we catch this sentence in the driver instead of letting the generic class NMEAParser do it. */ if (ReadAltitude(line, value)) info.ProvidePressureAltitude(value); return true; } else return false; }
bool ZanderDevice::ParseNMEA(const char *String, NMEA_INFO *GPS_INFO) { if (!VerifyNMEAChecksum(String)) return false; NMEAInputLine line(String); char type[16]; line.read(type, 16); if (strcmp(type, "$PZAN1") == 0) return PZAN1(line, GPS_INFO); if (strcmp(type, "$PZAN2") == 0) return PZAN2(line, GPS_INFO); if (strcmp(type, "$PZAN3") == 0) return PZAN3(line, GPS_INFO); if (strcmp(type, "$PZAN4") == 0) return PZAN4(line, GPS_INFO); if (strcmp(type, "$PZAN5") == 0) return PZAN5(line, GPS_INFO); return false; }
virtual void LineReceived(const char *_line) { if (!VerifyNMEAChecksum(_line)) return; NMEAInputLine line(_line); if (line.read_compare("$PDVSC")) PDVSC(line); }
bool OpenVarioDevice::ParseNMEA(const char *_line, NMEAInfo &info) { if (!VerifyNMEAChecksum(_line)) return false; NMEAInputLine line(_line); if (line.ReadCompare("$POV")) return POV(line, info); return false; }
bool VolksloggerDevice::ParseNMEA(const char *String, NMEAInfo &info) { if (!VerifyNMEAChecksum(String)) return false; NMEAInputLine line(String); char type[16]; line.Read(type, 16); if (StringIsEqual(type, "$PGCS")) return vl_PGCS1(line, info); else return false; }
bool GTAltimeterDevice::ParseNMEA(const char *_line, NMEAInfo &info) { if (!VerifyNMEAChecksum(_line)) return false; NMEAInputLine line(_line); char type[16]; line.Read(type, 16); if (StringIsEqual(type, "$LK8EX1")) return LK8EX1(line, info); return false; }
bool CondorDevice::ParseNMEA(const char *String, NMEAInfo &info) { if (!VerifyNMEAChecksum(String)) return false; NMEAInputLine line(String); char type[16]; line.Read(type, 16); if (StringIsEqual(type, "$LXWP0")) return cLXWP0(line, info); return false; }
bool FlarmDevice::ParseNMEA(const char *_line, NMEAInfo &info) { if (!VerifyNMEAChecksum(_line)) return false; NMEAInputLine line(_line); char type[16]; line.Read(type, 16); if (strcmp(type, "$PFLAC") == 0) return ParsePFLAC(line); else return false; }
bool FlymasterF1Device::ParseNMEA(const char *String, NMEAInfo &info) { if (!VerifyNMEAChecksum(String)) return false; NMEAInputLine line(String); char type[16]; line.Read(type, 16); if (StringIsEqual(type, "$VARIO")) return VARIO(line, info); else return false; }
virtual void LineReceived(const char *_line) { const char *dollar = strchr(_line, '$'); if (dollar != NULL) _line = dollar; if (!VerifyNMEAChecksum(_line)) return; NMEAInputLine line(_line); char cmd[32]; line.Read(cmd, ARRAY_SIZE(cmd)); if (strcmp(cmd, "$PFLAC") == 0) PFLAC(line); else if (strcmp(cmd, "$PFLAX") == 0) PFLAX(); }
bool WesterboerDevice::ParseNMEA(const char *String, NMEAInfo &info) { if (!VerifyNMEAChecksum(String)) return false; NMEAInputLine line(String); char type[16]; line.read(type, 16); if (StringIsEqual(type, "$PWES0")) return PWES0(line, info); if (StringIsEqual(type, "$PWES1")) return PWES1(line, info); return false; }
bool FlytecDevice::ParseNMEA(const char *_line, NMEAInfo &info) { if (!VerifyNMEAChecksum(_line)) return false; NMEAInputLine line(_line); char type[16]; line.Read(type, 16); if (StringIsEqual(type, "$BRSF")) return FlytecParseBRSF(line, info); else if (StringIsEqual(type, "$VMVABD")) return FlytecParseVMVABD(line, info); else if (StringIsEqual(type, "$FLYSEN")) return ParseFLYSEN(line, info); else return false; }
bool ILECDevice::ParseNMEA(const char *_line, NMEAInfo &info) { if (!VerifyNMEAChecksum(_line)) return false; NMEAInputLine line(_line); char type[16]; line.Read(type, sizeof(type)); if (StringIsEqual(type, "$PILC")) { line.Read(type, sizeof(type)); if (StringIsEqual(type, "PDA1")) return ParsePDA1(line, info); else return false; } else return false; }
bool VaulterDevice::ParseNMEA(const char *_line, NMEAInfo &info) { if (!VerifyNMEAChecksum(_line)) return false; NMEAInputLine line(_line); char type[16]; line.Read(type, 16); if (StringIsEqual(type, "$PITV3")) return ParsePITV3(line, info); else if (StringIsEqual(type, "$PITV4")) return ParsePITV4(line, info); else if (StringIsEqual(type, "$PITV5")) return ParsePITV5(line, info); else return false; }
bool CAI302Device::ParseNMEA(const char *String, NMEAInfo &info) { if (!VerifyNMEAChecksum(String)) return false; NMEAInputLine line(String); char type[16]; line.read(type, 16); if (strcmp(type, "$PCAIB") == 0) return cai_PCAIB(line, info); if (strcmp(type, "$PCAID") == 0) return cai_PCAID(line, info); if (strcmp(type, "!w") == 0) return cai_w(line, info); return false; }
bool AltairProDevice::ParseNMEA(const char *String, NMEAInfo &info) { if (!VerifyNMEAChecksum(String)) return false; NMEAInputLine line(String); char type[16]; line.Read(type, 16); // no propriatary sentence if (StringIsEqual(type, "$PGRMZ")) { fixed value; if (ReadAltitude(line, value)) info.ProvidePressureAltitude(value); return true; } else if (StringIsEqual(type, "$PTFRS")) { return PTFRS(line, info); } return false; }
bool LXDevice::ParseNMEA(const char *String, NMEAInfo &info) { if (!VerifyNMEAChecksum(String)) return false; NMEAInputLine line(String); char type[16]; line.Read(type, 16); if (StringIsEqual(type, "$LXWP0")) return LXWP0(line, info); if (StringIsEqual(type, "$LXWP1")) { /* if in pass-through mode, assume that this line was sent by the secondary device */ DeviceInfo &device_info = mode == Mode::PASS_THROUGH ? info.secondary_device : info.device; LXWP1(line, device_info); const bool saw_v7 = device_info.product.equals("V7"); const bool saw_nano = device_info.product.equals("NANO"); const bool saw_lx16xx = device_info.product.equals("1606") || device_info.product.equals("1600"); if (mode == Mode::PASS_THROUGH) { /* in pass-through mode, we should never clear the V7 flag, because the V7 is still there, even though it's "hidden" currently */ is_v7 |= saw_v7; is_nano |= saw_nano; is_lx16xx |= saw_lx16xx; is_forwarded_nano = saw_nano; } else { is_v7 = saw_v7; is_nano = saw_nano; is_lx16xx = saw_lx16xx; } if (saw_v7 || saw_nano || saw_lx16xx) is_colibri = false; return true; } if (StringIsEqual(type, "$LXWP2")) return LXWP2(line, info); if (StringIsEqual(type, "$LXWP3")) return LXWP3(line, info); if (StringIsEqual(type, "$PLXV0")) { is_v7 = true; is_colibri = false; return PLXV0(line, v7_settings); } if (StringIsEqual(type, "$PLXVC")) { is_nano = true; is_colibri = false; PLXVC(line, info.device, info.secondary_device, nano_settings); is_forwarded_nano = info.secondary_device.product.equals("NANO"); return true; } if (StringIsEqual(type, "$PLXVF")) { is_v7 = true; is_colibri = false; return PLXVF(line, info); } if (StringIsEqual(type, "$PLXVS")) { is_v7 = true; is_colibri = false; return PLXVS(line, info); } return false; }
bool NMEAParser::NMEAChecksum(const char *string) { return VerifyNMEAChecksum(string); }