LocationSensor Extension. Accuracy. Geocoder. GeomagneticField

Hello friends,

this Extension is about:

1.- SensorLocation.

  • It uses the classes:

https://developer.android.com/reference/android/location/LocationManager.html

https://developer.android.com/reference/android/location/Location

In those pages you can find information about:
getLatitude, getLongitude, getAltitude, getSpeed ​​(m/s), bearing, bearingTo, distanceTo, getTime and convert.

bearingTo and distanceTo refers to the Properties: LatitudeTo and LongitudeTo.

Bearing: https://en.wikipedia.org/wiki/Bearing_(navigation)
Bearing online: https://www.sunearthtools.com/tools/distance.php

2.- Geocoder.

Blocks: getFromLocation and getFromLocationName

Gets:
adminArea, countryCode, countryName, feature, locality, phone, postalCode, premises, subAdmin, subLocality, subThoroughfare, thoroughfare, url

  • It uses the classes:

https://developer.android.com/reference/android/location/Address

https://developer.android.com/reference/android/location/Geocoder

3.- GeomagneticField.

Gets:
declination, fieldStrength, horizontalStrength, inclination, x, y, z

  • It uses the classes:

https://developer.android.com/reference/android/hardware/GeomagneticField

Read:
https://www.ngdc.noaa.gov/geomag/WMM/DoDWMM.shtml

Earth’s Magnetic North Pole Has Officially Moved (Toward Russia):
https://www.forbes.com/sites/trevornace/2019/12/17/earths-magnetic-north-pole-has-officially-moved-toward-russia/#7688ea47201f

4.- This app uses LocationSensor Extension (black text) and LocationSensor of MIT App Inventor (blue text).

On the Map Screen, the coordinates of the red dot are obtained with the Extension and those of the blue dot with MIT App Inventor.

p185C_sensorlocalizacion.aia (33.5 KB)

You can download the com.KIO4_LocationSensor.aix extension of:
http://kio4.com/appinventor/285C_extension_sensor_localizacion.htm

Regards,
Juan Antonio Villalpando.
http://kio4.com/appinventor/index.htm#extensiones

4 Likes

With Kodular you can also use Google Maps:

Hi Juan,

I’ve made a test with your extension because I try to get centimeter accuracy for some applications. The number of digits provided by AI2 when you get latitude/longitude gives you an accuracy of 10 meters witch is not enought in some cases.
My problem is that using it I don’t get more digits and also no information about accuracy (this information is available in the GST NMEA message)
Do you have any idea ?

Hello Bertrand,

I have published two extensions about GPS:

in both I obtain a value of latitude and longitude with 5 decimals and an accuracy of approximately 3 … 5 meters.
I think that the accuracy of centimeters can be obtained with Galileo satellites, but I have not used that technology.

1 Like

Hi Juan,

In fact you can get something like less than one meter accuracy with the new dual frequency GNSS chipsets that you have in Samsung Snapdragon or Xiami Mi8 and +

You can also get 1cm accuracy on your smartphone if you connect the external Trimble Catalyst antenna…
Applications are endless…

@Juan_Antonio
Is there a way to get also the $GST NMEA message (location accuracy) ?
Are your extensions published on the MIT extension repository ? It’s not clear on your website witch one is the latest one.
I’ve made a test but it doen’t work. Do you seesomething wrong in my blocs ?
Thank you

Try this
Nmea_30.aia (15.6 KB)

I can get GN—, but not GP—

Look what I have with the Nmea_30 program