{"id":20277431,"url":"https://github.com/ekspla/read-symbian-sportstracker-file","last_synced_at":"2025-04-11T05:43:38.672Z","repository":{"id":40578995,"uuid":"298179402","full_name":"ekspla/Read-Symbian-SportsTracker-file","owner":"ekspla","description":"This python script describes how you can read symbian (Nokia) Sports Tracker log files (W*.dat) in binary format.  You can use this code to convert from DAT file to GPX file.","archived":false,"fork":false,"pushed_at":"2025-03-14T01:07:10.000Z","size":6721,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-25T03:42:04.286Z","etag":null,"topics":["dat","gps","gpx","nokia","python3","scsu","sports-tracker","symbian"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ekspla.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-24T05:39:16.000Z","updated_at":"2025-03-14T01:06:38.000Z","dependencies_parsed_at":"2024-06-13T08:58:16.199Z","dependency_job_id":"a192e6e2-182c-4632-92a1-5f5b3fb8a00a","html_url":"https://github.com/ekspla/Read-Symbian-SportsTracker-file","commit_stats":{"total_commits":465,"total_committers":1,"mean_commits":465.0,"dds":0.0,"last_synced_commit":"e2f69ec31717f01dbf7c9bce9ac46ad103fabbf2"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekspla%2FRead-Symbian-SportsTracker-file","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekspla%2FRead-Symbian-SportsTracker-file/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekspla%2FRead-Symbian-SportsTracker-file/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekspla%2FRead-Symbian-SportsTracker-file/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ekspla","download_url":"https://codeload.github.com/ekspla/Read-Symbian-SportsTracker-file/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248351449,"owners_count":21089270,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dat","gps","gpx","nokia","python3","scsu","sports-tracker","symbian"],"created_at":"2024-11-14T13:18:25.879Z","updated_at":"2025-04-11T05:43:38.646Z","avatar_url":"https://github.com/ekspla.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Read-Symbian-SportsTracker-file -- How to read binary dat files.\n This python script, `convert_nst_files_to_gpx.py`, describes how you can read **symbian (Nokia) Sports Tracker files (W\\*.dat and R\\*.dat)** \n stored in your phone as **binary format**.  You can use this code, as it is, to **convert from dat to gpx**.  The code depends on \n [lxml](https://pypi.org/project/lxml/) with a fallback to built-in ElementTree.  For performance reasons, **use of lxml is highly recommended.**\n\n The code was tested with \u003e 1000 of track log files copied from my Nokia phone equipped with GPS receiver, never tested with heart-rate \n sensor, though...\n\n There is still a few unknown part in the track logs.  So, your [feedback](https://github.com/ekspla/Read-Symbian-SportsTracker-file/issues) \nis welcomed.\n\n## How to use\nInstall from [PyPI](https://pypi.org/project/symbian-sports-tracker/)\n```Shell\npip install symbian-sports-tracker\n```\n\nalternatively from github as follows:\n```Shell\npip install \"git+https://github.com/ekspla/Read-Symbian-SportsTracker-file.git@pip_install\"\n```\n\nor simply download/copy the \\*.py files to an appropriate directory from the \n[master branch](https://github.com/ekspla/Read-Symbian-SportsTracker-file) in github. \n\nNow you can run\n```Shell\nconvert_nst_files_to_gpx input_filename.dat \u003e output_filename.gpx\n```\nwhere *input_filename.dat* is the name of the track or route file.\n\nThe reference and test files (see below), that are not included in the package of PyPI, can be obtained from \n[github](https://github.com/ekspla/Read-Symbian-SportsTracker-file).\n\n## Detailed explanation\nThis package consists of five \\*.py files.  `nst.py`, `scsu.py` and `mini_gpx.py`are pure library modules while \n`convert_nst_files_to_gpx.py` and `convert_nst_rec_to_gpx.py` are scripts using the modules.\n\n`convert_nst_files_to_gpx.py` works also for track/route files created by **the old Nokia Sports Tracker**, whose format is \na bit different from the new version released from [Sports Tracking Technologies Ltd](http://www.sports-tracker.com/).  \nFor details, please see the codes.  (1-byte instead of 2-byte long header, start address of trackpoint is different, etc.)\n\nThe version number of the file is stored as WORD at 0x0008.\n- Track log files of the old Nokia SportsTracker (ver0):                version \u003c 10000.\n- Track/Route files of the old Nokia SportsTracker (ver1):     10000 \u003c= version \u003c 20000.\n- Track log files of Symbian SportsTracker (ver2):             20000 \u003c= version.\n\nThe track reading function was tested for the old and the new NST versions of 9991-9998, 10102 and 20001-20002, while \nthe route reading one was tested for version of 11400.\n\n The file formats of symbian are completely different from those of Android and iOS.\n\n These codes are **not based on reverse engineering of the app** itself, but on careful analysis of the track log files.\n \n **Non ASCII** (non-alphanumeric) **characters** contained in the track log files that are encoded by \n [SCSU](https://www.unicode.org/reports/tr6/tr6-4.html) are read by using an external module, `scsu.py`.  \n This is a ported version of [Czyborra's decoder written in C](http://czyborra.com/scsu/), `references/scsu.c`.  \n (Characters of Arabic, Bengali, Chinese, German, Hindi, Japanese, Portuguese, Punjabi, Russian, Spanish and surrogate pairs \n were tested, see `test_scsu/`.)\n\n## Files in the phone\nThere are files as followings in the directory named **_drive_name_:\\SportsTracker\\\\** (old version) or **_drive_name_:\\SportsTracker2\\\\** \n(new version).  _Drive_name_ (C, D, E, etc.) depends on where you installed the app (phone memory, sd card, etc.).\n\n- `config.dat`: contains a lot of **personal data**, including _id--name_ lookup tables of user and activity, etc. \n- `W*.dat`: **track log** files in binary format.  The file formats of **the new and the old versions** are slightly different each other as\nmentioned before.  [A fetched sample file (the old format)](https://www.elektroda.pl/rtvforum/topic1416097.html), \n[another one (the new format)](https://sourceforge.net/p/gpsbabel/mailman/message/26219411/) and the converted gpx files are in `references/`.\n- `R*.dat`: **route** files of **the old version** in binary format.  The file format, though it lacks for timestamps, is very similar to that of \ntrack log of the old version NST.\n- `Rec*.tmp`: **temporal track log files** we see on application crash.  More example is needed, yet [a file useful to test was obtained from \nthe internet](https://forum.allnokia.ru/viewtopic.php?t=65299\u0026start=210).  The file format seems to be very simple, see \n`references/Rec211109168_dump.txt` (a hex dump file with comments), `convert_nst_rec_to_gpx.py` (the script)  and \n`references/Rec211109168.gpx` (the converted gpx file) for details. \n\n## Limitation\n- Units other than Metrics (km and km/h), such as Imperial (mi and mph) and Nautical (nm and kn), were not tested.\n\n## Note added for the users of www.sports-tracker.com\n- Its gpx handling code seems very faulty.\n- The time format should be **YYYY-MM-DDThh:mm:ss\\[.SSS]\\[+-HH:MM]**.  Use of **Z** as UTC timezone is **not allowed**.  The resolution should be milliseconds (**microseconds not allowed**).\n\nYou have to modify as followings:\n\nin format_time() of mini_gpx.py, delete `.replace('+00:00', 'Z')` to use +00:00 as UTC.\n``` python\n    return datetime.isoformat()\n```\nin store_trackpt() of nst.py, add `round( , 3)` to remove microseconds.\n``` python\n        time=dt_from_timestamp(round(tp.unix_time, 3), dt.timezone.utc), \n```\n\n## TODO\n- A few unknown field in the track points.\n- Support for heart rate in track log files of the new version (example files needed).\n\n## License\nThis software is released under the LGPL v2.1 License.\n\n## Reference\n- [Sports Tracker - Wikipedia](https://en.wikipedia.org/wiki/Sports_Tracker)\n- [Standard Compression Scheme for Unicode - Wikipedia](https://en.wikipedia.org/wiki/Standard_Compression_Scheme_for_Unicode)\n- [A Standard Compression Scheme for Unicode - Unicode Technical Standard #6](https://www.unicode.org/reports/tr6/tr6-4.html)\n- [The SCSU charset -- Roman Czyborra's decoder](http://czyborra.com/scsu/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fekspla%2Fread-symbian-sportstracker-file","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fekspla%2Fread-symbian-sportstracker-file","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fekspla%2Fread-symbian-sportstracker-file/lists"}