Subscription preference

Notification emails are sent to your Samsung account email address.

* Email : anonymous@samsung.com

  

Close

The altitude of the navigator.geolocation.watchPosition function is not returned.

Forums View
Started by Newbie ameli.na , 390 Seed Dec 27, 2017 07:12 Replies : 9 View : 601 Likes : 0
Hello

After updating my Gear S3 to Tizen 3.0.0,1 the altitude of the "navigator.geolocation.watchPosition" function is not returned.

Thank you for your confirmation.

Thanks.
Tags

watchPosition , bug , 3.0.0.1

Post Reply
Board View
Samsung Developer shihabyasin , 47400 Seed Dec 28, 2017 08:33 Post #1 0
Hi,

Could you please provide more information of your problem attaching images or log etc.?
However you may try with restarting or resetting your device. Additionally gps could be checked if
it was working properly.

Thanks.

Post Reply
Board View
Newbie ameli.na , 390 Seed Dec 28, 2017 08:58 Post #2 0

hi.

I attached a photograph of the information obtained from navigator.geolocation.watchPosition in gear S3 (tizen 3.0).

Latitude and longitude values ​​are returned normally.

However, the altitude value is always null.

This is the code that worked in previous versions. (tizen 2.3)

Thank you.
File Attachments
Post Reply
Board View
Samsung Developer shihabyasin , 47400 Seed Jan 05, 2018 05:08 Post #3 0
Could you please share some of your code such that it could be tested?
Post Reply
Board View
Developer ilya85parshakov , 1780 Seed Jan 09, 2018 07:19 Post #4 0
It seems that navigator.geolocation.watchPosition returns speed in km/h instead of m/s on Tizen 3.0.0.1 smartwatches. Not sure about altitude.
Learned about this only after getting angry 0.5 star reviews in the last couple of days. Thanks Samsung!
Post Reply
Board View
Developer ilya85parshakov , 1780 Seed Jan 09, 2018 08:08 Post #5 0
ameli.na, have you tried using humanactivitymonitor instead of watchPosition to get altitude?

tizen.humanactivitymonitor.start('GPS', onchangedCB, onerrorCB, option);

https://developer.tizen.org/development/guides/web-application/sensors/human-activity-monitor
http://developer.samsung.com/tv/develop/api-references/tizen-web-device-api-references/tizen-api

function onChangedCB(info) {
  var altitude = info.gpsInfo[0].altitude;
}

tizen.humanactivitymonitor.start("GPS", onChangedCB,
 {callbackInterval: 120000, sampleInterval: 60000});}
Post Reply
Board View
Developer ilya85parshakov , 1780 Seed Jan 09, 2018 08:27 Post #6 0
Similar topic: http://developer.samsung.com/forum/board/thread/view.do?boardName=SDK&messageId=338055&startId=zzzzz~&startPage=4
Post Reply
Board View
Developer jacques.francoise , 1230 Seed Jan 13, 2018 14:59 Post #7 0
Hello,
do you have a complete exemple on using humanactivitymonitor for GPS data?
I am trying to use it but dont succeed...
also which privileges and which features shoud be added in the config file?
Regards
Post Reply
Board View
Developer ilya85parshakov , 1780 Seed Jan 28, 2018 02:19 Post #8 0


This content has been quoted from jacques.francoise’s thought.

Hello,
do you have a complete exemple on using humanactivitymonitor for GPS data?
I am trying to use it but dont succeed...
also which privileges and which features shoud be added in the config file?
Regards

Oh, sorry, forgot to reply. Here it is:

features: location.gps
privileges: healthinfo, location
javascript:

 
function successCallbackNew(position)
{
  document.getElementById('speed').textContent = position.gpsInfo[0].speed + ' km/h';
}

tizen.humanactivitymonitor.start("GPS", successCallbackNew, errorCallback);

You can check how it works using one of my apps, for example 'Always-On Speed'. This code will only work on Gear S2 and newer watches.
Post Reply
Board View
Samsung Developer bugajny.andrzej , 33960 Seed Mar 16, 2018 17:23 Post #9 0


This content has been quoted from ilya85parshakov’s thought.

It seems that navigator.geolocation.watchPosition returns speed in km/h instead of m/s on Tizen 3.0.0.1 smartwatches. Not sure about altitude.
Learned about this only after getting angry 0.5 star reviews in the last couple of days. Thanks Samsung!


Yes, I noticed the same. It is no more m/s. Geolocation returns as speed  km/h. Why? I doc is said m/s.


Altitude is returned as NaN for Gear S3 Tizen 3.0.0.1.



Post Reply