tsteven4 [Wed, 30 Oct 2024 00:24:17 +0000 (18:24 -0600)]
introduce OptionString, (#1352)
* introduce OptionString,
a replacement for OptionCString. Formats and filters can be
manually converted, with the potential to eliminate c character
string usage.
OptionCString::get() usages can often use an implicit cast from
OptionString instead, although the usage of get() is still valid.
* more OptionCString -> OptionString conversion
* use custom conversion routines.
this introduces OptionString::toInt and OptionString::toDouble,
which enforce error checking on conversions.
* convert more formats to OptionString
* convert gdb to OptionString
* convert xcsv, unicsv to OptionString
* convert html, text to OptionString
* convert ozi to OptionString
* convert mtk to OptionString
* convert globalsat to OptionString
* convert exif to OptionString
* convert lowranceusr to OptionString
* convert igc to OptionString.
note the error checking on timeadj is now done by OptionString::toInt.
* prove igc timeadj works with ints.
* convert shape to OptionString
* convert garmin_gpi to OptionString
* consolidate integer/double parse routines.
* convert subrip to OptionString
* convert garmin_txt to OptionString
* enhance OptionString conversions.
overloads, as opposed to default parameters, allow tools to find differen usages.
improved OptionString error messages with module and argstring information.
* enhance argtype ...
to indicate integer base and if trailing data is allowed.
Use these fields to check and convert integer/doubles in Vecs, fataling on errors.
* allow trailng data with parse_distance, parse_speed.
and when necessary convert these from ARGTYPE_STRING to ARGTYPE_FLOAT.
* fix typo, update refs
* convert garmin to OptionString
* convert skytraq to OptionString
* Introduce OptionInt & OptionDouble.
These must be used with ARGTYPE_INT and ARGTYPE_FLOAT.
The data is checked and converted in Vecs, and the results may
be retrieved by the user.
* convert almost all ARGTYPE_INT to OptionInt.
* final conversion to OptionInt
* mark TODO done.
* correct include comments for greps sake.
* delete complete TODO comments.
* whitespace
* use consistent error messags regarding options.
i.e. "module(option): "
* delete unused Option method type
* use ARGTYPE_STRING if trailing data is allowed.
The GUI validator used with ARGTYPE_INT and ARGTYPE_FLOAT will
reject input with any trailing data.
The CLI, including Vecs::assign_option, keys off the Option subclass now,
not the ARGTYPE.
Note that OptionInt and OptionDouble still allow trailing data. If
trailing data is allowed with these classes we just pair these with
ARGTYPE_STRING which controls validation in the GUI.
* drive arg validation from Option classes.
* simplify use of isEmpty
delete unused macro
delete extraneous file
* non member operator== with parameters const QString& not a candidate,
tsteven4 [Sat, 19 Oct 2024 19:55:51 +0000 (13:55 -0600)]
use consistent unit suffixes. (#1353)
* use consistent unit suffixes.
This is a user visible change. The suffixes for the distance
option of the arcdist, interpolate, radius and position filters
and the add option of the height filter are different.
* drop unused includes
* whitespace
* terminate fatal messages.
* change simplify to process distances in meters.
This simplifies option value parsing.
There is no user visible difference.
tsteven4 [Tue, 8 Oct 2024 12:46:21 +0000 (06:46 -0600)]
prepare for Qt 6.8 deprecations (#1346)
* fix Qt 6.8.0 deprecation warnings.
Also, the exif writer now prefers to establish a timestamp from
GPS_IFD_TAG_DATESTAMP/GPS_IFD_TAG_TIMESTAMP if they exist, as the
exif reader does.
* avoid installing *.debug_information modules
which appeared with 6.7.0
* centralize decision on lightweight time zones.
* correct sort order for includes, duplicates
* remove debug statement
* remove const from declaration.
* simplify lightweight timezone usage via
qt version depependent defined constants.
* fix for QTimeZone not a QLiteralType
* cleanup lightweight time constants.
* enhance exif offset test
* add missing reference
* fix test comment
* revert changes to exif writer regarding gps tags.
I beleive the original intent of the writer is to create the gps tags
from a waypoint.
* update qt modules
* qt 6.8 work
1. allow builds to succeed without webengine by default. This is
needed by CI until aqt catches up.
2. macos minos change for 6.8
3. add macos 6.8.0 to CI, remove macos-12 build.
and actually produce valid html:
1. the replacement for "<body>", "<! >", is invalid.
2. leaving an html tag in causes the html format output to be invalid.
I think someone was waiting for me to say no. Sometimes, "good enough" (for users with no representation here...) seems to be. Co-authored-by: Robert Lipe <robertlipe@users.noreply.github.com>
Robert Lipe [Sat, 14 Sep 2024 04:18:52 +0000 (23:18 -0500)]
Various modernizations in humminbird. (#1100)
* Various modernizations in humminbird.
- Make humminbird_icons[] a QStringList.
- I don't think the icon finder ever actually worked the way it was described in the
comments.
- Comment fix in exif
- Kill xstrndup (yay)
積丹尼 Dan Jacobson [Sun, 18 Aug 2024 22:24:12 +0000 (06:24 +0800)]
Zap repeated examples (#1084)
On https://www.gpsbabel.org/htmldoc-development/fmt_globalsat.html
we observe these two examples are repeated further down, in context too. So they shouldn't also
appear higher up.
I am guessing that I have correctly zapped the higher up pair.
tsteven4 [Sat, 17 Aug 2024 17:37:13 +0000 (11:37 -0600)]
simplify osm_tag option processing. (#1325)
I suspect the check of "tagnd" was used in developement before
opt_tagnd was added. The only thing the check did was ignore
opt_tag values that started with tagnd, they weren't used elsewhere.
tsteven4 [Tue, 6 Aug 2024 19:12:58 +0000 (13:12 -0600)]
correct WGS84 semi minor axis value. (#1310)
It appears the GSR80 value was used instead of the WGS84 value, which
is a very small error.
However, there was a typo in the value in GPS_Math_XYZ_To_WGS84LatLonH
that resulted in an order of magnitude error!
This could lead to GPS_Math_XYZ_To_WGS84LatLonH never converging.
This may be why skytraq created their own function to convert ECEF
to WGS84.
lowranceusr versions 2 & 3 have a continuous flag used to
indicate dicontinuities in a trail.
The lowranceusr version 2 & 3 reader now flags trail discontinuities
as new track segements.
The lowranceusr version 2 & 3 writer now flags new track segments as
discontinuities.
Also fix two subtle bugs:
1) when reading a version 2 or 3 trail with the break option we would
fail to break the trail if the discontinuity was at the start of a
section other than the first section.
2) when writing a version 2 or 3 trail with the merge option if the
number of points exceeded MAX_TRAIL_POINTS we would write a header
that indicated MAX_TRAIL_POINTS but actually write MAX_TRAIL_POINTS + 1.
tsteven4 [Sat, 29 Jun 2024 18:49:56 +0000 (12:49 -0600)]
Fix unicsv reader delimiter detection (#1287)
* Fix unicsv reader delimiter detection.
Any delimiter sequence that is enclosed has never been considered
a delimiter when splitting a line into fields. However, previously
an enclosed potential delimiter could be detected when scanning the
first line, and then erroneously used as the delimiter.
noble has some new qt6 packages that alleviate the need to
directly install some libraries.
also, the dependencies of some qt6 packages have been improved
allowing us to specify what we use more directly.
this results in the same set of packges being installed.
tsteven4 [Mon, 18 Dec 2023 13:17:09 +0000 (06:17 -0700)]
modernize google maps javascript (#1247)
to avoid:
"js: Google Maps JavaScript API has been loaded directly without a callback. This is not supported and can lead to race conditions and suboptimal performance. For supported loading patterns please see https://goo.gle/js-api-loading"