Skip to content

Instantly share code, notes, and snippets.

@tkurki
tkurki / flow.json
Created December 10, 2023 10:47
Block headingMagnetic from VHW sentence
[{"id":"636f31ea74dbedaa","type":"tab","label":"Flow 1","disabled":false,"info":"","env":[]},{"id":"a78807bd17376bc8","type":"signalk-input-handler","z":"636f31ea74dbedaa","name":"signalk-input-handler navigation.headingMagnetic","context":"vessels.self","path":"navigation.headingMagnetic","source":"","x":310,"y":160,"wires":[["49a076745bacb191"]]},{"id":"e5031908a6fc98db","type":"debug","z":"636f31ea74dbedaa","name":"block","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":810,"y":100,"wires":[]},{"id":"a441ad6250acc7cb","type":"signalk-input-handler-next","z":"636f31ea74dbedaa","name":"","x":880,"y":180,"wires":[]},{"id":"49a076745bacb191","type":"switch","z":"636f31ea74dbedaa","name":"","property":"source.sentence","propertyType":"msg","rules":[{"t":"eq","v":"VHW","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":610,"y":160,"wires":[["e5031908a6fc98db"],["a441ad6250acc7cb","b6e0bd0227045a3
@tkurki
tkurki / 00doc.md
Last active April 17, 2024 12:10
Wind Speed and Direction with Grafana ECCharts plugin
@tkurki
tkurki / index.js
Created April 11, 2023 16:59 — forked from MoOx/index.js
Export/import github labels
// go on you labels pages
// eg https://github.com/cssnext/cssnext/labels
// paste this script in your console
// copy the output and now you can import it using https://github.com/popomore/github-labels !
var labels = [];
[].slice.call(document.querySelectorAll(".label-link"))
.forEach(function(element) {
labels.push({
name: element.textContent.trim(),
@tkurki
tkurki / Radar
Last active October 6, 2022 06:25
Crude radar-like data rendering tests with Canvas, Pixi.js (WebGL) and SVG
dummy
@tkurki
tkurki / value_handling.md
Last active November 16, 2021 20:42
Signal K value handling examples

Number valued PathValue

Delta

{
  "updates": [
    {
      "values": [
        {
          "path": "navigation.speedOverGround",
          "value": 2.5
@tkurki
tkurki / chroot-to-pi.sh
Created May 30, 2020 18:09 — forked from htruong/chroot-to-pi.sh
Chroot to pi sd card
#!/bin/bash
# This script allows you to chroot ("work on")
# the raspbian sd card as if it's the raspberry pi
# on your Ubuntu desktop/laptop
# just much faster and more convenient
# credits: https://gist.github.com/jkullick/9b02c2061fbdf4a6c4e8a78f1312a689
# make sure you have issued
@tkurki
tkurki / index.html
Created December 25, 2018 14:16
Example Signal K web page that subscribes to self vessel's position, converts incoming deltas to GeoJSON and updates text on the page with it
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Signal K Sample Consumer</title>
</head>
@tkurki
tkurki / gist:c1f79bb1cd5116536c1960fa41406c44
Created April 6, 2018 16:46
/signalk/v1/api/vessels/self/polars response
{
"85a9b66d-d01e-4a5a-912d-4a6b13a4db6d": {
"uuid": "85a9b66d-d01e-4a5a-912d-4a6b13a4db6d",
"name": "aava",
"trueWindSpeedLabelUnit": "kn",
"speedThroughWaterLabelUnit": "kn",
"trueWindAngles": [
0.9075712110370513,
1.0471975511965976,
1.3089969389957472,
@tkurki
tkurki / s3-provider.js
Created January 7, 2018 14:58
S3 Signal K provider
/*
* Copyright 2015 Teppo Kurki <teppo.kurki@iki.fi>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
@tkurki
tkurki / gist:d8d45dfb368b3b544542511e8e95a45b
Last active November 11, 2020 11:07
ESP8266 script to read DS18B20 sensors over 1W and broadcast Signal K JSON over udp
#include <OneWire.h>
#include <DallasTemperature.h>
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
#include <SPI.h>
#include <Wire.h>
#include <ESP8266WebServer.h>
#include <DNSServer.h>
#include <WifiServer.h>