I am trying to extract the gps coordinates and use CoAP to sent the info to Telenor IoT server. I am using the gps demo code provided by Nordic .
https://github.com/NordicPlayground/fw-nrfconnect-nrf/tree/master/samples/nrf9160/gps
I Tried to incorporate the CoAP code But got too many errors So i decided to print the coordinates to a txt file and read that file with CoAP.
That's a sample of what I wrote. The code compiles but no file is generated.
float x; x = pvt_data->pvt.longitude ; FILE *fp; fp = fopen("Output.txt", "w"); fprintf(fp, "Gps coordinates: %f", x); fclose(fp);