• NTPD Refusing to accept time from GPSD

    One of the (minor) drawbacks of the Raspberry Pi is the lack of a hardware clock. Normally, you'd work around this by configuring a good pool of NTP servers to connect to. What do you do though, if you can't guarantee there will be an Internet connection available when needed?

    The solution is obvious, so obvious that many have already done it - use the time provided by a cheap GPS dongle. The gpsd daemon helpfully pushes the time to Shared Memory Segments (SHM) so it's a simple adjustment to the NTP configuration file to have NTPD pull the time from the dongle.

    Except, it seems on Raspbian, it isn't quite so simple. You've followed all the instructions (simple as they are) but are still seeing an entry like this

    # ntpq -p
         remote           refid      st t when poll reach   delay   offset  jitter
    ==============================================================================
    SHM(0)          .GPS.            0 l    -   16    0    0.000    0.000   0.001

    No matter what you try, reach stays at 0.

    Frustrating, and there's very little to give you a guide. This post will tell you what the issue is, as well as how to go about finding it should it re-occur

  • PHP GPX Ingest

    GPS eXchange format files (GPX's) allow you to record data from your Global positioning system for processing/import into other systems.

    The PHP GPX-Ingest class allows you to import basic GPX files and converts them into an object for easy data retrieval. In the process of doing so, it also generates basic statistics such as average speed, number of track points and journey length.

    The resulting object can be exported as a JSON string for easy storage and re-import back into the class at a later date (perhaps to extract more information).

    This documentation details how to include and use the class in your project.

    PHP GPX-Ingest is licensed under the GNU GPL V2 License.