Giter Site home page Giter Site logo

johnmarzulli / hudconfig Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 488 KB

Companion project for StratuxHud. A NodeJS based systems that allows for easy configuration and setup of a StratuxHud.

License: GNU General Public License v3.0

CSS 20.91% HTML 33.11% Shell 4.23% TypeScript 41.75%
heads-up-display nodejs node-js ads-b stratux stratuxhud

hudconfig's Introduction

STRATUX HUD CONFIG

Introduction

This project aims to bring an easy way to configure and control a StratuxHud. It also aims to make the setup process easier.

NOTE: This project relies on having a Stratux build with AHRS and GPS. A suitable build can be done for less than $150 (USD).

NOTE: This project relies on having a StratuxHud

Using

To use, once your StratuxHud is up and running, navigate to the System Diagnostics page. Note the IP address.

Navigate (using your phone, tablet, or other browser) to http://<ip>:3000

Main page and settings configuration

Pages

There are three main views:

Settings

This provides a simple interface to the configuration of the StratuxHud

Data Source

The type of source the HUD should use. This should be left to stratux 99% of the time. Setting to simulation will ignore the ADS-B receiver and run it in a "demo mode".

Data IP Address

This is the address of the ADS-B receiver that the HUD will draw data from. This should be 192.168.10.1 99% of the time.

Ownship

This is the tail number of the aircraft the HUD is installed in. Any traffic with this tail number is filtered out.

No Report Removal Time

This is the number of minutes after a not receiving a report that traffic is removed from the view.

Units

Selects which units the data will be shown in.

Choices are:

  • statute
  • knots
  • metric

Flip Horizontal

Should the image be flipped left to right?

Default is false.

Flip Vertical

Should the image be flipped top to bottom?

Default is false

Set to true if you are using a "Teleprompter Glass" build.

Declination

The adjustment of the compass based on magnetic variance.

Set to 0 to leave in "true". Set to your local value for magnetic readings.

Update

Click or tap this button to send the new configuration to the HUD.

Views

This allows you to customize the views available in the HUD.

Before editing these settings, please take some time to become familiar with the JSON file format.

The elements section allows you to add or remove elements within a view. The name field is the "friendly" name of the view and is displayed the upper left hand corner of the HUD.

Views will be shown in the order they are listed. The first view will be the default view at boot.

NOTE: The element names need to match the names listed on the "Elements" page. Capitalization and spelling matter.

You may modify the text and then click or tap the UPDATE button.

[
    {
        "elements": [
            "Compass",
            "ADSB Target Bugs",
            "ADSB Reticles"
        ],
        "name": "Traffic"
    },
    {
        "elements": [
            "Traffic List"
        ],
        "name": "Traffic List"
    },
    {
        "elements": [
            "Level Reference",
            "Artificial Horizon",
            "Compass",
            "Altitude",
            "G Load",
            "Roll Indicator",
            "Groundspeed"
        ],
        "name": "AHRS"
    },
    {
        "elements": [
            "Time"
        ],
        "name": "Universal Time"
    },
    {
        "elements": [
            "System Info"
        ],
        "name": "Diagnostics"
    },
    {
        "elements": [],
        "name": ""
    }
]

Elements

This is a read only view that gives you the names of the elements available to make a view.

This view reveals some of the internal nature of the code and its organization.

Example of element names are:

  • G Load
  • ADSB Target Bugs
  • System Info

NOTE: Capitalization and spelling matter when using these to modify the Views configuration.

{
    "G Load": {
        "detail_font": true,
        "class": "skid_and_gs.SkidAndGs"
    },
    "ADSB Target Bugs": {
        "detail_font": false,
        "class": "adsb_target_bugs.AdsbTargetBugs"
    },
    "System Info": {
        "detail_font": false,
        "class": "system_info.SystemInfo"
    },
    "Roll Indicator": {
        "detail_font": true,
        "class": "roll_indicator.RollIndicator"
    },
    "Groundspeed": {
        "detail_font": true,
        "class": "groundspeed.Groundspeed"
    },
    "Altitude": {
        "detail_font": true,
        "class": "altitude.Altitude"
    },
    "Compass": {
        "detail_font": true,
        "class": "compass_and_heading_bottom_element.CompassAndHeadingBottomElement"
    },
    "Traffic List": {
        "detail_font": true,
        "class": "adsb_traffic_listing.AdsbTrafficListing"
    },
    "ADSB Reticles": {
        "detail_font": false,
        "class": "adsb_on_screen_reticles.AdsbOnScreenReticles"
    },
    "Artificial Horizon": {
        "detail_font": true,
        "class": "artificial_horizon.ArtificialHorizon"
    },
    "Level Reference": {
        "detail_font": true,
        "class": "level_reference.LevelReference"
    },
    "Time": {
        "detail_font": true,
        "class": "time.Time"
    }
}

Installation

  1. cd ~
  2. curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
    1. If you see an error, run this again. It may take a few tries.
  3. sudo apt install nodejs
  4. sudo apt install npm. Answer yes to all.
  5. git clone https://github.com/JohnMarzulli/HudConfig
  6. cd HudConfig
  7. npm install
  8. npm install request
  9. npm install dateformat
  10. npm install express
  11. npm install express-handlebars
  12. npm install detect-rpi
  13. npm install ip
  14. crontab -e
    1. Add a line at the bottom:
    2. @reboot sudo nodejs /home/pi/HudConfig/src/index.js &
  15. Save the file.
  16. sudo reboot now

License

This project is covered by the GPL v3 license.

Please see LICENSE

hudconfig's People

Contributors

johnmarzulli avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

hudconfig's Issues

Write directly to config file rather than making loopback PUT

When this Node server receives a POST of new settings, it seems like rather than forwarding that as a PUT to the Python server on 8080 through the local loopback, the Node server should just write to the config.json directly. Perhaps once that is done the Python server will need to be notified that the settings have changed, but it would significantly reduce code overhead and make it easier to add new features.

If you're interested, I'd be willing to submit a PR.

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.