We recently got our GPS sensor working, and have finally been able to pull data from it! The following program shows how we got Speed, Heading, and Location Data from a Ublox Max-M8Q connected to our Arduino 101.
We’re going to be using this data along with an Input coordinate to plan a path for the glider, then use our previous PID Code so that our target direction will be determined by the difference between its current location and the target location/waypoint in 3D space.
SoftwareSerial gpsSerial(7, 8);
speed = gps.f_speed_mps();
heading = gps.f_course();
Serial.print("Heading: "); Serial.print(heading);
Serial.print("Speed: "); Serial.print(speed);
Serial.print("Position: ");Serial.print("lat: ");Serial.print(lat);Serial.print(" ");