Any way to simulate different compass headings when testing an app?

I'm working on an app the uses "heading" to display different things - in this case, it shows the stars overhead, and so it uses the direction the watch is aimed to determine which part of the sky to show.

var sensorInfo = Sensor.getInfo();
var compassHeading = sensorInfo.heading;

So this all works fine, as a rule. But I've been doing some troubleshooting and have not figured out how to simulate different headings in the simulator. It just always returns heading 0.

Does anyone know how?

I can set lat & lon for the GPS, but not direction or bearing.

In the simulator simulation/navigation data I can set various fields: Bearing, Bearing from Start, and Track.  None of those seem to affect the sensor heading received.

Is this something that can be done with an activity track or similar?

  • Have you tried simulating activity data?

    - From the simulator menu, select Simulation > Activity Data

    - Press the play button in the lower left hand corner of the dialog

    I found that this generates constantly changing, non-0 heading values for both Sensor.getInfo() and Position.getInfo().

    Is this something that can be done with an activity track or similar?

    You can also use the activity data dialog to play sensor data from a FIT file.

    In the simulator simulation/navigation data I can set various fields: Bearing, Bearing from Start, and Track.  None of those seem to affect the sensor heading received.

    I think those settings only affect the corresponding fields in Activity.Info, returned by Activity.getActivityInfo().