Position.Info.Track not working any more on older watches with my app?

Hello again, 

I've stumbled across a confusing problem using my watch app with older type or less powerful type watches, and the issue seems to be common on all of them.

First my app pushed over the memory limit for some of them ( 124  ) which caused memory fails.... but at the same time I was getting reports from users with over 1000kB memory of the Position.Info.Track position reporting Null.

In the current form only Fenix 5/6 X / Pro / 945 / D2 can run the app.

First I slimmed down the app which is now around 110kB and peaks around 117 kB.

Then I tried the other Vivoactive and Forerunners. They all load the app, but for some unknown reason with all of them Position.Info.Track appears to be returning null

I've also tried to use Sensor.info.Heading also, and it has the same issue?

No errors during runtime, just returns null?

ideas?  It's one of the earliest calculations in my on-compute.

I'm sure that this did not happen previously with them. Is there anything software side that would have changed during an update to cause this issue on older watches?

  • This is the code I have to enable the GPS  for the appbase

    function onStart(state) {
    Position.enableLocationEvents(Position.LOCATION_CONTINUOUS, method(:compute));
    }

    function compute(info) {

    if(info has :track && info.track != null){
    			mTracks = (info.track) + 10;                           //mTracks used in the below calc
    			if( Math.toDegrees(info.track) >= 000 ){
    				mTrack = (Math.toDegrees(info.track)).toNumber();
    			} else {
    				mTrack = (360 + Math.toDegrees(info.track)).toNumber();
    			} 
    		}
    		

  • Which version of the SDK are you using?

  • In your compute function, Position.Info doesn't have "track" so the first "has" will always be false.  Here's what's available:

    Instance Member Summarycollapse

    • accuracy as Quality

      The positional accuracy.

    • altitude as Float or Null

      The elevation above mean sea level in meters (m).

    • heading as Float or Null

      The true north referenced heading in radians.

    • position as Location or Null

      The latitude and longitude of the position.

    • speed as Float or Null

      The horizontal speed in meters per second (mps).

    • when as Moment or Null

      The GPS time stamp of the obtained Location fix.

  • Sorry - it thought it was using Activity.Info.Track.

    However I tried Position.Info.Heading, and that also gives exactly the same result.( Ie it works on newer watches but not on the older watches

    This is very confusing now, how come  info.track is physically there on the newer watches - but not on the older watches?

    I assumed that Activity.Info.Track was being used, because Activity.Info is the only one with a Track from what I can see ?

    That is to say

    On the Fenix 6X / Pro - the above code is returning correct values for info.Track, but not on say forerunner 645