flutter_compass icon indicating copy to clipboard operation
flutter_compass copied to clipboard

negative values heading

Open simkosal opened this issue 3 years ago • 3 comments

The heading is not accuracy

https://i.imgur.com/1vAbrw5.jpg

simkosal avatar Oct 20 '22 08:10 simkosal

Same issue with negative value. Any update / advice ?

fvisticot avatar Dec 28 '22 19:12 fvisticot

Same issue

DmitriySimonov avatar Feb 13 '23 12:02 DmitriySimonov

I used this hacky solution to fix the heading. Its a temporary hack.

  double sanitizeHeading(double? hd) {
    if (hd == null) return 0;
    if (hd < 0) return 360 + hd;
    if (hd > 0) return hd;
    return hd;
  }

abdulwahabone avatar Feb 25 '23 22:02 abdulwahabone