Giter Club home page Giter Club logo

signalk-derived-data's Introduction

signalk-derived-data

Generates deltas for values derived from signalk values

It currently calculates:

  • Outside air density (based on humidity, temperature and pressure)
  • Battery Power
  • Depth Below Keel (based on depth.belowSurface and design.draft.maximum)
  • Depth Below Keel (based on depth.belowTransducer and depth.transducerToKeel)
  • Depth Below Surface (based on depth.belowKeel and design.draft.maximum)
  • Distance To Go (based on courseGreatCircle.nextPoint.position)
  • Outside air dew point (based on humidity and temperature)
  • Fuel economy (based on speed over ground, fuel rate)
  • Propeller Slip calculation (requires defaults.json to include propulsion.*.drive.propeller.pitch and propulsion.*.transmission.gearRatio)
  • Sets environment.sun to dawn, sunrise, day, sunset, dusk or night (based on navigation.datetime or system time and navigation.position)
  • Tank Volume (based on currentLevel (requires calibration pairs (>2 for parallell sides, >3 for straight wedge and >4 for more complex shapes))
  • Velocity Made Good to Course (based on courseGreatCircle.nextPoint.bearingTrue heading true and speedOverGround)
  • Velocity Made Good to wind (based on wind.directionTrue and speedOverGround)
  • Set and Drift (based on headingMagnetic, courseOverGroundTrue, speedThroughWater, speedOverGround, magneticVariation)
  • Outside air wind chill (based on wind speed and temperature)
  • True Wind Angle, Direction and Speed (based on speed through water, AWA and AWS)
  • True Wind Direction (based on AWA and headingTrue)
  • Ground Wind Angle and Speed (based on SOG, AWA and AWS)
  • Magnetic Wind Direction (based on AWA and headingMagnetic)
  • Magnetic Wind Direction (based on wind.directionTrue and magneticVariation)
  • Wind Shift (experimental)
  • Moon illumination and times (based on time and navigation.position)
  • Sunlight Times: sunrise, sunriseEnd, goldenHourEnd, solarNoon, goldenHour, sunsetStart, sunset, dusk, nauticalDusk, night, nadir, nightEnd, nauticalDawn, dawn (based on time and navigation.position)
  • Outside Heat Index (based on temperature and humidity)
  • True Course Over Goround (based on courseOverGroundMagnetic and magneticVariation)
  • Magnetic Course Over Ground (based on courseOverGroundTrue and magneticVariation)

To add new calculations, just create a new file under the ./calcs directory.

For example. This is the VMG calculator.

module.exports = function(app) {
  return {
    group: 'vmg',
    optionKey: 'vmg',
    title: "Velocity Made Goog (based on courseGreatCircle.nextPoint.bearingTrue heading true and speedOverGround)",
    derivedFrom: [ "navigation.courseGreatCircle.nextPoint.bearingTrue",
                   "navigation.headingTrue",
                   "navigation.speedOverGround" ],
    calculator: function (bearingTrue, headingTrue, speedOverGround)
    {
      var angle = Math.abs(bearingTrue-headingTrue)
      return [{ path: "navigation.courseGreatCircle.nextPoint.velocityMadeGood",
                value: Math.cos(bearingTrue-headingTrue) * speedOverGround}]
    }
  };
}

signalk-derived-data's People

Contributors

sbender9 avatar joabakk avatar tkurki avatar davidsanner avatar panaaj avatar jncarter123 avatar sergei avatar chris0348 avatar techstyleuk avatar greenkeeper[bot] avatar cmotelet avatar fabdrol avatar ieb avatar jwallinder avatar kaapporaivio avatar raffmont avatar matztam avatar mkbltz avatar

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.