I'm looking for a extension that give me additional gps info as time information sent by satellites.
someone can help me?
--
I need keep the internal clock of an Android device accurate by synchronizing it with the GPS time signal.
--
what about using an API, which provides the current time?
--
thanks Taifun, but I need a time "without" latency:
--
If two device taking time by web, them can have a relative time offset also di 200 ms. Instead gps time is more accurate, but unfortunately app inventor give gps access but without this feature. So I'm looking for a extension that do this.
I think, this should be possible, see this snippet here GPS-time in Android
--
In case you like to be the sponsor of a location sensor extension, please contact me by email. thank you
To get GPS time it is necessary for your Android to strip the ephemeris data from a satellite NMEA data string. Currently GPS time is ahead of UTC by about 6 seconds.
You don' explain why you need such accuracy (Time posted from a satellite can be accurate to about 40 ns). To get this precision you need
to get a satellite fix, receive the data on your Android, and probably either compare the data with something internal or display the data on the device's screen. Your problem begins here.
AI2 graphics display on AI2 apps is inherently slower than display using apps compiled with Java compilers, the lag in satellite acquisition (this depends on the device location - in a parking garage or out on the highway makes a difference) and the time to parse the NEMA string all contribute to a delay in using the ephemeris information to displaying it.
If someone were to write an extension to receive the NEMA data, you would have access to GPS time information. How accurate would that data be? You are expecting an answer with less that +/- 200ms. I am not sure that is possible coding with AI2. Just pushing a button on your device will not provide the exact time of the touch. The cumulative affect of the 'delays' acquiring the NMEA string, processing it and displaying it will mess that up. If you do perchance write an extension, be sure to test it against an atomic standard
Check out http://www.time.gov/ . It provides an accurate time standard corrected for network delay that might be appropriate for your use requirments.
--
In My app isn't necessary show time on screen, I need only that two android device are synchronized with accuracy better than NTP approach (200 ms). Considering that I can't send time between device by sms, Bluetooth or other way I've thought to GPS.
Ai2 GPS blocks doesn't give all satellite parameters but there are app on play store to do this. So I'm sure that is possible, so I've two possibility:
1) looking for an app on play store to synchronized preliminary two devices and after run my app;
2) include in my app an extension to synchronized devices too.
Suggestion are appreciated.
--
Ai2 GPS blocks doesn't give all satellite parameters but there are app on play store to do this. So I'm sure that is possible, so I've two possibility:
1) looking for an app on play store to synchronized preliminary two devices and after run my app;
2) include in my app an extension to synchronized devices too.
Suggestion are appreciated.
--
Perhaps the app described here: https://android.gadgethacks.com/how-to/set-your-android-atomic-time-for-perfectly-synced-clock-0170500/ ? Each user sets his own Android...you assume you are syncronized.
For example $GPRMC,040302.663,A,3939.7,N,10506.6,W,0.27,358.86,200804,,*1A The time is in the form "HHMMSS.XXX," where HH represents hours, MM represents minutes, SS represents seconds, and XXX represents milliseconds. The above value represents 04:03:02.663 AM UTC. Keep in mind the 6 seconds difference between what the satellite reports and UTC if that is an issue.
--
Here is a link to a Java program to capture NMEA sentences http://www.programcreek.com/java-api-examples/index.php?api=android.location.GpsStatus.NmeaListener . Unlike relying on a location change event to acquire the 'GPS' time, something like this should constantly monitor the data streams from all the visible satellites. A timestamp can be found on most of the available data streams. This technique does not depend on a location change event, it would simply capture every beacon stream the satellites send The various data streams are tagged $GPRMC , or $GPGGA etc. Google "NEMA sentences" for more examples. The satellites constantly send this beacon data and can be received as long as the device's GPS is turned on.
I read somewhere where Android devices/clocks don't keep time to ms precision, only seconds. That is going to be a problem.
do you think that this java code is sufficient to do an ai2 extension?
--
--
The Java example code will allow one to display $GPRMC and $GPGGA data strings. Once you have the string, the developer would have to parse it to extract the time and other satellite information (depending on the actual string you can get the satellite altitude and position in the sky etc. I assume the code will work (I haven't tested it - haven't use Android Studio in several months), one has to try. Is the code sufficient to do an ai2 extension? Well, it appears it can be used to get the data streams. In your case, either additional code would have to be added to capture the time or the time can be parsed using AI2 blocks. The parsing could be done in the extension I suppose.
The Java should allow creation of a block providing one or more NMEA data strings. With more work the extension could have a block providing the time, another for the elevation angle etc. It depends what data string information one needs to work with.
--
the problem is do extension now...
--
are there video tutorial about how do an extension?
Step by step explanation of how to make an extension The process of the creating extensions for you
there may be more.
--
댓글 없음:
댓글 쓰기