Commit 82b15ea6 authored by Markéta Jedličková's avatar Markéta Jedličková
Browse files

Gps fixture improvement

parent 0c94ba0b
......@@ -24,9 +24,6 @@
OpenCansatGPS gps;
// Setting of delay
const uint16_t msDelay = 2000;
void setup()
{
while (!SerialUSB) {}
......@@ -46,20 +43,15 @@ void loop()
// save start time in millisec
uint32_t start = millis();
if (gps.scan(600 * 1000))
if (gps.scan(250))
{
Serial.println(String(" time to find fix: ") + (millis() - start) + String("ms"));
Serial.println(String(" datetime = ") + gps.getDateTimeString());
Serial.println(String(" lat = ") + String(gps.getLat(), 7));
Serial.println(String(" lon = ") + String(gps.getLon(), 7));
Serial.println(String(" num sats = ") + String(gps.getNumberOfSatellites()));
Serial.println();
}
else
{
Serial.println("No Fix");
}
Serial.println(String("Delay: ") + msDelay + String("ms"));
delay(msDelay);
delay(250);
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment