Skip to content

Refactor GNSS architecture: Allow creating GnssReceiver with ObjectState#126

Merged
r2avula merged 14 commits into
mainfrom
dev/agrarsense
Jan 20, 2026
Merged

Refactor GNSS architecture: Allow creating GnssReceiver with ObjectState#126
r2avula merged 14 commits into
mainfrom
dev/agrarsense

Conversation

@r2avula
Copy link
Copy Markdown
Member

@r2avula r2avula commented Dec 16, 2025

  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

Refactoring / Feature enhancement - Architecture improvement for GNSS positioning system

  • What is the current behavior? (You can also link to an open issue here)
  • Position-related functionality is tightly coupled to VehicleState
  • GNSS position update logic is embedded within UbloxRover
  • Limited flexibility for working with multiple objects or non-vehicle entities
  • What is the new behavior (if this is a feature change)?
  • GnssFixStatus struct in GNSSReceiver base class for comprehensive GNSS position information
  • Base updateGNSSPositionAndYaw() function in GNSSReceiver for consistent signal emission
  • ObjectState updates:
    - Moves positionBySource from VehicleState to ObjectState
    - Moves enuRef (ENU reference) from VehicleState to ObjectState
    - Updates PositionFuser to work with ObjectState
    - Allows ImuOrientationUpdater to be created with ObjectState
  • Cleans up UbloxRover implementation
  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

Yes, some function names are updated in UbloxRover, GNSSReceiver, and sdvp position fuser. So any downstream applications using these classes should update the calls accordingly.

@r2avula r2avula requested a review from ariamirzai December 16, 2025 14:25
@r2avula r2avula self-assigned this Dec 16, 2025
@r2avula r2avula marked this pull request as draft December 17, 2025 14:32
@r2avula r2avula marked this pull request as ready for review December 23, 2025 08:38
- Introduced `rpy_t` struct in `coordinatetransforms.h` to group roll, pitch, and yaw.
- Added `dist` method to `xyz_t` for calculating Euclidean distance.
- Updated `PosPoint` to support `rpy_t` in getters and setters (`getRPY`, `setRPY`).
- Clarified parameter name `yaw` to `yaw_rad` in `updateWithOffsetAndYawRotation`.
- Renamed `updateGNSSPositionAndYaw` to `updateGNSSPositionAndOrientation` to reflect full attitude support.
- Updated `GNSSReceiver` to accept `rpy_t` struct, enabling Roll and Pitch updates alongside Yaw.
- Improved `simulationStep` to correctly apply odometry deltas (X, Y, Yaw) to the GNSS position.
- Refactored `UbloxRover` to use the new orientation update methods.
@r2avula r2avula merged commit a9c4d55 into main Jan 20, 2026
4 of 6 checks passed
@r2avula r2avula deleted the dev/agrarsense branch January 20, 2026 08:48
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.

2 participants