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
* Initial plan
* Fix ADSB altitude integer overflow and add on-ground indicator
- Fix display overflow: use to_string_dec_int (signed) instead of
to_string_dec_uint (unsigned) for altitude display - per ICAO Annex 10
Vol IV 3.1.2.6.5.4, altitude = 25N-1000 can be as low as -1000ft
- Remove incorrect altitude clamp (altitude < 0 => 0) in DF 0/4/20 decoder
- Add on_ground flag to AircraftRecentEntry; set from TC 5-8 (surface
position) messages, cleared on TC 9-22 (airborne position) messages
- Display 'GND' in altitude column when aircraft is on ground
- Clear altitude to 0 when on_ground is set to prevent stale data in map
color calculation
Closes#3274
* Revert on-ground indicator; keep only the overflow and clamp fixes
Remove on_ground field, TC 5-8 handling, and "GND" display per review
feedback. Only keep the two minimal bug fixes:
- Signed altitude display (to_string_dec_int vs to_string_dec_uint)
- Remove erroneous altitude < 0 clamp; update comment to show the math
* Update BEACONS.TXT
Added test beacon with 3 bch1 errors and 2 bch2 errors to test multiple bit error correction.
* Fist step to SGB format
* Added SGB to manual mode.
* SGB support
- Added SGB frame to beacons file
- Fixed hex display for SGB
- Fixed frame type option display
- Fixed self-test mode activation logic
- Fixed PRN for self-test mode
* First test
* Reorder includes for consistency and fix string dereference in VorCdiIndicator
* Add memory section and linker script entry for vor_rx application
* Testing VOR TX
* Moving VOR TX to SD
* Code refactoring to align with guidelines
* Add TODO comment to verify radial sign convention in vor_tx_config
* Remove unnecessary set_dirty() calls in VorRxView methods
* Update Course Deviation Indicator label and adjust UI element positions
* Update VorTxView to run prepared image from memory map
* Update build condition in nightly release workflow to include workflow_dispatch event
* Reverting action changes
* Adjust Course Deviation Indicator layout and refine painting logic
* Refactor VorRxView UI elements for improved layout and clarity
* Add calibration field and update radial calculation logic in VorRxView
* Enhance VOR processing: add renormalization to phase oscillator, improve signal handling, and update configuration parameters
* Implement radial smoothing and TO/FROM state handling in VorRxView; update VOR processing logic
* Setting comments inline
* Refactor VorCdiIndicator and VorRxView: change normalize_signed_degrees to use int32_t, update radial smoothing to use fixed point arithmetic to reduce flash usage
* Update external app address end to 0xAE0B0000
* Update set_vor_tx_config to include enabled parameter for consistency
* Refactor VorRx to omit decim_2 stage and update comments for clarity on VOR processing
* Add RSSI, Channel, and Audio fields to VorRxView to mimic existing apps
* Refactor VorRxView labels and status messages
* Update VorRxView calibration field range to allow full circle input
* Completing Ident transmission logic
* Fixing TX gain and moving log label
* Refactor VOR phase calculations and update radial offset handling for accurate bearing representation
* Add low-pass filters to strip 9960 Hz subcarrier from audio output
* Refactor GPIO mappings and definitions for improved clarity and functionality
- Updated SCU_ARRAY_SIZE definitions in pal_lld.h for PRALINE and non-PRALINE configurations.
- Modified pin mappings in gpio.hpp to reflect new hardware configurations, including additional control pins for RF and audio components.
- Removed obsolete GPIO definitions from hackrf_gpio.hpp and streamlined the code for better maintainability.
- Added new GPIO definitions for mix bypass, amplifier control, and other RF-related functionalities to enhance the system's capabilities.
* Refactor GPIO mappings and update SCU_ARRAY_SIZE for LPC43xx platform
- Updated SCU_ARRAY_SIZE to 80 for PRALINE configuration and 58 for others.
- Added new GPIO mappings for auxiliary power control, antenna bias, and R9 clock enable signals in gpio.hpp.
- Removed commented-out PPS output mapping in hackrf_gpio.hpp.
- Adjusted GPIO definitions for R9 clock signals to ensure proper functionality.
* Refactor RF path initialization and configuration for improved clarity and functionality
* Refactor RF path configuration and GPIO mappings for improved clarity and functionality
* Potential fix for pull request finding
* comment
* aux power polarrity
* Fix formatting of pin_aux_power_enable declaration