Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3077] Android: compass true heading is sometimes returned as greater than 360 degrees

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2017-06-13T18:14:57.000+0000
Affected Version/sRelease 2.1.0
Fix Version/sSprint 2011-24
ComponentsAndroid
Labelsapi, module_geolocation, qe-testadded
ReporterDrew Dara-Abrams
AssigneeIngo Muschenetz
Created2011-04-15T03:36:13.000+0000
Updated2017-06-13T18:15:01.000+0000

Description

Ti.Geolocation sometimes produces true headings that are greater than 360 degrees. I'm assuming that titanium_mobile/android/modules/geolocation/src/ti/modules/titanium/geolocation/TiCompass.java on line 129 just needs a bit of modular arithmetic (% 360). I'd post a patch myself, but I haven't entirely figured out how to build the Titanium mobile code myself. Thanks!

Comments

  1. Drew Dara-Abrams 2011-04-15

    pull request: https://github.com/appcelerator/titanium_mobile/pull/80">https://github.com/appcelerator/titanium_mobile/pull/80

  2. Don Thorp 2011-06-15

    Reviewed.
  3. Michael Pettiford 2011-12-10

    Tested on Ti Studio 1.0.7.201112080131 

Ti Mob SDK 1.8.0.1.v20111209102124 v8/rhino

 OSX Lion 
Nexus S OS 2.3.6 Expected behavior of true heading not being greater than or equal to 360 degrees is shown
  4. Michael Pettiford 2012-01-03

    Reopening/closing to add labels
  5. Shyam Bhadauria 2012-05-24

    Android giving compass true heading as undefined.Tested it on android 2.0.2 , 3.2 and 4.0.2. SDK build - 2.0.2.v20120522180515 Not a regression, the behavior exists as far back as 1.8.2 at least. Studio build - 2.0.2.201205212423 Below is the logged info: 05-24 13:51:59.401: D/TiAPI(3572): True heading should be less than 360 and is:undefined
  6. Arthur Evans 2012-06-08

    Android returns undefined for trueHeading under certain circumstances. See TIMOB-9434.
  7. Lee Morris 2017-06-13

    Closing ticket due to the time passed and lack of progress. Any problems, please file a new ticket.

JSON Source