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
# Copyright (c) 2016, James Jackson | |
# All rights reserved. | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are met: | |
# 1. Redistributions of source code must retain the above copyright notice, this | |
# list of conditions and the following disclaimer. | |
# 2. Redistributions in binary form must reproduce the above copyright notice, | |
# this list of conditions and the following disclaimer in the documentation |
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 | |
import matplotlib.pyplot as plt | |
from math import sin, pi, asin, tan, atan | |
def f(x): | |
return ((1.0 - pow(x / 101325.0, 0.190284)) * 145366.45) * 0.3048 | |
def finv(x): | |
return 101325.0 * (1 - 2.25577 * 10 ** -5 * x) ** 5.25588 |
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
<keymap version="1" name="James" parent="$default"> | |
<action id="ActivateRunToolWindow"> | |
<keyboard-shortcut first-keystroke="alt 4" /> | |
<keyboard-shortcut first-keystroke="ctrl r" /> | |
</action> | |
<action id="CheckinProject" /> | |
<action id="CloseContent"> | |
<keyboard-shortcut first-keystroke="ctrl w" /> | |
</action> | |
<action id="CollapseAll"> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<style-scheme version="1.0" name="Acai"> | |
<style name="Text" foreground="#ffffff" background="#2d2d2d"/> | |
<style name="Link" foreground="#0055ff"/> | |
<style name="Selection" foreground="#000000" background="#aaaaaa"/> | |
<style name="LineNumber" foreground="#888888" background="#232323"/> | |
<style name="SearchResult" background="#9e004f"/> | |
<style name="SearchScope" background="#550000"/> | |
<style name="Parentheses" foreground="#55ff55"/> | |
<style name="ParenthesesMismatch" background="#ff00ff"/> |
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 re | |
f = open('/home/ultron/Code/ROSflight/src/param.c') | |
text = f.read() | |
lines = re.split("\n+", text) | |
params = [] | |
i = 0 |
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
def lqr(A,B,Q,R): | |
#first, try to solve the ricatti equation | |
X = np.matrix(solve_continuous_are(A, B, Q, R)) | |
#compute the LQR gain | |
K = np.matrix(inv(R)*(B.T*X)) | |
eigVals, eigVecs = eig(A-B*K) | |
return K, X, eigVals |
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
# This is an implementation of Occupancy Grid Mapping as Presented | |
# in Chapter 9 of "Probabilistic Robotics" By Sebastian Thrun et al. | |
# In particular, this is an implementation of Table 9.1 and 9.2 | |
import scipy.io | |
import scipy.stats | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from tqdm import tqdm |
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 matplotlib.pyplot as plt | |
from matplotlib.patches import Ellipse | |
import numpy as np | |
def plot_point_cov(points, nstd=2, ax=None, **kwargs): | |
""" | |
Plots an `nstd` sigma ellipse based on the mean and covariance of a point | |
"cloud" (points, an Nx2 array). | |
Parameters |
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 | |
import scipy.linalg | |
import scipy.stats | |
import matplotlib.pyplot as plt | |
import scipy.io | |
import scipy.sparse | |
from plot_helper import plot_cov_ellipse | |
from tqdm import tqdm | |
def R(theta): |
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
from tensorflow.python.ops.rnn_cell import RNNCell | |
from tensorflow.python.ops import math_ops | |
import tensorflow as tf | |
class myGRU(RNNCell): | |
def __init__(self, num_units, forget_bias=1.0, | |
state_is_tuple=True, activation=None, reuse=None): | |
super(RNNCell, self).__init__(_reuse=reuse) | |
self._num_units = num_units | |
self._forget_bias = forget_bias |
OlderNewer