(10-JAN-18 Update: See Version 2 addendum below)
There are plenty of apps out there that help the golfer with their micro-experience (course map, stroke count, distance to the hole) but not much for course managers to monitor and optimize the macro-experience. The Hologram Nova/Raspberry Pi combination offers the technology stack needed to provide course managers with real-time information on golfer locations in order to optimize tee times, for example, based on current conditions of golfer spacing and pace.
1 / 2 • Golfer Tracker prototype, showing Hologram Nova, RPi Zero W, BU-353S4 GPS Receiver, and external battery pack in a waterproof project box. (Not visible: USB hub.)
Each golfer is provided with a Golfer Tracker when they check in. The Golfer Tracker transmits GPS information to the course manager, as visualized in the Google Earth snapshot below. The Golfer Tracker data shows the course manager where there are bottlenecks so the marshal (blue paddle icon) can be dispatched to take action. (The course marshal would also have ready access to the live Google Earth image via smartphone.)
Google Earth rendering of Golfer Tracker data
The Golfer Tracker can also be configured to identify "Gold" (yellow paddle icon) and "Platinum" tier frequent golfers and make sure the beer cart (the obvious icon) is always at the ready. The Google Spreadsheet Mapper provides multiple configuration options that help the course manager determine at-a-glance what's most important to know about the current state of the course.
Google Spreadsheet Mapper sample. Latitude and Longitude cells are updated via gspread code (see below).
In addition to real-time golfer position monitoring, the system captures a local log file of the entire golfer outing for offline course manager analysis of the golfer experience and optimization of course/hazard layout.
Visualization of Golfer Tracker data log
Future iterations for the prototype will include:
- Replace the USB GPS receiver with breakout board to reduce tracker size and power usage
- Add a button on the Golfer Tracker to call for the beer cart
- Add another button to summon marshal assistance
- Drones to be dispatched to keep duffers moving along
- Offline storage for big data analysis of golfer movements
- Use of Hologram Cloud and Routes for data transmission
- A official guide for setting up the Raspberry Pi is here
- The step-by-step for using Google Spreadsheet Mapper is here
- Magpi issue 40 (page 28) provides a walk-through of the set up for the text file version of the Pi Zero GPS Logger
Version 2.0 Addendum
- Explanation of the gspread library is available here
Since the contest deadline was extended by a few weeks, I decided to address a couple of the less-elegant components of the original submission. Specifically:
- Adding an interval timer to the code in order to cut down on cellular usage
- Implement a more straightforward approach to visualizing the golf course load by replacing the gspread/Google Sheets/Google Earth approach with MQTT and the provided map dashboard via ThingsBoard.io
Seeing as an 18-hole golf round can take 3-4 ours, we don't really need to know where the golfers are every second (the default timing of the GPS receiver signal). And sending location coordinates every second can quickly rack up data charges. To address this, we add an interval timer using the Python time library:
Save cellular data charges by adding an interval timer
The original submission uses Google Spreadsheet Mapper and Google Earth - enabled by the gspread library - which suits the purpose just fine and provides significant configuration options. But the data flow is a little convoluted. The ThingsBoard.io platform offers a simpler 1-step approach with MQTT and a provided Google map widget.
First, set up the Pi Zero with MQTT via the following:
The amended project file - golfer_gps_v2.py - adds the following code to enable MQTT communication of location coordinates with ThingsBoard:
ThingsBoard MQTT communication set up
ThingsBoard documentation explains how to set up a device with an asset token - you can start with the default Raspberry P. Once you have your access token, update the golfer_gps_v2.py file and run the program. If all goes right, you'll get the following in your device details view - live GPS data!:
ThingsBoard device details - live data from the GPS receiver
Select the two available keys - latitude and longitude - and you'll be prompted to select a widget (or widgets) to visualize the data on your ThingsBoard dashboard. The Google Maps widget renders as you would expect:
ThingsBoard dashboard Google Maps widget - Just one golfer today, and way off course
The Google Map widget has plenty of configuration options, similar to Google Spreadsheet Mapper. ThingsBoard also provides an library of other widget options that could prove useful in golf course management.