Skip to content

Conversation

john-michaelburke
Copy link
Collaborator

@john-michaelburke john-michaelburke commented Jun 23, 2021

Done

  • Baseline Plot (minus zoom / center features and reset filters button)
  • Baseline Table

Todo

Zoom / Center Features: https://swift-nav.atlassian.net/browse/CPP-245

Won't get to

The reset filters button requires the new connection object to be propogated down to the tab. This will probably require a slight refactor for all tabs so left out of this PR. Ticket here: https://swift-nav.atlassian.net/browse/CPP-246
Also wouldn't hurt to add more unittests for some of the more involved functions here: https://swift-nav.atlassian.net/browse/CPP-248

EDIT: Zoom/Center Solution functionality:

  • double click plot to reset to original zoom all
  • mouse wheel scroll in / out by increments of 1.1/0.9
  • click and drag in certain direction (should kill zoom all or center solution)
  • only center solution or zoom all should be active at once but can both be deselected during free zoom.

@john-michaelburke john-michaelburke force-pushed the john-michaelburke/baseline branch from 93e81ee to c26fe7d Compare June 23, 2021 21:06
@john-michaelburke john-michaelburke requested a review from a team June 23, 2021 21:32
@john-michaelburke john-michaelburke marked this pull request as ready for review June 23, 2021 21:32
@john-michaelburke john-michaelburke changed the title [CPP-218][CPP-219][CPP-42] Baseline Table + Plot (front and back). *WIP* [CPP-218][CPP-219][CPP-42][CPP-43] Baseline Table + Plot (front and back). *WIP* Jun 23, 2021
@john-michaelburke john-michaelburke changed the title [CPP-218][CPP-219][CPP-42][CPP-43] Baseline Table + Plot (front and back). *WIP* [CPP-218][CPP-42][CPP-43] Baseline Table + Plot (front and back). *WIP* Jun 23, 2021
pub(crate) const E_FLOAT: &str = "e_Float RTK";
pub(crate) const E_FIXED: &str = "e_Fixed RTK";
pub(crate) const E_DGNSS: &str = "e_DGPS";
pub(crate) const N: &str = "N";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more meaningful names needed for N/E/D

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

}


class BaselinePlotPoints(QObject): # pylint: disable=too-many-instance-attributes,too-many-public-methods
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

too-many-instance-attributes,too-many-public-methods ? is this copy-paste error? if not, maybe some pylint config can bump up the minimum to a more reasonable default.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed. You were right this was a copy paste error. Shame 👀

interval: Utils.hzToMilliseconds(Globals.currentRefreshRate)
running: true
repeat: true
onTriggered: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks large enough to warrant being put into a standalone .js file

Copy link
Collaborator Author

@john-michaelburke john-michaelburke Jun 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I broke out a decent amount into the BaselinePlotLoop.js file and sadly this sent me down quite the rabbit hole. A few findings from trying to move most of this to a separate js file:

  • I was able to figure out importing QtCharts in order to make chartview series which is pretty cool.
  • For the life of me I could not get the Constants/Globals to import which I think is a flaw in our implementation of the singleton. I filed a support request with qt then we can drop in replace it to this file: https://account.qt.io/support/request/INC-1654147
  • There are a lot of global objects used here that must be passed in as arguments or we would need to use javascript functions to grab pointers to them which works but can be cumbersome as the number of objects grow. One workaround to this would be placing the javascript files directly in the QML such as I did originally in this script but it definitely results in the qml file being fairly cluttered.

@john-michaelburke john-michaelburke force-pushed the john-michaelburke/baseline branch from c26fe7d to 6a42c6d Compare June 25, 2021 03:31
@john-michaelburke john-michaelburke changed the title [CPP-218][CPP-42][CPP-43] Baseline Table + Plot (front and back). *WIP* [CPP-218][CPP-42][CPP-43] Baseline Table + Plot (front and back). Jun 25, 2021
@john-michaelburke john-michaelburke force-pushed the john-michaelburke/baseline branch from 7b44573 to 0f99ceb Compare June 25, 2021 20:57
@john-michaelburke john-michaelburke requested review from a team and jayvdb June 25, 2021 20:59
/// - `exclude_mode`: The mode as a string not to update. Otherwise, None.
fn _append_empty_sln_data(&mut self, exclude_mode: Option<String>) {
for each_mode in self.mode_strings.iter() {
if exclude_mode.is_some() {
Copy link
Contributor

@notoriaga notoriaga Jun 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be something along the lines of

if exclude_mode == Some(each_mode) {
    continue;
}

looks like currently if exclude_mode is Some(_) all of the modes will be skipped

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Wow good catch. This was an artifact of me shamelessly copying over the work from the solution tab 😬. This bug was in the solution tab since I implemented it. This was one of the functions under the umbrella of "need more unitests" bugs I have filed.
https://swift-nav.atlassian.net/browse/CPP-248
https://swift-nav.atlassian.net/browse/CPP-107

pub(crate) struct BaselineTabButtons {
clear: bool,
pause: bool,
_reset: bool,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: probably don't need the _

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or is this because the reset isn't implemented?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this is currently not used. Will need to wait for the "trickle ticket" 😂 to get implemented first.

@john-michaelburke john-michaelburke merged commit d5967e1 into main Jun 29, 2021
@john-michaelburke john-michaelburke deleted the john-michaelburke/baseline branch June 29, 2021 07:50
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.

3 participants