bp-new
alanbjohnston 5 years ago committed by GitHub
parent 3e2d920232
commit 1defbfd279
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -898,13 +898,13 @@ void get_tlm(void) {
char resBuffer[1000];
FILE * file_gps;
file_gps = popen("timeout 15 /home/pi/CubeSatSim/gpsd/gps.sh", "r");
file_gps = popen("timeout 60 /home/pi/CubeSatSim/gpsd/gps.sh", "r");
fgets(resBuffer, 1000, file_gps);
printf("GPS: %s \n", &resBuffer);
pclose(file_gps);
float lat_gps = 0.0f, lon_gps = 0.0f, alt_gps = 0.0f;
file_gps = popen("timeout 15 /home/pi/CubeSatSim/gpsd/gps.sh", "r");
file_gps = popen("timeout 60 /home/pi/CubeSatSim/gpsd/gps.sh", "r");
fscanf(file_gps, "%f %f %f", & lat_gps, & lon_gps, & alt_gps);
printf("GPS Data: %f, %f, %f \n", lat_gps, lon_gps, alt_gps);
pclose(file_gps);

Loading…
Cancel
Save

Powered by TurnKey Linux.