mikalhart / TinyGPSPlus

A new, customizable Arduino NMEA parsing library
http://arduiniana.org
1.05k stars 486 forks source link

Usage questions #110

Open jan5650 opened 1 year ago

jan5650 commented 1 year ago

Hi Guys!

I got some question:

  1. if i use Serial1.begin(GPSBaud); instead "ss.begin(GPSBaud);" then its work with Arduino Mega (got hardware Serial1) ?

  2. if i set gps module to 5Hz rate, then the "while (ss.available() > 0) if (gps.encode(ss.read()))" line works fatser, and get values 5 times more?

  3. How many satelites can the Library use maximum? (Neo GPS use only 12 satelites)

  4. How can i query the Fix type? I want to begin computing only when fix type=3 (3D)

  5. Is there any way to query heading value? Or it is equal with course? I am using GPS compass, direction of moving from 2 gps coordinates. Can i use course for this, or there is heading values?

Thank you!

TD-er commented 1 year ago

if i set gps module to 5Hz rate, then the "while (ss.available() > 0) if (gps.encode(ss.read()))" line works fatser, and get values 5 times more?

Keep in mind to also increase the baud rate on the GPS module. Most GPS modules produce roughly 11 sentences per second with the default sample rate of 1/sec. Not all sentences will have their max NMEA line length of 80 characters, but let's assume it as the upper limit, then you're at 880 characters max for 11 sentences, which is also about the maximum you can transfer in a second at 9600 baud. (assuming 11 bits per byte)