[ale] possible meeting topics - ODB / NTP-GPS

Ron Frazier (ALE) atllinuxenthinfo at techstarship.com
Sat May 26 13:47:26 EDT 2012


Hi all,

At the risk of opening a big can of worms for myself, I'd like to mention two potential meeting topics, which, if there is interest, I'm willing to do presentations on.

The first, which I've put a fair amount of time and energy into, and which I've mentioned in a previous thread, is using the OBD (onboard diagnostics) system of a car in conjunction with an android tablet to display virtual automotive gauges reading the car's vital statistics and show the results on the screen of the tablet. This is very cool, and, when I mentioned it before, there seemed to be some interest in a presentation. The one potential hitch in doing such a presentation, is that I cannot bring the car into the classroom. Therefore, I need an OBD-II simulator, which I can plug my OBD scanner into, and thus show what appears to be live data to the group. I don't know where to get such a thing, so, if anyone does, please let me know.

PS I'm not using the OBD scanner in my car as much as I was. I discovered that the MPG estimates, which were one of my primary purposes, are extremely inaccurate. You can put a fudge factor in the program to compensate, but then you have to measure your MPG the old fashioned way first.

The 2nd thing, which I've invested several months learning about, is using NTP with GPS to run my own time server. I am nowhere near an expert on the topic, however, I am happy to say that I now have a (non public) fully cross platform stratum 1 NTP time server running at my house using GPS with PPS as a time source and providing time service to the PC's on my LAN. GPS time is maintained by the DOD to within + / - 100 ns of UTC as far as I know. So that's + / - .1 us. My time server maintains its time to within + / - 30 us or so. The accuracy on my NTP clients' side is variable, depending on the load on my wifi, and runs from a few ms to a bit more.

What I'm somewhat proud of, and what was not easy to learn how to do, is that I've made everything totally cross platform. The NTP server runs and reads the GPS and serves time whether it's booted into Windows or Linux, using a different software stack, I might add, but still NTP. (Sorry Mac people, I don't have a Mac.) Also, the clients access the server whether they are booted into Windows or Linux. Not only that, the server may boot on either of two wifi routers I have, using two different wifi adapters, and everything still works. That presents problems because the server gets different IP addresses from the different routers. Getting all these various permutations to work was very complicated and tedious.

As with the OBD stuff, the hitch is caused by the classroom. There is no way to get GPS signals in there. So, I need a GPS simulator. If anyone knows how to do that, please let me know.

I did have a thought along those lines. Rather than simulating the radio waves the GPS device receives, we could simulate it's output. The NMEA output of a GPS is nothing but a bunch of ascii text on a serial communications port coming in at typically 9600 baud. The text includes coded information strings which specify things like time, latitude, longitude, data for satellites being tracked, etc. Suppose we were to simply capture all the output from the GPS for a few days into a file. If we could create a virtual com port, then we could dump the contents of that file into the virtual com port at 9600 baud. The NTP program could read the virtual com port, and it would think it's attached to a GPS. That could serve as an independent simulated time source.

I see two potential problems. First, the PPS (Pulse Per Second) pulses would not be appearing at the DCD line of the virtual com port, and therefore, the PPS functionality of NTP would be dormant. Second, the time stamps in the recorded data stream would not agree with the rest of the world. So, if we let the NTP server communicate with any servers in the outside world, it might mark the GPS as a falseticker and ignore it.

Please let me know what you guys think of these topics as presentations, and how we might be able to arrange the technology so it will work in the classroom. If anyone wants to collaborate with me on a joint presentation, I'd be glad to have the help.

Sincerely,

Ron


--

Sent from my Android Acer A500 tablet with bluetooth keyboard and K-9 Mail.
Please excuse my potential brevity.

(To whom it may concern. My email address has changed. Replying to former
messages prior to 03/31/12 with my personal address will go to the wrong
address. Please send all personal correspondence to the new address.)

(PS - If you email me and don't get a quick response, you might want to
call on the phone. I get about 300 emails per day from alternate energy
mailing lists and such. I don't always see new email messages very quickly.)

Ron Frazier
770-205-9422 (O) Leave a message.
linuxdude AT techstarship.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.ale.org/pipermail/ale/attachments/20120526/3e607628/attachment.html 


More information about the Ale mailing list