You could create a script, for example, in router’s /etc/ directory of a similar content:
echo -e latitude: $(gpsctl -i) '\t' longitude: $(gpsctl -x) '\t' altitude $(gpsctl -a) >> /mnt/sda1/gps_data.txt
Make sure the script file is executable, with the following command:
- chmod +x /etc/some_script.sh
Then you would need to generate a crontab to execute this script according to your desired frequency.
More on crontabs usage in Teltonika devices can be found here: https://wiki.teltonika-networks.com/view/Crontabs