I am running the PX4 simulation with SITL Gazebo and trying to store my data in a .txt file. I added the following lines for a simple tryout:
FILE *fp; fp = fopen("test.txt", "w+"); fprintf(fp, "This is testing for fprintf...\n"); fputs("This is testing for fputs...\n", fp); fclose(fp);
It compiles without erros. The problem is that the programm doesn’t create a test.txt file. I fear this happens since I start the C++ program in SITL. Does anyone has an Idea how do I can solve this problem?