Skip to content

Instantly share code, notes, and snippets.

Avatar

Matthieu Morin tuxite

  • Le Havre, France
View GitHub Profile
@tuxite
tuxite / index.html
Created Mar 25, 2015
A simple Wind (speed, direction) NMEA serial simulator with Flask and SocketIO controls
View index.html
<!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 Apr 25, 2022
A very simple ISO 8211 Decoder
View iso8211.py
# -*- 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 Sep 17, 2014
D3 JS script to draw a wind arrow
View d3.windArrow.js
/* 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 Aug 29, 2015
Arduino sketch for Sparfun Weather Shield, sending weather data through UDP broascast Json
View weather_shield_eth
/*
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
Example of OpenLayers 3 map inside an ExtJS 4 Panel
View map.html
<!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 Aug 29, 2015
Some formulas to computes coordinates, distance and bearing on a rhumb line.
View rhumbline.js
/* jshint indent: 4 */
/* General functions */
function modulo180(val) {
if (Math.abs(val) > 180) {
val = -(val % 180);
}
return val;
}