Ogadai / zwift-mobile-api

MIT License
118 stars 25 forks source link

Distance to rider driving ahead #15

Closed sebastianlinz closed 6 years ago

sebastianlinz commented 6 years ago

Hello,

could you please give me a hint, to find the distance to the next rider driving ahead. Sorry, if I overlooked in API or documentation.

Regards,

Sebastian

Ogadai commented 6 years ago

Hi @sebastianlinz

I don't think you can do that via the web API, because you need to know which rider IDs you're requesting status for.

You could have a look at the work on AppConnection from @wiedmann - #13

It works by pretending to be Zwift Mobile Link, connecting to Zwift on your local network, so should get the same nearby position information that ZML displays.

Be aware though that you can't run an actual ZML at the same time (Zwift only connects to one), and the work is very early / experimental. Also, while you'll have positions and speed, calculating distance (allowing for the road layout) might be quite challenging...

wiedmann commented 6 years ago

I still need to work a little more on the ZML emulation. There is a probably a way to get the rider list with intervals. This gives you the distance to the next rider because the way Zwift does the intervals is that each second is 10m.

sebastianlinz commented 6 years ago

Thank you for giving feedback