Raspberry Pi GPS and map location display

I have a GPS shield that I got a couple of years ago from friends as a gift. The shield was tucked away in my parts drawer waiting for the right time to be used in a project. I'm not sure why I decided to build this project because a hand held GPS is really quite useless these days. I just had all the components and I wanted to put the GPS module to use.

The design is basic and revolves around four components: a GPS module, a Raspberry Pi, an 1.8" TFT LCD screen, and some push buttons for control. The goal is to build a stand alone, hand held, GPS device that will display its location on a moving map.

The device works by using swaths of Google map screen shots stored on the SD card, along with an XML file that describes the map's boundary coordinates. GPS readouts are used to pick the proper map swath, and center a portion of the map to be displayed on the LCD.

All software and resource files are on my GitHub repository https://github.com/eyalabraham/rpi-gps-nav

Sample map view compared to iPhone Google maps of the same location:

Software

A diagram of the software modules and all code can be found on Git Hub. Once compiled, the Raspberry Pi should be configured to auto-execute the main executable after boot; one can Google several methods to do this. If a USB stick is present, and a 'go' file is found on it the program starts, if not, it exits and the system shuts down. My Raspberry Pi is configured to run as a headless system.

    +-------------------------------------------+
    |                                           |
    |               main.c                      |
    |                 |                         |
    |                 +-- test.c                |
    |                 |                         |
    |                 +-- nav.c                 |
    |                      |                    |
    |                      +-- util.c           |
    |                                           |
    +--------+------------+------+--------------+
    |        |            |      |              |
    |        | vt100lcd.c |      |              |
    |        |            |      |  OS Serial   |
    |        +------------+      |  driver      |
    |                     |      |    +         |
    |      pilcd.c        |      |  libxml2     |
    |                     |      |              |
    +---------------------+      |              |
    |                            |              |
    |        libbcm2835.o        |              |
    |                            |              |
    |                            |              |
    +----------------------------+--------------+

Hardware

The GPIO-wiring file lists the connections between the Raspberry Pi, the GPS Shield, LCD TFT, and pushbuttons. The rpi-gps-board.pdf shows the breadboard wiring.

Not shown: Push buttons for multi-function control (up/down/left/right/select) connected to Raspberry Pi's GPIO input lines.

           \|/
            |
            |
    +-------+--------+
    |                |
    | GPS module     |
    |                |
    | ITEAD RoyalTek |
    | REB-4216/      |
    | REB-5216 GPS   |
    |                |
    +-------+--------+
            |
            | Serial UART
            |
    +-------+--------+  +--------------+
    |                |  |              |
    |  Raspberry Pi  |  | LCD 1.8" TFT |
    |                |  | ST7735R      |
    |                |  |              |
    +-------++-------+  +------++------+
            ||                 ||
    ========================================
                        SPI Bus

Prototyping the setup

Planning the circuit board

Completed board (bottom side) with Raspberry Pi

Completed board (top side) with GPS antenna

Stacked setup side view

rpi-gps-board.pdf

wiring board