GPS real time with App Inventor ( from NMEA 'sentences' )

Hi,
I would like to take the time from the GPS sensor, not from the phone sistem as GSM or WiFi. I need to work with the time that give the satellites.
Is it possible with App Inventor?
Thanks.

It is possible but with an extension. Someone would have to build one.

Then use any website which provides time or millis , thn by using js extract the value

Simple trick

Welcome Alejandro

Yes it is possible to use the satellite ephemeris data for precision time information.

Thank for the idea, but I don´t know how to do it.

Thanks for the replay, but if this extension doesn´t work with newer Android versions, then it isn´t a valid option.

You can use HTML5 GeoLocation in a webviewer to return a timestamp, if a location is returned.
gpsTimestamp.aia (3.0 KB)
(to compile you will need location services turned on, and ask for fine location permission)

1 Like

Fantastic! thanks for your aia. I didn´t know how to do it.
I had included a clock sensor to run all the time and a new label wit only the time.
If you run it, at the top of the mobile phone you can see how the gps conect and disconet all the time.
Are other way to do that don´t show this?
GpsClock.aia (3.3 KB)

Thank you very much.

See here

use the watchPosition command if you want it to return a reading every time the position changes, you would not need to use a clock for this. Make sure you convert the timestamp in the html, doesn't seem to work as well and gives strange reading if you try to return the milliseconds value to the app.

I had found this extension
com.KIO4_NmeaMessage.aix
It looks work propertly.

Extension removed. Only extension authors are allowed to provide extensions

From

I have been reading about the time reported by satellites. It turns out that they each have their own internal clocks that are all synchronized. Due to the distance of each satellite from us, whether we receive the signal directly or reflected and other factors, there is a delay in receiving the time and a difference between the time we receive from each satellite. Therefore, to obtain the correct time it is necessary to connect to as many satellites as possible and obtain an average time from all of them.
I think the extensions seen only connect to one satellite.
The difficulty is this: can we connect to several satellites at the same time and obtain this average calculated time?

You can can connect to only as many satellites 'simultaneously' as your device hardware has receiving channels. By the time you do this, if it is possible the 'time' recorded is already past. :cry:

Yes this is possible. The LocationSensor provides an 'average' of the different coordinates provided (it requires a minimum of 4 satellites to do this). The LocationSensor does not provide the 'average' ephemeris time.

Here is a plot using Gins' ALS and a polar plot of the data:

It shows all the the satellites the gps receiver can hear simultaneously. The LocationSensor does not provide this information.

The question is, why do you want this time? The instant you obtain it, it is already stale.

GPS requires precise clocks to provide astounding positional accuracy. Atomic clocks in GPS satellites keep time to within three nanoseconds—three-billionths of a second. Position accuracy depends on the receiver.

You only need the time from a single NMEA string. :astonished: The GPS timing signal from a single satellite is typically accurate to 10 nanoseconds .

More information>GPS.gov: Timing Applications

1 Like

Hi how did you get the satellite data in the picture above

using Gins' ALS and a little bit of modification. I think that plot was done on an Android 8.1 tablet * the ALS extension does not work correctly with newer Android versions

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.