From 857dffb8d5ca2ee24eda62637305f84f9d190c69 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Sun, 11 Jul 2021 12:06:07 -0400 Subject: [PATCH] add GPS to telem str and APRS coords --- main.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index d1ddd57a..e5fea9ff 100644 --- a/main.c +++ b/main.c @@ -907,7 +907,10 @@ void get_tlm(void) { 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); + pclose(file_gps); + + latitude = lat_gps; + longitude = lon_gps; // printf("Str: %s \n", str); if (mode != CW) { @@ -985,7 +988,7 @@ void get_tlm(void) { } if (mode != CW) - strcat(str, sensor_payload); // append to telemetry string for transmission + strcat(str, sensor_payload); // append to telemetry string for transmission } if (mode == CW) { @@ -1037,6 +1040,8 @@ void get_tlm(void) { sleep(4); // was 2 } else { // APRS using rpitx + + strcat(str, resBuffer); // add GPS data to the end strcat(str, footer_str1); strcat(str, call);