Hi . Ive done a program that reads from a GPS device from a serialport. My only problem is that it gives me strange stuff.
The strings i get look like this:
NMEA Sentence [$GPRMC,160718.0�00,A,5746.587�4,N,01150.6604,E,0.3 0�,125.53,050211�,,,A*6C]
where � = a square.
how can i fix this? thanks
I think you need set encoding for input stream.
Thank you for your reply . how can i do that? There is no such class ?
How you get this string. Can you show snippet code, which get string?
I know its a lot of trash in it ... but Ive edited it soo much trying to get to the problem =P any ideas?
/CODE WAS HERE/
Removed because my teachers will kill me if their "search bot" finds my code online.
You can try follows
String encoding = "UTF-8"; //need encoding
InputStreamReader reader = new InputStreamReader(inStream, encoding);
What should that String look like according to that GPS device manual?
Originally Posted by santa
I think i fixed it by just removing the unknown signs.. because it added them randomly and without them it seems to be the correct length