Giter Site home page Giter Site logo

signalk-hwt901b-imu's Introduction

SignalK node server plugin (BETA) reading roll, pitch and magnetic heading from WITMOTION's HWT910B sensor

INPUT:

as of device data sheet and own testing, cable plug respresenting the boat's stern:
0x55 0x53 PitchL PitchH RollL RollH YawL YawH VL VH SUM

CALCULATION:

  • Pitch (x axis):
    ((PitchH<<8)|PitchL)/32768*180(°)
  • Roll (y axis):
    ((RollH<<8)|RollL)/32768*180(°)
  • Yaw (z axis):
    ((YawH<<8)|YawL)/32768*180(°)
  • Version:
    (VH<<8)|VL
  • Checksum:
    SUM=0x55+0x53+RollH+RollL+PitchH+PitchL+YawH+YawL+VH+VL (least significant byte must match SUM)
  • Magnetic Heading:
    z axis value (yaw) plus an offset determined after calibration and install

PROCESSING:

  • Gyroscope has to be calibrated by wit motion windows software prior to final placement onboard
  • acceleration calibration, as well as levelling pitch & roll can be accomplished via the plugin's settings:

image

OUTPUT TO SIGNALK (in rad):

{"updates":[{"$source":"WIT.n",
             "values":
               [{"path": "navigation.headingMagnetic",
                         "value":123.456},
                {"path": "navigation.attitude",
                         "value":{"roll":0.123456,
                         "pitch":-0.123456,
                         "yaw":null}}
                ]
            }]
}

signalk-hwt901b-imu's People

Contributors

w-geronius avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

techgardeners

signalk-hwt901b-imu's Issues

WIT z-output should not directly be interpreted as HDG

valuable contribution of Rolf, via eMail - many thanks

Wir beide haben den https://www.wit-motion.com/10-axis/witmotion-hwt901b-rs232-10.html bzw. https://www.wit-motion.com/10-axis/witmotion-hwt901b-ttl-10.html.
Schaut man sich die Beschreibung von witmotion-wt901c-ttl-9-axis-imu-sensor an, sieht man deutlich "Tilt" im Namen, bei uns fehlt diese Tiltkompensation.
Ich habe diverse Tutorials gefunden, die haarklein und von Anfang an erklären wie man die Werte berechnet indem die IMU (mag und gyro) ausgelesen wird. Ich denke aber das ist bei uns nicht nötig, da reicht die Anpassung mittels atan2 um die Tilt Anpassung zu bekommen. Dann sollte der Sensor auch in jeder Lage stabile Daten bereit stellen. Das wirst du auch in Java hinbekomnen.
https://www.youtube.com/watch?v=p_qZ-ie2R7o
Bei um die 25-30 min baut er das z.B. bei seinem Sensor ein.
Zumindest kannst du jetzt deine Doku ergänzen denn die Wit C Reihe wird die Probleme so nicht haben bzw. man müsste die Tilt-Anpassung aus deinem Modul da aus lassen.

WT901C

Hello, does the plugin work with the WT901C RS232 model? Thank you for your help !

negative angles

by applying a heading offset, it is possible to generate negative angles. Check log of 15.9. (heading offset was set to -10)
Also check impact of derived data corrections

plugin not working in Lysmarine SignalK

Hi, I try to use the plugin with SignalK in Lysmarine OS (bareboat necessities).
Plugin configured with /dev/ttyUSB0 port.
In logfile I get this error:
Oct 14 09:21:34 2022-10-14T09:21:34.855Z signalk-hwt901b-imu plugin.stop
Oct 14 09:21:34 2022-10-14T09:21:34.861Z signalk-hwt901b-imu plugin.connect
Oct 14 09:21:34 connecting to /dev/ttyUSB0:0
Oct 14 09:21:34 2022-10-14T09:21:34.869Z signalk-hwt901b-imu Plugin options saved
Oct 14 09:21:34 POST /skServer/plugins/signalk-hwt901b-imu/config 200 9.690 ms - 50
Oct 14 09:21:34 2022-10-14T09:21:34.877Z signalk-hwt901b-imu plugin.connect.close
Oct 14 09:21:34 TypeError: DelimiterParser is not a constructor at SerialPort. (/home/signalk/.signalk/node_modules/.pnpm/[email protected]/node_modules/signalk-hwt901b-imu/index.js:98:44) at SerialPort.emit (node:events:513:28) at binding.open.then.opening (/home/signalk/.signalk/node_modules/.pnpm/@serialport[email protected]/node_modules/@serialport/stream/lib/index.js:234:12)

Thanks for helping.

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.