knowgoio / knowgo-vehicle-simulator

An interactive multi-platform Connected Car simulator for generating and streaming realistic vehicle telemetry.
https://knowgoio.github.io/knowgo-vehicle-simulator/docs
MIT License
33 stars 7 forks source link

REST api call #8

Closed omarzia88 closed 2 years ago

omarzia88 commented 2 years ago

Hi, I would like to know if there are any API calls to update the status of the simulated vehicle i.e. Parameters like acceleration, braking, steering angle, and others that are accessible through the interface. I have checked the documentation it describes a POST request(/simulator/events) but it requires a host of parameters that I don't have in my environment e.g lat , long, etc.If there is a way please let me know, your help will be much appreciated.

pmundt commented 2 years ago

Yes, you can update the vehicle state through the REST API by POST'ing an event to the /simulator/events endpoint. The payload you submit here will be merged on the next event tick together with the generated event, so you only need to provide values for the items you specifically want to modify. All fields are optional. The endpoint itself takes an array of events, so you can submit one or more updates as you like and they will simply be buffered up and merged/drained on each subsequent tick.

omarzia88 commented 2 years ago

Thanks alot for your help.