Skip to content

Instantly share code, notes, and snippets.

View tuxite's full-sized avatar

Matthieu Morin tuxite

  • Le Havre, France
View GitHub Profile
@tuxite
tuxite / index.html
Created March 25, 2015 16:58
A simple Wind (speed, direction) NMEA serial simulator with Flask and SocketIO controls
<!DOCTYPE HTML>
<html>
<head>
<title>NMEA Serial Simulator</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
@tuxite
tuxite / iso8211.py
Last active April 25, 2022 11:45
A very simple ISO 8211 Decoder
# -*- coding: utf-8 -*-
"""A very simple ISO8211 decoder."""
# Done without the ISO 8211 standard.
# Imports
import re
# Constants
DDF_LEADER_SIZE = 24
DDF_FIELD_TERMINATOR = chr(30)
@tuxite
tuxite / d3.windArrow.js
Created September 17, 2014 13:28
D3 JS script to draw a wind arrow
/* Creates a wind arrow for display in station model */
/* The default size of the arrow is: width = 8, height = 2.
The size is then given by the @arrowWidth parameter.
The canvas is a square of 2*arroWidth.
The arrow is drawn in the center of the square and rotated to the corresponding angle (@direction).
*/
var WindArrow = function (speed, direction, container, arrowWidth) {
'use strict';
var index = 0,
@tuxite
tuxite / weather_shield_eth
Last active August 29, 2015 14:05
Arduino sketch for Sparfun Weather Shield, sending weather data through UDP broascast Json
/*
Weather Shield using Ethernet
by Matthieu Morin
created on 2014-08-10
Licence: GPL V3
Based on:
Weather Shield Example
By: Nathan Seidle
@tuxite
tuxite / map.html
Last active May 25, 2021 08:37
Example of OpenLayers 3 map inside an ExtJS 4 Panel
<!DOCTYPE html>
<html>
<head>
<title>Map Panel</title>
<!-- ExtJS -->
<script type="text/javascript" src="http://cdn.sencha.com/ext/gpl/4.2.1/examples/shared/include-ext.js"></script>
<script type="text/javascript" src="http://cdn.sencha.com/ext/gpl/4.2.1/examples/shared/options-toolbar.js"></script>
<link rel="stylesheet" type="text/css" href="http://cdn.sencha.com/ext/gpl/4.2.1/examples/shared/example.css" />
<!-- Local OpenLayers 3 stylesheet -->
<link href='ol.css' rel="stylesheet">
@tuxite
tuxite / rhumbline.js
Last active August 29, 2015 13:57
Some formulas to computes coordinates, distance and bearing on a rhumb line.
/* jshint indent: 4 */
/* General functions */
function modulo180(val) {
if (Math.abs(val) > 180) {
val = -(val % 180);
}
return val;
}