Skip to content

GPS: add support for parsing txt files, auto load file and some tweaks - #1347

Merged
ddennedy merged 14 commits into
masterfrom
gps/txt_qvector_autofile
Oct 24, 2026
Merged

ddennedy merged 14 commits into
masterfrom
gps/txt_qvector_autofile

Conversation

@dany123

@dany123 dany123 commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor
  • added support to parsing .txt files (technically any text file),
    -> there's an automatic regex that tries to match datetime and latitude+longitude
    -> alternatively, I made up a quick way for a user to provide the actual type of each field in a simple format line at the start of the file that should match this format (quick note: "skip" is an invalid keyword so it will just skip that column):
    #delimiter=" " datetime="yyyy/MM/dd" datetime="hh:mm:ss" latitude longitude speed skip heading altitude
    (alternatively date, time and datetime are also supported to try to regex the values)
    which matches my dashcam txt gps file (anything at the end not matching a format keyword is skipped):
    2025/06/12 02:45:01 N:45.123456 E:26.123456 0.0 km/h 0.00 72.50 10 x:-4.13 y:0.27 z:0.49

  • rewrote the 3 file parsing functions to use QVector and QString so they are way cleaner and shorter

  • added a one time check at filter creation to try and find + load a companion gps file provided it has the exact same name as the video file and one of the 3 supported extensions

  • dropped typedef from all structs (this one was needed for one struct to support the < operator for sorting and I decided to just drop it for all structs as they are in C++ file)

  • I also changed the default rect for both gps filters to something more natural, the new values are just as arbitrary as the old ones but the default gps text on 80% of the screen was starting to get annoying)

I have a Shotcut UI change almost ready, I noticed something during testing that doesn't get updated automatically as I expected for the GPS text filter (the graphic one works correctly) and I'm trying to fix it first.

Sample full file from my dashcam, this covers exactly 1 minute and is the companion for the same name video also spanning 1 minute:
2025_06_11_194223_00.TXT

@dany123
dany123 requested a review from ddennedy October 21, 2026 13:22
@dany123 dany123 changed the title GPS: add support for parsing txt files, auto match file and some tweaks GPS: add support for parsing txt files, auto load file and some tweaks Oct 21, 2026
@dany123
dany123 requested a lite review from Copilot October 21, 2026 17:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Critical build and concurrency defects, along with parsing correctness issues, remain unresolved.

8 open issues
What changed in this PR

Adds TXT GPS parsing, automatic companion-file discovery, parser refactoring, and updated GPS overlay defaults.

Changes:

  • Supports formatted and regex-based TXT GPS files.
  • Detects matching .gpx, .tcx, and .txt companion files.
  • Refactors GPS storage and parsing around QVector.
File Reviewed changes
src/​modules/​qt/​gps_parser.h Updated GPS structures and parser APIs.
src/​modules/​qt/​gps_parser.cpp Added TXT parsing, sorting, and companion discovery.
src/​modules/​qt/​filter_gpstext.cpp Added automatic GPS loading for text overlays.
src/​modules/​qt/​filter_gpsgraphic.h Updated graphics filter structures and enums.
src/​modules/​qt/​filter_gpsgraphic.cpp Added automatic GPS loading and adjusted defaults.

Review effort: Lite

Comment thread src/modules/qt/filter_gpsgraphic.cpp Resolved
Comment thread src/modules/qt/filter_gpstext.cpp Resolved
Comment thread src/modules/qt/gps_parser.cpp Resolved
Comment thread src/modules/qt/gps_parser.cpp Resolved
Comment thread src/modules/qt/gps_parser.h Resolved
Comment thread src/modules/qt/gps_parser.cpp Resolved
Comment thread src/modules/qt/gps_parser.cpp Resolved
Comment thread src/modules/qt/gps_parser.cpp Resolved
@ddennedy

Copy link
Copy Markdown
Member

please update your branch from master to fix job runs

@dany123
dany123 force-pushed the gps/txt_qvector_autofile branch from 2b58be8 to c52a7e4 Compare October 21, 2026 18:30
@dany123

dany123 commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

please update your branch from master to fix job runs

Ok.

There's a few other compile errors that I don't have locally so I'll have to fix them one by one as I look into the github's job output.

@dany123
dany123 force-pushed the gps/txt_qvector_autofile branch from cbe84e3 to 33aa361 Compare October 23, 2026 17:26
Comment thread src/modules/qt/filter_gpstext.yml Resolved
@ddennedy
ddennedy merged commit 3563d92 into master Oct 24, 2026
15 checks passed
@ddennedy
ddennedy deleted the gps/txt_qvector_autofile branch October 24, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants