I made a GPS library for decoding NMEA protocol

Mikal,

That's a much better idea, returning a boolean from the encode method is an excellent solution.