I am able to transmit the GPS strings via XBEE but I don't know how to decode it through TinyGPS as there is no Rx or Tx pins that is receiving the data but the data is received by XBEE. In TinyGPS we first define the Rx and Tx pins but what should I do instead of that to decode the GPS data received by XBEE?
Just loop through the received packet and send each received byte to encode. If you have some buffer and a length, it could be for loop:
for (int i=0; i < length; i++) {
char c = buffer[i];
// Serial.write(c); // uncomment this line if you want to see the GPS data flowing
if (gps.encode(c)) // Did a new valid sentence come in?
newData = true;
}
If there are other things in the packet, be sure you're starting at the GPS data.
Cheers,
/dev