getting coordinates when position not changed

18 views
Skip to first unread message

michael Judkovsky

unread,
Sep 24, 2018, 9:34:17 AM9/24/18
to MIT App Inventor Forum
how i can get my coordinates when i am stationary.
locationsensor enables coordinates only when position is changed.

SteveJG

unread,
Sep 24, 2018, 9:49:59 AM9/24/18
to mitappinv...@googlegroups.com
Oh , when you read the information in the Help  
  • Using the Location Sensor  you possibly missed the part about how you can set DistanceInterval if you are using the LocationSensor.

If you are using the Map component you can use an If statement to determine if the Distance to a known location is equal, greater or less than what it was before.

There are several other ways to do this:  Search for messages at the top of this page for    ring fence   or ringed fence  to find Form threads that discuss alternate methods.

Be careful, because of the way the GPS works, the GPS may report 'movement'  even if you are 'stationary' .  Read about 'Accuracy'  ... you can perhaps overcome this by not reporting new 
coordinates unless the Accuracy value (in meters) is less than an arbitrary value you set. The device that was used to create the following graphic was stationary on my desk and reported all these 
'present' locations  :)

Screenshot_2017-11-14-13-39-19.png



If you really mean  "how i can get my coordinates when i am stationary." You have to take one location reading and compare it against a subsequent LocationChanged event; alternatively, you can look at a paper map and look out your window.  If you don't feel like you are rolling, you possibly are stationary. When you feel like you are moving, turn on your GPS.

What have you tried Michael?

Regards,
Steve
Reply all
Reply to author
Forward
0 new messages