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

Telemetry/CurrentAttributes State from Core #89

Closed
Archdoog opened this issue Apr 9, 2024 · 3 comments · Fixed by #261
Closed

Telemetry/CurrentAttributes State from Core #89

Archdoog opened this issue Apr 9, 2024 · 3 comments · Fixed by #261
Assignees
Labels
core Related to the Rust core enhancement New feature or request

Comments

@Archdoog
Copy link
Collaborator

Archdoog commented Apr 9, 2024

In order to drive various UI features from the state, we need to provide a general purpose state object that can contain values like:

  1. The current speed limit at the user's location on the route - if relevant/available Option<SpeedLimit>
  2. The current filtered speed (e.g. once the core is providing filtered/improved user/vehicle speed) Option<Speed>
  3. Etc. - Please add other use cases for this.
@Archdoog Archdoog added the core Related to the Rust core label Apr 9, 2024
@ianthetechie
Copy link
Contributor

#23 should help as we look toward implementing this. I think this will give us smoothed/cleaned estimates of position, speed, and course over ground.

@ianthetechie ianthetechie added the enhancement New feature or request label Jun 30, 2024
@Archdoog
Copy link
Collaborator Author

Discussed this with @ianthetechie this week. The idea is to create:

  1. A general purpose rust function that get's the index of the next coordinate on the route Pollyanna. This index should match the index in the attributes arrays for the OSRM route type.
  2. A solution to then combine and surface all current values in each attribute array as an "AttributeMap" to platform code.
  3. On the platform level, we can handle the type extraction and usage of values from the map.

Step 2 can be done in a handful ways, e.g. handling basic types in rust, on platform code (swift, kotlin, etc), or even just by passing a json string for platform decoding. Since the data source is expected to be json (ish), where we draw that line depends.

@ianthetechie
Copy link
Contributor

Discussed on call: Publishing it as JSON (as bytes/data) and then decoding in platform code. We can provide common models ex: for Valhalla, but this is really easy for anyone to extend using their own model and Codable/Moshi/kotlinx deserialization.

@ianthetechie ianthetechie self-assigned this Aug 13, 2024
@ianthetechie ianthetechie moved this to Up next in Ferrostar Aug 18, 2024
@Archdoog Archdoog moved this from Up next to In Progress in Ferrostar Sep 29, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Ferrostar Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Related to the Rust core enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants