Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: position not updated when fix is lost #5565

Merged
merged 5 commits into from
Nov 15, 2024

Conversation

sfiorani
Copy link
Contributor

This PR fixes a bug that prevents the update of the position fix whenever this was missed. Indeed, the RawLocation is provided by MM only when the position is fixed, otherwise only the raw data is provided.

Before this changes the check

if (locationMap.containsKey(NMEA_LOCATION_SOURCE) && locationMap.containsKey(RAW_LOCATION_SOURCE))

would prevent the position fix update through the nmea data: consequently, once the fix was get it cannot be lost.

When this PR is opened, Modem Manager ALWAYS provides the nmea data, while the raw data is provided only if the first has valid fix. For these reasons the provider would act as follows:

  • Case 1 -> No Raw or Nmea location data retrieved: fix immediately set to false and position data is reset to 0
  • Case 2 -> Nmea location data is retrieved: the nmea data is parsed, if the raw data is present is parsed too

Related Issue:

Description of the solution adopted:

Screenshots:

Manual Tests:

Any side note on the changes made:

@sfiorani sfiorani changed the title Fix location missing data fix: position not updated when fix is lost Nov 14, 2024
@MMaiero MMaiero merged commit c685fdc into eclipse-kura:develop Nov 15, 2024
4 checks passed
eclipse-kura-bot pushed a commit that referenced this pull request Nov 15, 2024
* fix: position not updated when fix is lost

Signed-off-by: SimoneFiorani <[email protected]>

* refactor: refactored conditions to parse data

Signed-off-by: SimoneFiorani <[email protected]>

* fix: small issues and test coverage

Signed-off-by: SimoneFiorani <[email protected]>

* fix: reduced method complexity

Signed-off-by: SimoneFiorani <[email protected]>

---------

Signed-off-by: SimoneFiorani <[email protected]>
(cherry picked from commit c685fdc)
MMaiero pushed a commit that referenced this pull request Nov 16, 2024
…5567)

fix: position not updated when fix is lost (#5565)

* fix: position not updated when fix is lost

Signed-off-by: SimoneFiorani <[email protected]>

* refactor: refactored conditions to parse data

Signed-off-by: SimoneFiorani <[email protected]>

* fix: small issues and test coverage

Signed-off-by: SimoneFiorani <[email protected]>

* fix: reduced method complexity

Signed-off-by: SimoneFiorani <[email protected]>

---------

Signed-off-by: SimoneFiorani <[email protected]>
(cherry picked from commit c685fdc)

Co-authored-by: sfiorani <[email protected]>
MMaiero pushed a commit that referenced this pull request Dec 20, 2024
* fix: position not updated when fix is lost

Signed-off-by: SimoneFiorani <[email protected]>

* refactor: refactored conditions to parse data

Signed-off-by: SimoneFiorani <[email protected]>

* fix: small issues and test coverage

Signed-off-by: SimoneFiorani <[email protected]>

* fix: reduced method complexity

Signed-off-by: SimoneFiorani <[email protected]>

---------

Signed-off-by: SimoneFiorani <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants