This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
def cart2pol(x, y): | |
''' | |
cartesian to polar coordinates | |
''' | |
theta = np.arctan2(y, x) | |
rho = np.sqrt(x**2 + y**2) | |
return (theta, rho) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# https://timwise.co.uk/2014/02/03/converting-kml-to-gpx-with-python/ | |
# https://gist.github.com/timabell/8791116 | |
import argparse | |
import xml.sax | |
parser = argparse.ArgumentParser(description='Convert annoying google android my tracks kml data to sensible gpx files') | |
parser.add_argument('input_file') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Script to retrieve magnetic declination data from www.ngdc.noaa.gov | |
# Retrieves specified latitude and longitude ranges (CONUS by default) | |
# and stores them in a cfg style text file | |
# | |
# Usage: Run script with no arguments, it will output declination.cfg | |
# in the current directory | |
# | |
# Tested with Python 3.3.1 | |
# |