scan gps data

bp-new
alanbjohnston 5 years ago committed by GitHub
parent 008d833a68
commit c4f0e55bf1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -898,7 +898,14 @@ void get_tlm(void) {
char resBuffer[1000];
FILE * file_gps = popen("timeout 15 /home/pi/CubeSatSim/gpsd/gps.sh", "r");
fgets(resBuffer, 1000, file_gps);
printf("GPS: %s \n", &resBuffer);
printf("GPS: %s \n", &resBuffer);
pclose(file_gps);
float lat_gps = 0f, long_gps = 0f, alt_gps = 0f;
FILE * file_gps = popen("timeout 15 /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);
// printf("Str: %s \n", str);
if (mode != CW) {

Loading…
Cancel
Save

Powered by TurnKey Linux.