igaurab/user_location_plugin

Direction seems to be inverted

jwels opened this issue · 1 comments

jwels commented

Hey, thanks for this great plugin. So I noticed that the direction displayed on the map seems to be inverted. When searching for an issue I found a closed one talking about the exact same problem here. I tried the fix that @javi11 proposed in that issue locally and it looks like its working fine. Does this issue only exist for me due to configuration or should the previous fix be reintegrated? Thanks!

Current implementation of angle:
angle: _direction / 180 * math.pi,

Implementation working for me by @javi11:
angle: (((_direction * -1) ?? 0) * (math.pi / 180) * -1) + 160,

I thought we had fixed that issue, but looks like the source code has not changed , might have been some merge conflicts. Thank you for pointing it out. Yes, the implementation by @javi11 worked for me too.