crescentvenus/WALB

Attempting to understand this code in order to modify the script

Opened this issue · 3 comments

Hello, I'm trying to figure out "how" this code works. My question is ..
Where is the updated coordinates are placed in what directory and the name of the file.
I know that when I click on the web map the file located in /var/www/html/webui/LatLon.txt gets updated with the New coordinates of the LAST clicked coordinates on the map. So that works just fine.
My question is where is the file named that gets updated every 1/10 sec? I know it say's it is /tmp/LatLon.txt, but I do not see that file in that directory?

from readme file

  • Copy webui/* to youre WWW server. (ie. /var/wwww/html/webui )

  • Add google API_KEY (At line #63 in LatLon.tmpl.php)

  • Change all of the file owner to match HTTP server's process owner. (ie. www-data:www-data)

  • In start2.php make sure below.

    gps-sdr-sim is in $DIR.

    $BRDC file is in $DIR.

  • Clicked location on the map will be written to file LatLon.txt by LatLon.php. (i.e. 35.88258,139.49264,100,14,400)

  • Script smooth2.php will interpolate from previous location to just clicked location and write it to "/tmp/LatLon.txt" every 1/10 second.

  • Enhanced gps-sdr-sim reads the file "/tmp/LatLon.txt" and generate I/Q signal.

You can find the file in /var/wwww/html/webui/LatLon.ini.php that is /tmp/LatLon.txt. Actually /tmp/LatLon.txt is FIFO file which is updated every 1/10 second.
Clicked location is written into /var/wwww/html/webui/LatLon.txt. The file name is same "LatLon.txt" but path is deffrent.

Sorry for my ignorance in coding and linux in general...
First, Everything seems to be working OK, and I can see myself move on my phone. I can't seem to get the hardware ( LCD and encoder scripts to work). I may open a case on that if it does not bug you too much to help. I was trying to figure out how to get a static location script to work. Seems like your script works better to keep the gps sync'd up than the standard GPS-SDR-SIM. I think it has something to do with the current time and date.

Anyway, I assume that the Smooth2.sh script does the math to produce the /tmp/LatLon.txt is FIFO file which is updated every 1/10 second. Should I be able see that file /tmp/LatLon.txt and read it?

  1. It is not difficult to control every thing via WebUI without any hardware. In this case, you need to write a small additional script.
  2. GPS-SDR-SIM has -T option. You can specify date & time of GPS.
  3. /tmp/LatLon.txt is just one line text file. You can read it by "$cat /tmp/LatLon.txt" for example.