GeoPos stored a coordinate's sign only in its degrees NumberField, which
is an int32_t and therefore has no negative zero. Any coordinate whose
integer degrees part is 0 but which is negative (i.e. strictly between
0.0 and -1.0) could not be represented at all:
- set_lat()/set_lon() passed the raw float to the degrees field, so
-0.2933 truncated to 0 and the sign was gone before it reached the
widget.
- lat()/lon() then decided the sign with `field_lon_degrees.value() < 0`,
which is false for 0, so the value came back positive.
The reporter's airport is at longitude -0.2933, which was impossible to
enter in the ADSB Tx app.
Give each coordinate an explicit hemisphere field (N/S and E/W) and make
the degrees field an unsigned magnitude:
- The hemisphere OptionsField is the single source of the sign, so
"negative with zero degrees" is now representable.
- set_lat()/set_lon() derive the hemisphere from the sign of the input
and feed the fields the magnitude.
- lat()/lon() read the hemisphere instead of inferring the sign from
the degrees value.
- The minutes on_wrap handlers no longer need to flip the carry
direction based on the degrees sign, since degrees is now a
magnitude; the carry is the same in both hemispheres.
- The degrees fields no longer loop, so carrying below 0 clamps at 0
instead of wrapping round to 90/180.
The hemisphere indicator occupies the column that the 4-wide signed
degrees field used for its minus sign, so the row layout, the degree
symbol and the decimal readout all stay where they were.
Fixes#3234
* Update geomap view position on GPS data reception
* Refactor timestamp and temperature/humidity display formatting in SondeView
* Implement battery voltage reading for Meteomodem M20
* Enhance GPS data validation and update OSM zoom handling
- Introduced a new method to validate GPS data in the Packet structure.
- Updated the SondeView to use the new GPS validation method.
- Modified GeoMap to improve handling of OSM zoom levels and ensure consistent usage of real zoom values.
- Adjusted battery voltage calculation for Meteomodem M20 to ensure correct scaling.
* Add serial number extraction for Meteomodem M20 support
* Add support for Meteomodem M20 temperature and humidity readings
* Update log file naming to include timestamp in SondeView
* Add pressure reading support for Meteomodem M20 and update UI
* Update SondeView UI layout and enhance Meteomodem M20 packet handling
* Add vertical speed calculation and display to SondeView
* Fix set_fsk function parameter type for samplesPerSymbol
* Increase Geomap zoom-in ability
* Use floating point for current position
* Show grid squares when zoomed in too much for map
* Zoom in fast after exceeding map resolution & clean up redundant code
* Revert order of functions to make it easier to review
* Changed grid color for better contrast with markers
* Optimizations
* Set x_pos/x_pos to center pixel versus upper left corner
* Show more distant planes when zoomed out
* Correct pixel offset when zooming in
* Fix oops in x_pos/y_pos centering change
* Wrapping support for lat/lon fields
* Wrapping support (for Geomap lat/lon fields)
* Handle wrapping for negative lat/lon
* Initial commit for keyboard emulation
* Added on_keyboard to some widgets
* TextEdit partly
* Multi key send at once
* Frequency control support
* Fix encoder emulation
* Add keyboard to geomap
* More widgets
* GCC12 related fixes but still compiles on GCC9
* Suppress warnings about volatile +=
* Enable c++20 if supported by the compiler
On gcc12 we need to use -std=c++20 since constexpr .c_str() on std::string is only officially available since c++20 and the new gcc wouldnt let us use it with older standard
* code format
---------
Co-authored-by: Eisenberger Tamas <e.tamas@iwstudio.hu>
checking if the ICAO address of the frame and the current item
in the details view match. Slight refactor by placing the decimal
to string conversion function into the string_format module.
Added fix in the scope of issue #365
FrequencyStepView field in TransmitterView class
FrequencyStepView field in TransmitterView class
Update ui_transmitter.hpp
Update credits
Fixed left padding of the decimal part of the numbers.