From c14a147467266eaf892e275619011e04b2bc178c Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Sun, 11 Jul 2021 11:49:31 -0400 Subject: [PATCH] added gps.sh read for APRS --- main.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main.c b/main.c index aea6c90c..e00d07e5 100644 --- a/main.c +++ b/main.c @@ -893,6 +893,13 @@ void get_tlm(void) { strcat(str, header_str2); } } +// get GPS + + char resBuffer[1000]; + FILE * file_gps = popen("timeout 5 /home/pi/CubeSatSim/gpsd/gps.sh", "r"); + fgets(resBuffer, 1000, file_gps); + printf("GPS: %s \n"&resBuffer); + // printf("Str: %s \n", str); if (mode != CW) { // sprintf(header_str2b, "=%7.2f%c%c%c%08.2f%cShi hi ",4003.79,'N',0x5c,0x5c,07534.33,'W'); // add APRS lat and long