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

feat(flight-visualizer): add basic flight visualizer #83

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

PatrykPaluch
Copy link
Member

@PatrykPaluch PatrykPaluch commented Aug 22, 2023

probably part of #74

Note: lora-cli need to be compiled/run from pbak/lora-cli branch and it requires small changes in code - read flight-visualizer README.md

TODO:

  • read stdio
    • bme (temperature, pressure, height)
    • accelerometer (dx, dy, dz, drx, dry, drz, pich, yaw)
    • nmea
  • better 3d (+/-)

}
}

pub struct OffsetVecIter<'a, T>
Copy link
Member

Choose a reason for hiding this comment

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

just use a std::collections::VecDeque (pronounced deck)

if deque.len() == max_len {
    deque.pop_front();
}
deque.push_back(value);

you can wrap it in a CircularBuffer newtype if you want (and reuse VecDeque iterators), but it may be simpler if you simply don't.

Each time I inspected a collection data structure implemented at work I concluded that It was poorly designed and implemented, it introduced a ton of undocumented code that needed maintenance and we simply didn't need it at all. I'd strongly recommend avoiding writing them unless you know you really need them and you know what you are doing. It's really hardy to get those things right.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@Bartosz-Slowik Bartosz-Slowik linked an issue Aug 27, 2023 that may be closed by this pull request
@PatrykPaluch PatrykPaluch marked this pull request as ready for review September 8, 2023 21:39
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.

Simple to read graph.
2 participants