can i have a bearing datafield?

i like to have a datafield with the bearing to the next route point. 

i use 

    var activityinfo = Activity.getActivityInfo();
       bearingP =activityinfo.bearing;
is the bearing automatic calculated when i tart navigation on the fenix 6 or do i have to load the course in the code?
And how  do i do this?
Merry Christmas
Peter
  • The bearing in your example is to the end point (AFAIR). Some sort of navigation has to be active to have an end point.

    IQ provides the name and distance to the next “waypoint” but not the bearing. The coordinates aren’t available either (meaning you can’t calculate the bearing yourself).

  • Dpwalyk is correct. But you could implement your own route logic by storing the lat/long of all waypoints in your code.  Then you would access your own current location via Position APIs (loc.latitude, loc.longitude); retrieve the coordinates for the next waypoint from your own data structure; calculate the bearing yourself with a formula (e.g., a standard “bearing between two lat/long points”). Rough draft: https://pastebin.com/PCnQxRQ4