Skip to content

Instantly share code, notes, and snippets.

View jrleeman's full-sized avatar

John Leeman jrleeman

View GitHub Profile
@jrleeman
jrleeman / part1.ipynb
Last active August 29, 2015 13:57
Inversion Theory Example of Finding a Black Box Pinger
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jrleeman
jrleeman / part2.ipynb
Last active September 21, 2020 03:35
Part 2 - The Solution to the MH370 Pinger Locator Problem
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jrleeman
jrleeman / ReadBinSeismo.m
Created April 17, 2014 13:12
Readers For Laboratory Acoustic Data
function[seismo,size] = ReadBinSeismo(fname)
fid = fopen(fname,'rb');
size = fread(fid,2,'int');
size(2)
seismo = fread(fid,size(2),'double')
fclose(fid)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jrleeman
jrleeman / PressureLogger.ino
Created June 17, 2014 19:59
Pressure Temperature Logger for Arduino Data Shield
#include <SD.h>
#include <Wire.h>
#include "RTClib.h"
// Data logger for temperature and pressure data using the Adafruit
// logger shield.
// Logging Interval (milliseconds)
#define LOG_INTERVAL 60000
@jrleeman
jrleeman / RadarTest.ipynb
Created July 3, 2014 03:12
Spectrogram plotting demo for radar data. Requested via Twitter.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jrleeman
jrleeman / Fig_10.png
Last active September 27, 2016 18:00
Winberry, 2014 Whillans Model
Fig_10.png
@jrleeman
jrleeman / rsfs.py
Created December 30, 2014 21:04
Example forward model of rate-and-state friction in python
import numpy as np
from scipy import integrate
import matplotlib.pyplot as plt
from math import exp,log
def friction(t,y):
k = 1e-3
a = 0.005
b = 0.01
Dc = 10.
@jrleeman
jrleeman / toDayOfYear.ino
Last active July 18, 2024 22:00
Arduino Day of Year Function
/*
toDayOfYear
This sketch demonstrates a function to convert the year, month, day
format to the day of the year. Leap years are corrected. Unit tests
include leap year and regular year tests for every month as well as
corner case and error case testing.
Created 30 March 2015
Modified 14 April 2015
@jrleeman
jrleeman / tilt_logger_system.ino
Last active August 29, 2015 14:18
Logs tilt meter and GPS data from a Jewell D700 tilt meter and Adafruit Ultimate GPS logger shield.
#include <SPI.h>
#include <Adafruit_GPS.h>
#include <SoftwareSerial.h>
#include <SD.h>
#include <avr/sleep.h>
// Make software serial port for GPS and GPS instance
SoftwareSerial mySerial(8, 7);
Adafruit_GPS GPS(&mySerial);