@Test public void NmeaSentence_EmptyNmeaSentence_HDOPIsNull(){ NmeaSentence nmeaSentence = new NmeaSentence("$GPGGA,,,,,,,,,,,,,,*47"); assertThat("HDOP null by default", nmeaSentence.getLatestHdop(), nullValue()); }
public String getLatestHdop(){ if (isGGA()) { if (nmeaParts.length > 8 &&!Strings.isNullOrEmpty(nmeaParts[8])) { return nmeaParts[8]; } } else if (isGSA()) { if (nmeaParts.length > 16 &&!Strings.isNullOrEmpty(nmeaParts[16])) { return nmeaParts[16]; } } return null; }
NmeaSentence { public String getLatestHdop(){ if (isGGA()) { if (nmeaParts.length > 8 &&!Strings.isNullOrEmpty(nmeaParts[8])) { return nmeaParts[8]; } } else if (isGSA()) { if (nmeaParts.length > 16 &&!Strings.isNullOrEmpty(nmeaParts[16])) { return nmeaParts[16]; } } return null; } }
NmeaSentence { public String getLatestHdop(){ if (isGGA()) { if (nmeaParts.length > 8 &&!Strings.isNullOrEmpty(nmeaParts[8])) { return nmeaParts[8]; } } else if (isGSA()) { if (nmeaParts.length > 16 &&!Strings.isNullOrEmpty(nmeaParts[16])) { return nmeaParts[16]; } } return null; } NmeaSentence(String nmeaSentence); }
NmeaSentence { public String getLatestHdop(){ if (isGGA()) { if (nmeaParts.length > 8 &&!Strings.isNullOrEmpty(nmeaParts[8])) { return nmeaParts[8]; } } else if (isGSA()) { if (nmeaParts.length > 16 &&!Strings.isNullOrEmpty(nmeaParts[16])) { return nmeaParts[16]; } } return null; } NmeaSentence(String nmeaSentence); boolean isLocationSentence(); String getLatestPdop(); String getLatestVdop(); String getLatestHdop(); String getGeoIdHeight(); String getAgeOfDgpsData(); String getDgpsId(); }
NmeaSentence { public String getLatestHdop(){ if (isGGA()) { if (nmeaParts.length > 8 &&!Strings.isNullOrEmpty(nmeaParts[8])) { return nmeaParts[8]; } } else if (isGSA()) { if (nmeaParts.length > 16 &&!Strings.isNullOrEmpty(nmeaParts[16])) { return nmeaParts[16]; } } return null; } NmeaSentence(String nmeaSentence); boolean isLocationSentence(); String getLatestPdop(); String getLatestVdop(); String getLatestHdop(); String getGeoIdHeight(); String getAgeOfDgpsData(); String getDgpsId();  }