return data;
}
//TODO: to be tested
public NMEAPoint getNextNMEAPoint(){
NMEAPoint nmeaPoint;
String[] data = this.read();
if(data == null)return null;
LatLngPoint point = new LatLngPoint(Double.parseDouble(data[3]),Double.parseDouble(data[5]),"point_"+readPoints,"point_"+readPoints);
Date date = new Date();
String month = data[9].substring(2,3);
String day = data[9].substring(0,1);
String year = data[9].substring(4,5);
String hours = data[1].substring(0,1);
String minutes = data[1].substring(2,3);
String seconds = data[1].substring(4,5);
String sDate = month+"-"+day+"-"+year+" "+hours+":"+minutes+":"+seconds;
try {
SimpleDateFormat formatter = new SimpleDateFormat("MM-dd-yy HH:mm:ss");
ParsePosition pos = new ParsePosition(0);
date = formatter.parse(sDate,pos);
}
catch (RuntimeException e) {
e.printStackTrace();
}
nmeaPoint = new NMEAPoint(point,date,true,"","",1.1,1.1,1.1);
readPoints++;
return nmeaPoint;
}