Git Product home page Git Product logo

fow's Introduction

Ferries Over Winslow

This is the code for electromechanical "ferry tracker clock" devices. This repository includes both the server, written in Go, and the client, which runs on an ESP8266 microcontroller and is written in C++. There are currently three non-prototype hardware revisions (and many more prototypes). Here are some pictures of the different models we've produced:

Mainsail v1 (retail model)
The Mainsail v1 ferry tracker clock hardware revision
Kitty v2 (kit model)
The Kitty v2 ferry tracker clock hardware revision
Kitty v1*
The Kitty v1 ferry tracker clock hardware revision

Kitty v1 is no longer being sold as a kit.

Communication and Processing

The code is based upon a client-server model. The client is a small microcontroller that controls actuators and sensors. It communicates over HTTP with a more powerful computer running the server.

Server

The server can provide data for both the miniature and full-sized ferries because the server's behavior should be the same for both. The processing steps are as follows:

  1. The server periodically makes requests to the Washington Department of Transportation REST API, from which it collects the latitude and longitude of the boats it is tracking.
  2. These lat/long value are matched to the closest point on a set of connected line segments (known as the "reference path"). We use this information to determine our progress (as a percentage) along this reference path.
  3. We estimate the ferry's future location based current on speed and heading, and calculate a progress percentage for both the current and future location.
  4. We serve the client these two percentages, how long ago the first percentage was calculated, and how far ahead the second percentage is from the first. This is enough information for the client to interpolate between these two values over time.

The server is written in Go.

FERRY TEMPO client

The client for the miniature ferries communicates with the server, serves a configuration webpage over a WiFi network it broadcasts, and stores user-provided WiFi credentials across reboots. The client linearly interpolates between two ferry "progress" percentages provided by the server (there two percentages for each boat; two boats are currently supported). This progress percentage is used to actuate the display to the correct position. A variety of hardware is supported from the same codebase. The FERRY TEMPO client software is written in C++. You can read more about the FERRY TEMPO and flashing your board here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.