TTGPSLogger

From OpenStreetMap Wiki
Jump to navigation Jump to search
TTGPSLogger
Ttgps screenshot.jpg
Author: TTInput
License: GNU General Public License
Platform: Symbian
Status: Broken
Version: 0.5.4 (2012-11-12)
Languages: English and German
Website: http://code.google.com/p/ttgpslogger/
Source code: http://ttgpslogger.googlecode.com/svn/trunk/

The GPS tracking log can be written in NMEA, GPX, or KML format by using Built-in GPS or Bluetooth GPS

TTGPSLogger Version 0.5.4 only for Symbian S60 5th. Older models supported Version 0.4 beta.

Decimal separator in the GPS tracks

In some countries, such as Russia, to separate the integer part of the decimal is a comma. The comma character not recognized by josm, so opened track is defined as empty.

To programmatically change the comma character in a period in your tracks recorded program TTGPSLogger, you need to save the script to file extension VBS. Then you need to change the conditions under green lines. Save again. The script can be run (only works under the operating system Windows).

The script

Option Explicit

' Replacing in the numbers of comma to a point
' Replace_C2P.vbs version and Date
Const VERSION = "0.01.000"
Const VERSIONDATE = "26/01/2013"

Sub ProcessDir(folder)
	Dim fname, file, subfolder, i
	For Each file In folder.Files
	If extold = Right(file, Len(file) - InStrRev(file, ".") + 1) Then
		fname = file.Path
		Set fl = fso.OpenTextFile(fname, 1, False)
		txt = Split(fl.ReadAll(), vbCrLf)
		For i = 0 To UBound(txt)
			txt(i) = Replace(txt(i), ",", ".")
		Next
		fl.Close
		fname = Replace(fname, extold, extnew)
		Set fl = fso.CreateTextFile(fname, True)
		fl.Write Join(txt, vbCrLf)
		fl.Close
		MsgBox "File " & fname & " successfully created.", vbInformation
		fso.DeleteFile(Replace(fname, extnew, extold))
	End If
	Next
	For Each subfolder In folder.SubFolders
		ProcessDir (subfolder)
	Next
End Sub

Dim fso, folder, fl, txt
' File path with the GPX tracks
folder = "E:\Others\TTGPSLogger\"
' Change the extension in the program settings
Const extold = ".gpx_log"
' This extension can be written after changing comma to a point
Const extnew = ".gpx"

Set fso = CreateObject("Scripting.FileSystemObject")
Set folder = fso.GetFolder(folder)
ProcessDir (folder)
Set fso = Nothing