igaurab/user_location_plugin

Direction is inverted

Closed this issue · 8 comments

Hi, thanks for this great plugin :).

I have a problem at least on a Huawei p30 I don't know if is the phone or if it's the plugin but the direction is inverted on the map. A part of that the speed is not real cause the -2

angle: ((_direction ?? 0) *

If I modify this line by:

(((_direction * -1) ?? 0) * (math.pi / 180) * -1) + 180,

All is working as expected.

Is this a real issue or I have something wrong configured?

thanks ;)

Yes, the direction does seem to be a bit off, I'll look into this issue.

I can do a PR if you want ;)

@javi11 sure that world be awesome, I tried what you did, it was more precise.

@javi11 hey sorry for the late fix, could you please confirm if #65 fixes the issue?

I tested it in my emulator, it did work

Will do now, sorry for no doing the pr, just has to go to other things. Just yesterday I started working on It again.

Thanks for doing the fix btw :)

I see it still inverted, maybe for the - 160 that should be or + 180 or + 160

Yes with + 160 works perfectly

Thanks for fixing the typo