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

Add message for getting speed distribution #169

Open
emiltin opened this issue Jun 30, 2023 · 0 comments
Open

Add message for getting speed distribution #169

emiltin opened this issue Jun 30, 2023 · 0 comments
Labels

Comments

@emiltin
Copy link
Contributor

emiltin commented Jun 30, 2023

There's currently no way to get aggregated data about speed distribution. You can only get the average for vehicles detected since last update. If you use sendOnChange (rpeviously known as updateRate=0) you get a message for each vehicles detected, and can then do the computations yourself later, but it can take a lot of bandwidth to send a message for every vehicle.

We could either add a message that provides an aggregated speed distribution for vehicles since the last update, eg:

0-5km/h:  3
5-10km/h:  76
15-20km/h:  344
25-30km/t  123
...

But should the bins be configuration..?

Or we design a more general way to fetch data about each detection since last update, that can include speed, vehicle type, direction, etc. eg:


{
  "at":"2023-09-26T12:49:01.599Z","class":"bicycle","speed":19,"direction":"southbound"},
  "at":"2023-09-26T12:49:03.234Z","class":"bicycle","speed":23,"direction":"southbound"},
  "at":"2023-09-26T12:49:24.622Z","class":"car","speed":42,"direction":"northbound"},
  "at":"2023-09-26T12:49:45.643Z","class":"bus","speed":34,"direction":"northbound"},
  "at":"2023-09-26T12:49:56.552Z","class":"bicycle","speed":23,"direction":"southbound"},
  ..
}
@emiltin emiltin added the extend label Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant