Giter Club home page Giter Club logo

kbox-firmware's Introduction

KBox Firmware

Travis status - Buy KBox on Tindie!

KBox Update - May 2020

Thanks for your interest in KBox! As of May 2020, I am not manufacturing or selling KBox anymore. All the source code and design files remain available for your inspiration and if you have any question, feel free to reach out by twitter message, email or via a github issue.

You might also be interested in my new project, inspired by KBox: a better sailing analytics platform. So if you are looking for a way to improve your tacks, perfect your downind sailing or just measure sailing angles and speeds, head over to ChartedSails.com.

What is KBox?

KBox connects your boat networks together and translates message from one bus to the other. KBox also includes multiple sensors that publish information on your boat networks. Finally KBox has a screen that can be used to repeat some of your boat parameters.

KBox picture

Of course KBox is designed with the SignalK specification in mind and will be compatible with it.

KBox hardware includes:

  • One NMEA2000 interface,
  • Two NMEA0183 inputs (one of them can be used as a Seatalk input),
  • Two NMEA0183 outputs,
  • One WiFi interface that can connect to an existing network or create a new network on your boat,
  • Three analog inputs to measure voltages between 0 and 23V (batteries, solar panels, generators, etc),
  • One shunt input to measure current consumption of your main house battery,
  • One barometer,
  • One inertial measurement unit providing a magnetic compass, an accelerometer to measure roll, pitch and yaw as well as a gyroscope,
  • An SDCard to record data.

KBox is an open-source hardware project. You can review the schematics and build it yourself. You can also order a fully assembled and tested KBox from tindie. Every KBox sold via tindie helps support the project. Thank you!

Find more news about KBox on hackaday.io.

How to get a KBox?

You can now order KBox on tindie.com. Supply is limited so use the "Join Waitlist" button to help me figure out how many I need to order and build.

What can I do with KBox?

We are still working hard on the software but we anticipate that the first and most useful use-cases will be:

  • Relay GPS and AIS information to your mobile devices (for example, an iPad running iNavX).
  • Monitor your energy and display voltages and currents on your existing NMEA2000 equipment
  • Record your boat position, and all its parameters (speed over ground, speed over water, heeling angle, apparent and true wind, etc) to an SDCard to replay the race at a later point.

Because KBox is open-source, you can do a lot more things with it:

  • Use KBox as a basic NMEA2000 to USB or Network gateway (for example, for SignalK development)
  • Build an open-source autopilot and use KBox hardware as the main sensor and computer (we have extension ports to connect to the actuator)
  • etc ...

Current software status

As of September 2018, the KBox firmware:

  • General functionality
    • Creates a new WiFi network (KBox) or can join an existing network (via simple code modification and recompiling)
    • Supports up to 8 simultaneous TCP clients connected on port 10110
    • Integrated web server
    • Configuration via a config file on the SDCard (see extras/config for examples
  • NMEA0183
    • Forwards all NMEA0183 sentences to WiFi clients via TCP
    • Converts RMC (GPS speed and coordinates) and MWV (Wind) to SignalK
  • NMEA2000
    • Forwards all NMEA2000 messages to WiFi (even the ones not understood by KBox) in Seasmart format (they look like NMEA sentences and start with $PCDIN)
    • Converts PGN 127245 (Rudder), 127250 (heading), 128259 (boat speed), 128267 (depth), 129025 (position rapid lat/lon), 129026 (sog/cog rapid) and 130306 (wind speed and angle/direction) to SignalK
    • Generates PGN 127508 (battery), 130310 (baro pressure), 130306 (wind), 127257 (attitude), 127250 (magnetic heading), 129026 (sog/cog rapid) from SignalK
  • Sensors
    • Measure nmea2000 bus voltage as well as all three battery banks voltage.
    • Measure barometric pressure
    • Measure roll, pitch and magnetic heading
    • Sensor data is available in SignalK and is automatically converted to the relevant NMEA and NMEA2000 messages
  • SignalK:
    • All updates generated from NMEA, NMEA2000 and internal sensors are available over websocket
  • Data logging
    • All NMEA and NMEA2000 messages are logged to the SDCard
  • Display
    • Battery monitor page: shows voltages of all battery
    • Stats page: shows number of received and transmitted messages on all interfaces

For more information on current work and future updates, please refer to our issue tracker.

KBox firmware overview

KBox is based on the Teensy 3.2 architecture and is compatible with the Arduino development environment. The WiFi module is an ESP8266-13 and is also programmed with an Arduino compatible SDK.

This project contains the source code for the firmware running on the host micro-controller (teensy-like Cortex M4 micro-controller) and the firmware running on the WiFi module.

Building and flashing KBox

Read the Developer setup page of the Wiki to learn how to install and run the tools required to program KBox.

Mailing list

Please join the KBox-Discussion mailing list! This is the best place to ask questions and discuss KBox.

Reporting problems and Contacting the author

If you run into problems or would like to suggest new features for this project, please use the GitHub issue tracker.

You can also find me (@sarfata) on the SignalK Slack server.

Contributing

Please post contributions on GitHub, in the form of pull-requests and add your name to the list of contributors below. We kindly ask that all contributors share their code under the MIT license. If you wish to share your code under a different release, please make it a library and post a pull-request to include your library.

List of contributors:

License

The original code of this project is distributed under the MIT license.

Please note that most of the libraries have their own license:

To work on KBox and program the WiFi module, you will also use ESPTool which is under the GPL.

Fair winds and following seas to the authors of these libraries! Without them, this project would not have been possible!

Changelog

  • 2018 09 07 - v1.3.6

    • Force ESP board definition to generic module w 1MB flash to avoid build error.
    • Upgrade ESP platform to 1.8.0 to use ESP8266 framework 2.4.2 which improves stability of the WiFi modules and seems to fix a number of connection issues for other people. Hopefully will also improve KBox wifi stability.
    • Add HTTP CORS header on /signalk. This makes KBox compatible with the amazing Kip to display your boat data in a browser.
    • Fixed a typo in the reboot reasons.
    • Add missing dependency pyserial in the list of dependencies for kbox.py.
  • 2018 07 26 - v1.3.5

    • Fix a bug that would cause KBox to crash on NMEA sentences without a checksum
    • Fix a bug where RMC sentence without a date would crash KBox
    • Added support for parsing DPT and DBT NMEA sentences
    • Added support for generating DBT and DPT sentences. By default only DPT is enabled.
    • Added support for parsing XDR air temperature measurements.
    • Parse magnetic variation from RMC sentence
    • Generate NMEA2000 messages for air temperature measurements
  • 2018 07 06 - v1.3.4

    • Specify a list of default environment so platformio does not build all variants of the project by default.
  • 2018 07 06 - v1.3.3

    • Fix a bug which forced us to use program-esp to update the wifi module. It is now possible again to just use the following commands to update KBox:

         platform run -e host -t upload
         platformio run -e esp -t upload
      
    • Change default esp upload speed to 921600 because 2000000 does not seem well supported on Windows.

    • Changed the 'end of programming' detection method to more reliably detect when we are done programming and reboot KBox.

    • Tested the official ESP uploader on Windows and OS X. Comment out the line tools/platformio_cfg_esp.py in platformio.ini to use it. It will be a little bit slower but might work better for some people.

  • 2018 07 06 - v1.3.2

    • Changes to the build configuration to improve compatibility with Windows and address breaking changes in plaformio.
    • Fix some issues that prevented the tests and sktool from compiling on Windows.
    • Also added automatic builds on AppVeyor with Windows to hopefully detect Windows issues sooner in the future.
  • 2018 05 26 - v1.3.1

    • Fix bug which prevented WiFiRXError from being displayed on stats page.
    • Fix bug in kbox.py tool send wifi config command.
  • 2018 05 18 - v1.3.0

    • New logfile format, compatible with SignalK server, saves NMEA messages, NMEA2000 messages and SignalK messages.

    • KBox will get the date from NMEA or NMEA2000 and display it on the screen.

    • KBox will wait until it knows the current time to start logging (this can be changed via configuration)

    • Log files are named after date and time of their creation

    • KBox will save in the logfile important system messages and some stats

    • Bunch of new configuration options:

      "logging": {
        "enabled": true,
        "logWithoutTime": false,
        "logNMEA2000": true,
        "logNMEA": true,
        "logSignalK": true,
        "logSystemMessages": true,
        "logSignalKGeneratedFromNMEA": false,
        "logSignalKGeneratedFromNMEA2000": false,
        "logSignalKGeneratedByKBoxSensors": true
      },
      
    • KBox will print version number and time on the "StatsPage"

    • StatsPage is the new default page

    • KBox v1.3.0

  • 2018 04 25 - v1.2.4

    • Improved WiFi connection stability This required the latest version of ESP firmware. And also some changes to the TCP/NMEA server.
    • Bug#96: make wifi led go green when we have a websocket client connected
  • 2018 04 23 - v1.2.3

    • Repeat all NMEA and NMEA2000 data to the computer when the serial port is opened at 38400 bauds.
    • Do not lock up when connected to a Raspberry Pi (was bug #68).
    • Publish internal sensors data to serial outputs.
    • Save all NMEA and NMEA2000 messages to the SDCard again.
  • 2018 02 16 - v1.2.2

    • Go back to older version of ESP8266 framework (2.3 via framework 1.5) to get rid of random crashes. Still need to investigate more but we do not need 2.4 at the moment.
  • 2018 02 15 - v1.2.1

    • Send PGN 130314 for high-resolution barometer data on NMEA2000 networks (that is in addition to PGN 130310 which was already sent before).
  • 2018 02 10 - v1.2.0

    • Configuration option for WiFi. KBox can act as an access point and can also connect to an existing network. Both are possible at the same time.
    • KBox now shows WiFi info on the screen (status as a client and as an access point), number of clients connected, IP address)
    • KBox now announces its SignalK "self" properly and you can set your own MMSI via the config file.
    • Updated ESP8266 framework version to 2.4.
    • Fixed a bug where SDCard would not show free space properly
  • 2018 01 10

    • Fixed bug #69 - We were sending pressure in Pascal instead of Bars in NMEA XDR sentences for pressure.
  • 2018 01 07

    • Data coming from NMEA2000 bus is now sent to SignalK websocket output and will be converted to NMEA0183 (if a conversion is available).
    • Added an IMU page to show heel/roll/pitch on the screen
    • Added options to configure orientation of KBox inside the boat (still needs some work before it supports all possible orientations)
    • IMU calibration will be automatically saved when IMU reports its calibrated
    • User can do a long-press in the IMU page to save current offset for pitch & heel
  • 2018 01 04

    • Add support for parsing PGN127257 Attitude (roll/pitch/yaw)
    • Also improved the output in NMEA and SignalK format when some attitude values are unknown
  • 2017 12 28

    • KBox now supports a configuration file (kbox-config.json) on the sdcard.
    • KBox supports sending data to NMEA outputs
    • Generated NMEA sentences can be configured independently for each output (nmea1/nmea2/wifi)
    • Frequency of IMU and Barometer updates can be configured
    • KBox can be configured to only listen on NMEA2000 bus and not send anything
    • WiFi module can be completely disabled (will save power)
    • tools/kbox.py can be used to read/write files to the SDCard over USB
  • 2017 12 07

    • Merge develop branch into master - Start the changelog
    • The old master branch is not in kbox-v0

kbox-firmware's People

Contributors

hbehrens avatar neftaly avatar ronzeiller avatar sarfata avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kbox-firmware's Issues

Some thoughts on the BNO055 Sensor

Intro:

Many boats have an autopilot with an electronic compass, which serves HDG values. Not so common are heel and pitch. As heel (roll) is needed to calculate leeway it is a must have on a boat to get more control to trim of sails for more performance sailing.

The BNO055:

it is certainly a great fusion sensor for many applications, but I am not sure if it is realy a good sensor for navigation.
The big disadvantage is, that the sensor should keep on moving to self-calibrate. If the sensor is just turned on without any movement you do not get relieable values for HDG. Heel and pitch is not that susceptible to external disturbances therefore the values are more trusted, even with less movements of the sensor.

The BNO055 and KBox:

Personally I am not sure, if the sensor is as good in upright mounting position as it is laying.
The data sheets do not give any information for upright remapping of the axis.
(The sensors inside the BNO055 have some orientation of course and have different sensibility to z and x/y axis. If this is compensated in fusion mode? I do not know. We probably should contact Bosch in that matter.)

Placement of BNO055

(added 3.1.2018)
Forum discussion about Placement of BNO055 for vertical placement:

Beware that the BNO055's Euler output is incorrect at moderate to steep pitch and roll orientations. If you plan to tilt the sensor more than about 20 degrees, I recommend using the quaternion output instead.

https://forums.adafruit.com/viewtopic.php?f=25&t=108290&p=541754#p541754

Quaternions vs. Euler Angles

FAQs on Adafruit says:

According to Bosch BNO055 Euler angle output should only be used for eCompass, where pitch and roll stay below 45 degrees.
For absolute orientation, quaternions should always be used, and they can be converted to Euler angles at the last moment via the .toEuler() helper function in quaternion.h

https://learn.adafruit.com/adafruit-bno055-absolute-orientation-sensor/faqs
https://www.allaboutcircuits.com/projects/bosch-absolute-orientation-sensor-bno055/

image
Image (c) BOSCH from the Quick Guide

The other point is, that the sensor should be calibrated after each power on!

Some users mentioned this on forums and I discovered the same, that the sensor sometimes is switching +/- 180 degrees!
May be it has something to do with the fusion mode itself and the (probably) built in Kalman filter which is "running away" if the sensor is not calibrated (moved) after power on.

System Calibration

(added on 2.1.2018)
As long as the sysCalibration = 0 the BNO055 did not find magnetic north. After finding north the value might jump to magnetic north.
Therefore the code is extended that sysCalibration value must be > 0 for all value readings.
https://learn.adafruit.com/adafruit-bno055-absolute-orientation-sensor/device-calibration

The BNO has no internal EEPROM, so values must be stored to teensy's EEPROM.
Adafruit believes that the calibration can be restored, but there is strong evidence in the net, that this is wrong!
When the sensor is moved (turned) when in the no-power state, than the stored calibration values can not be ok.

KBox software side:

In the quick start is mentioned, that calibration of 2 is still quite ok and calibration value 1 should be signaled to the user, that the sensor should be calibrated again (e.g. by the figure 8 movement for heading).

  • I think, we should separate the two measurement outputs HDG and heel/pitch to their own calibration values.
  • And we should display the cal-values on the IMU-Monitor-Page too.
  • So we can output at least heel and pitch (trim) with trusted values, even when HDG has gone. (As it stops output if cal-value is < 3 anyway)
  • I would like to "invent" a just internal used Signal K JSON for the IMU sensor cals (e.g. SKPathKboxImuSensorMagCal / kbox.imuSensor.magCal....), which we could send to the Hub. So we could do the sensor check for the display (display HDG in red as warning etc.) completely separate of check for building the NMEA0183 and NMEA2000 sentence which should not go out if cal < 2 or 3.

Sources:

Quick Start Guide: https://ae-bst.resource.bosch.com/media/_tech/media/application_notes/BST-BNO055-AN007-00_Quick_Start_Guide.pdf
Calibration: https://www.youtube.com/watch?v=Bw0WuAyGsnY
Datasheet: https://ae-bst.resource.bosch.com/media/_tech/media/datasheets/BST_BNO055_DS000_14.pdf
Adafruit: https://learn.adafruit.com/adafruit-bno055-absolute-orientation-sensor/overview

It would be very interesting to get feedback from other users in this matter, especially on HDG-datas. May be the movement of a boat is always big enough to keep the BNO055 well calibrated!

Log data to SDCard in SignalK update format

Instead of using the current "proprietary" log format, we should log data in SignalK update format. The logfile will be made of multiple independent JSON messages.

  • Define the format more precisely
  • Implement the new logger that uses SignalK
  • Get time from the GPS messages received via NMEA0183 and implement "system time" (so that we know what time it really is when logging messages)
  • Convert NMEA GPS messages to SignalK
  • Convert Battery monitoring messages to SignalK
  • Convert IMU messages to SignalK
  • Convert NMEA2000 Speed and Depth messages to SignalK
  • Convert NMEA2000 Wind messages to SignalK

Configuration settings on KBox

We will get a lot of different settings. Some of them to change during operation, some to configure KBox before booting.

We discussed the ini-file vs. JSON earlier.

The aim will be a web based configuration one day.
But in the meantime we could start to put setting variables (where needed) all over the code.

Du you think it is possible to start with the ini-file type?
The JASON type for default settings and changing by web interface could then still be made. This would not touch the global names of the variables.

I think it is also a question of „keeping it simple“ vs. strict OOP with a huge amount of get and set....

Hardware configuration (mainly which service should run) could be made centrally with simple #include and commenting out if a task is not needed.

Supported PGNs

Just to add to the wiki:
you wrote: "Barometric pressure, temperature and humidity all ok on Raymarine i70 display. The display does not support "inside temperature"
This is true, but also i70 does not support "inside humidity". Is is the same as with temperature, only "outside humidity" is supported.

Keep track of total distance sailed by boat

Suggested by Andreas Heertsch

It would be fine, if KBox has a logging-function for the accumulated distances the boat has driven. KBox would be the best place, to accumulate (and backup this value on SD-card), because KBox is always running. (If I use an old Smartphone for logging, I am afraid, that miles are lost, if the Smartphone is in "bad mood").

Output data in NMEA format via serial ports

Multiple users have requested that KBox should relay available data to its serial ports.

I am thinking of the following:

  • NMEA1 - Send everything we have at 38400
  • NMEA2 - Send only GPS data at 4800

Data would be generated from internal SignalK data. This means anything coming from one of the NMEA port, the NMEA2000 or WiFi connection would be repeated as long as KBox understands it and knows how to translate it to NMEA.

Fix GPS coordinates parsing

This test is wrong:
https://github.com/sarfata/kbox-firmware/blob/develop/src/test/signalk/SKNMEAParserTest.cpp#L47

See http://www.catb.org/gpsd/NMEA.html#_nmea_encoding_conventions:

Where a numeric latitude or longitude is given, the two digits immediately to the left of the decimal point are whole minutes, to the right are decimals of minutes, and the remaining digits to the left of the whole minutes are whole degrees.

Eg. 4533.35 is 45 degrees and 33.35 minutes. ".35" of a minute is exactly 21 seconds.

Eg. 16708.033 is 167 degrees and 8.033 minutes. ".033" of a minute is about 2 seconds.

We need to fix the tests and the code.

Bugfix for NMEA sentence length

The $GPGGA sentence is "Discarding incomplete sequence"

I think it should be:
#define MAX_NMEA_SENTENCE_LENGTH 83

in NMEAService.h
Defined by the NMEA Standard is 82 plus 1 needed for termination of string?

WiFi upload should work with platformio esptool

The version of the esp-tool embedded in platformio does not work with our program-esp firmware. This is probably a timing issue, but needs to be debugged.

The work-around is to use another esp programmer, as demonstrated in the Makefile but that only works on Linux and Mac OS.

KBox serial outputs lock up when connected to a Raspberry Pi

See discussion on mailing list:

I was able to reproduce the problem with a Raspberry Pi at home tonight and I have found a fix.

The problem is that the raspberry pi echoes back some USB packets back to KBox which other serial drivers do not do (apparently this is specific to raspberry pi). Because KBox was not reading the input, the serial port was getting stuck. Just reading and discarding incoming data fixes this.
For more details, you can read this message on the teensy forum: https://forum.pjrc.com/threads/23770-Teensy-3-0-goes-mute-when-sending-to-Raspberry-Pi?p=32304&viewfull=1#post32304

The solution is very simple, just add the following lines in the loop() function of your src/host/main.cpp file:

while (Serial.read() > 0 ) {}

Write a service to process generate boat speed messages from a HALL sensor.

  • Create a new service to manage hall speed sensors and configure it to trigger at a given frequency (1Hz, 10Hz, 25Hz)
  • Use one of the logic input on the teensy to count the number of pulses per interval of time
  • Make the distance per number of tick configurable
  • Generate "boat speed" message in signalk
  • Generate NMEA2000 boat speed PGN from the signalk messages
  • Use a logic analyzer and a pin to measure the jitter of the service and verify that it's reasonable
  • Generate Log message with distance of current trip

NMEA2000 -> NMEA0183 conversion

For openCPN or similar we need the NMEA2000 converted to NMEA0183.
Signal K is internally used for all values

The questions are:

  1. What to do if incoming values will be calculated due to calibration (tables) and/or offset?
    We need variables for that, as Signal K is limited

  2. What to do if we need two different Signal K values for one NMEA0183 sentence?
    E.g. VWR – Relative Wind Speed and Angle sentence
    Signal K has no combined value for that.

Therefore we have a problem doing things like:
void SKNMEAVisitor::visitSKEnvironmentWindAngleTrue(.......)
for building the VWR sentence in SKNMEAVisitor.cpp where we also need Wind Speed.

IMHO NMEA2000, Signal K, NMEA0183, SeaSmart and so on are incoming and outgoing data formats which should not used for internally storing datas as the formats do not fit together.

In other words:
Signal K is not needed at all if someone just wants KBox for NMEA2000 -> NMEA0183 (openCPN and similar)
or wants KBox for NMEA2000 -> Actisense format for Expedition (instead an Actisense NGT-1)
You know, that KBox is mentioned on the Expedition Homepage? 👍
Personally I liked your KMessage much more as it gave me much more flexibility 😞

Receive NMEA sentences from TCP/IP connection

Use-case

  • Have a navigation software (OpenCPN, iNavX, etc) send navigation NMEA sentences to KBox
  • Data should be relayed to NMEA outputs and to NMEA2000 network

NMEA0183 Sentences to support

iNavX documentation says:

When a waypoint is active, the NMEA data sentences $GPAPB, $GPBOD, $GPBWC, $GPGGA, $GPRMB, $GPRMC, $GPXTE, $GPVTG will be sent to the TCP/IP host. "True/Mag" selection will set whether bearings sent in the $GPAPB NMEA sentence to the Autopilot are True or Magnetic.
Transfer: Will send waypoints using NMEA data sentence $GPWPL to the TCP/IP host.

  • APB - Autopilot sentence
  • BOD - Bearing waypoint to waypoint
  • BWC - Bearing and distance to waypoint
  • RMB - Like RMC but with info on destination waypoint.
  • XTE - Cross track error
  • VTG - Track made good and ground speed
  • WPL - Waypoint info

Conversion to NMEA2000

TBD.

Voltage Readings

Thomas,
I was trying now for hours to find out why the voltage reading in "my T36" KBox is not working, but without result.

The strange thing is, I do not see any difference between master-branch and develop-branch.
In master-branch it is working and in develop I get 0.0V

Add a page showing realtime IMU data

So that users can look at it in realtime and make sure everything is working well.

The IMU should show:

  • Current pitch
  • Current yaw
  • Current roll
  • Current magnetic course

Library for global variables for Boat Datas, API for Plugins

At the moment we have a lot of different KMessage Types, KSignal-Strings, Visitors with LinkedLists, and so on.

Would't it be nice to have something like global variables or a class just for actual boat Datas for Apparent Wind (Angle, Speed, Direction), True Wind (Angle, Speed, Direction), Depth, COG, SOG, Heel and so on which we can write to and get the most actual data where- and whenever we need them?

May be as a (basic, central) library so users could extend the class in some kind of plugIn to whatsoever they need? (Similar as openCPN....)

KBox Firmware could become an even more flexible framework for doing a lot of interesting things on a boat.
E.g. most of that is already possible by the hardware: http://www.yachtd.com/products/
But also thinking of future displays getting datas by Bluetooth (similar to Tacktick) or KBox doing things like B&Gs Hydra or Sailmon does and so on....

Working list for SKNMEA2000Parser

PGN 128259 Boat speed

see discussion with Timo: ttlappalainen/NMEA2000#84
IMHO we should not store ground speed there, as it will probably not coming and some microseconds later we get ground speed by GPS.

PGN 126992 System Time Date UTC

I do not know how to make an entry in signalk.json for Signal K fields

127250 Vessel Heading

Official NMEA2000 doc says:
Heading sensor value with a flag for True or Magnetic. If the sensor value is Magnetic, the deviation field can be used to produce
a Magnetic heading, and the variation field can be used to correct the Magnetic heading to produce a True heading.

So we could calculate True heading for output if values for variation AND deviation are there.

Attitude

Would like to add Attitude to SKNMEA2000Parser, to switch from internal sensor to boats values for heel and/or pitch.
Selectable by config setting.
Ditto for Magnetic Heading, if it is on the N2k-bus than I would rather like to switch to this source.
OK for you?

Config setting needed for

Seasmart Output vs. NMEA0183 Output
As we soon have a lot of NMEA0183 sentences for navigation
Each NMEA sentence should have its own config-selector for en-/disable

WiFi connection closed by foreign host

Hi Thomas,

Datas are coming over WiFi and all is working nice for a while.
No it says "Connection closed by foreign host."

Sometimes early, just now after 2 hours.

Did you experience similiar?
Any suggestions to make the webserver more stable?

Thanks,
Best Regards
Ronnie

N2k Message for IMU in degrees instead of radians

in the NMEA2000Task.cpp seems to be a bug, as there is sent degrees to form N2k-Sentences.

Shouldnt be there a DegToRad as:

SetN2kAttitude(n2kmessage, _imuSequence, DegToRad( m.getYaw() ), DegToRad( m.getPitch() ), DegToRad( m.getRoll() ) );
    sendN2kMessage(n2kmessage);

    double magneticVariation = N2kDoubleNA;
    double magneticDeviation = N2kDoubleNA;

    SetN2kMagneticHeading(n2kmessage, _imuSequence, DegToRad( m.getCourse() ), magneticDeviation, magneticVariation);

Tested with Actisense NGT-1 and NMEA Reader shows correct values then.

After rebuild of KBox-firmware KBox runs only in test-mode

Hi Thomas
perhaps a very beginer question: I changed NMEA port 1 to 4800Bd and integrated KBox WiFi into my network.
Then I compiled and uploaded the firmware. All runs fine, but after Reset KBox shows only the testsuite.
Do I have to push some button?
Thank you
Andreas

unexpected nmea sentence crashing the kbox

It seems one of my NMEA 2000 device crashes the kbox. I am going to try to isolate the device to provide you more information.

Any idea how to troubleshoot it? I am running the development branch right now.

Here are the logs from the serial console.

WD main.cpp:90 Still running ... 0 connected clients - 36560 heap - IP: 0.0.0.0
WD main.cpp:90 Still running ... 0 connected clients - 36560 heap - IP: 0.0.0.0
D NMEA2000Service.cpp:92 Sending message on n2k bus - pgn=127508 prio=6 src=22 dst=255 len=8 result=success
D NMEA2000Service.cpp:95 TX: $PCDIN,01F214,00000000,16,000000FF7FFFFF01*57
D NMEA2000Service.cpp:92 Sending message on n2k bus - pgn=127508 prio=6 src=22 dst=255 len=8 result=success
D NMEA2000Service.cpp:95 TX: $PCDIN,01F214,00000000,16,010100FF7FFFFF01*57
D NMEA2000Service.cpp:92 Sending message on n2k bus - pgn=127508 prio=6 src=22 dst=255 len=8 result=success
D NMEA2000Service.cpp:95 TX: $PCDIN,01F214,00000000,16,FF0000FF7FFFFF01*57
D NMEA2000Service.cpp:92 Sending message on n2k bus - pgn=127508 prio=6 src=22 dst=255 len=8 result=success
D NMEA2000Service.cpp:95 TX: $PCDIN,01F214,00000000,16,FF4505FF7FFFFF01*53
D NMEA2000Service.cpp:37 Received N2K Message with pgn: 60928

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.