Skip to content

Commit

Permalink
fixed ordered Low PassFilter
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam-Belliveau committed Feb 18, 2020
1 parent ae184be commit 229c7a0
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 35 deletions.
102 changes: 70 additions & 32 deletions docs/com/stuypulse/stuylib/network/limelight/Limelight.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
catch(err) {
}
//-->
var data = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9,"i16":9,"i17":9,"i18":9,"i19":9,"i20":9,"i21":9,"i22":9,"i23":9,"i24":9,"i25":9,"i26":9,"i27":9,"i28":9,"i29":9,"i30":9,"i31":9};
var data = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9,"i16":9,"i17":9,"i18":9,"i19":9,"i20":9,"i21":9,"i22":9,"i23":9,"i24":9,"i25":9,"i26":9,"i27":9,"i28":9,"i29":9,"i30":9,"i31":9,"i32":9,"i33":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
Expand Down Expand Up @@ -307,199 +307,209 @@ <h3>Method Summary</h3>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>static double[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCoords()">getCoords</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static double</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCustomDouble(java.lang.String)">getCustomDouble</a></span>&#8203;(java.lang.String&nbsp;element)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i1" class="rowColor">
<tr id="i2" class="altColor">
<td class="colFirst"><code>static double</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCustomRawCrosshairX(int)">getCustomRawCrosshairX</a></span>&#8203;(int&nbsp;crosshair)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i2" class="altColor">
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCustomString(java.lang.String)">getCustomString</a></span>&#8203;(java.lang.String&nbsp;element)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i3" class="rowColor">
<tr id="i4" class="altColor">
<td class="colFirst"><code>static double</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getHorizontalSidelength()">getHorizontalSidelength</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the horizontal sidelength of the rough bounding box (0 - 320 pixels)</div>
</td>
</tr>
<tr id="i4" class="altColor">
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static double</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getLatencyMs()">getLatencyMs</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the latency of limelight information in milli-seconds</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<tr id="i6" class="altColor">
<td class="colFirst"><code>static double</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getLongestSidelength()">getLongestSidelength</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the sidelength of longest side of the fitted bounding box (0 - 320
pixels)</div>
</td>
</tr>
<tr id="i6" class="altColor">
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static double</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPipeline()">getPipeline</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i7" class="rowColor">
<tr id="i8" class="altColor">
<td class="colFirst"><code>static double</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getRawCrosshairY(int)">getRawCrosshairY</a></span>&#8203;(int&nbsp;crosshair)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i8" class="altColor">
<tr id="i9" class="rowColor">
<td class="colFirst"><code>static double</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getRawTargetArea(int)">getRawTargetArea</a></span>&#8203;(int&nbsp;target)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i9" class="rowColor">
<tr id="i10" class="altColor">
<td class="colFirst"><code>static double</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getRawTargetSkew(int)">getRawTargetSkew</a></span>&#8203;(int&nbsp;target)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i10" class="altColor">
<tr id="i11" class="rowColor">
<td class="colFirst"><code>static double</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getRawTargetXAngle(int)">getRawTargetXAngle</a></span>&#8203;(int&nbsp;target)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i11" class="rowColor">
<tr id="i12" class="altColor">
<td class="colFirst"><code>static double</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getRawTargetYAngle(int)">getRawTargetYAngle</a></span>&#8203;(int&nbsp;target)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i12" class="altColor">
<tr id="i13" class="rowColor">
<td class="colFirst"><code>static double</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getShortestSidelength()">getShortestSidelength</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the sidelength of shortest side of the fitted bounding box (0 - 320
pixels)</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<tr id="i14" class="altColor">
<td class="colFirst"><code>static <a href="Solve3DResult.html" title="class in com.stuypulse.stuylib.network.limelight">Solve3DResult</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSolve3D()">getSolve3D</a></span>()</code></th>
<td class="colLast">
<div class="block">Get Solve3D Result from network table</div>
</td>
</tr>
<tr id="i14" class="altColor">
<tr id="i15" class="rowColor">
<td class="colFirst"><code>static double</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getTargetArea()">getTargetArea</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the percent of the screen the target takes up on a scale of 0 to 1</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<tr id="i16" class="altColor">
<td class="colFirst"><code>static double[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getTargetCornerX()">getTargetCornerX</a></span>()</code></th>
<td class="colLast">
<div class="block">Get a number array of corner x-coordinates</div>
</td>
</tr>
<tr id="i16" class="altColor">
<tr id="i17" class="rowColor">
<td class="colFirst"><code>static double</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getTargetCornerX(int)">getTargetCornerX</a></span>&#8203;(int&nbsp;corner)</code></th>
<td class="colLast">
<div class="block">Get the x axis of a corner on the target</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<tr id="i18" class="altColor">
<td class="colFirst"><code>static double[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getTargetCornerY()">getTargetCornerY</a></span>()</code></th>
<td class="colLast">
<div class="block">Get a number array of corner y-coordinates</div>
</td>
</tr>
<tr id="i18" class="altColor">
<tr id="i19" class="rowColor">
<td class="colFirst"><code>static double</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getTargetCornerY(int)">getTargetCornerY</a></span>&#8203;(int&nbsp;corner)</code></th>
<td class="colLast">
<div class="block">Get the x axis of a corner on the target</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<tr id="i20" class="altColor">
<td class="colFirst"><code>static double</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getTargetSkew()">getTargetSkew</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the Skew or rotation (-90 degrees to 0 degrees)</div>
</td>
</tr>
<tr id="i20" class="altColor">
<tr id="i21" class="rowColor">
<td class="colFirst"><code>static double</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getTargetXAngle()">getTargetXAngle</a></span>()</code></th>
<td class="colLast">
<div class="block">Get The Horizontal Offset From Crosshair To Target (-27 degrees to 27
degrees)</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<tr id="i22" class="altColor">
<td class="colFirst"><code>static double</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getTargetYAngle()">getTargetYAngle</a></span>()</code></th>
<td class="colLast">
<div class="block">Get The Vertical Offset From Crosshair To Target (-20.5 degrees to 20.5
degrees)</div>
</td>
</tr>
<tr id="i22" class="altColor">
<tr id="i23" class="rowColor">
<td class="colFirst"><code>static double</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getVerticalSidelength()">getVerticalSidelength</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the vertical sidelength of the rough bounding box (0 - 320 pixels)</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<tr id="i24" class="altColor">
<td class="colFirst"><code>static double[][]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getVertices()">getVertices</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hasValidTarget()">hasValidTarget</a></span>()</code></th>
<td class="colLast">
<div class="block">Get Whether the limelight has any valid targets</div>
</td>
</tr>
<tr id="i24" class="altColor">
<tr id="i26" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isConnected()">isConnected</a></span>()</code></th>
<td class="colLast">
<div class="block">Check if the limelight is connected by using a timing test</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<tr id="i27" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setCameraStream(com.stuypulse.stuylib.network.limelight.Limelight.CameraStream)">setCameraStream</a></span>&#8203;(<a href="Limelight.CameraStream.html" title="enum in com.stuypulse.stuylib.network.limelight">Limelight.CameraStream</a>&nbsp;stream)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i26" class="altColor">
<tr id="i28" class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setCamMode(com.stuypulse.stuylib.network.limelight.Limelight.CamMode)">setCamMode</a></span>&#8203;(<a href="Limelight.CamMode.html" title="enum in com.stuypulse.stuylib.network.limelight">Limelight.CamMode</a>&nbsp;mode)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i27" class="rowColor">
<tr id="i29" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setCustomNumber(java.lang.String,java.lang.Number)">setCustomNumber</a></span>&#8203;(java.lang.String&nbsp;element,
java.lang.Number&nbsp;value)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i28" class="altColor">
<tr id="i30" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setCustomString(java.lang.String,java.lang.String)">setCustomString</a></span>&#8203;(java.lang.String&nbsp;element,
java.lang.String&nbsp;value)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i29" class="rowColor">
<tr id="i31" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setLEDMode(com.stuypulse.stuylib.network.limelight.Limelight.LEDMode)">setLEDMode</a></span>&#8203;(<a href="Limelight.LEDMode.html" title="enum in com.stuypulse.stuylib.network.limelight">Limelight.LEDMode</a>&nbsp;mode)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i30" class="altColor">
<tr id="i32" class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setPipeline(int)">setPipeline</a></span>&#8203;(int&nbsp;pipeline)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i31" class="rowColor">
<tr id="i33" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setSnapshotMode(com.stuypulse.stuylib.network.limelight.Limelight.SnapshotMode)">setSnapshotMode</a></span>&#8203;(<a href="Limelight.SnapshotMode.html" title="enum in com.stuypulse.stuylib.network.limelight">Limelight.SnapshotMode</a>&nbsp;mode)</code></th>
<td class="colLast">&nbsp;</td>
Expand Down Expand Up @@ -912,6 +922,34 @@ <h4>getVerticalSidelength</h4>
</dl>
</li>
</ul>
<a id="getCoords()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCoords</h4>
<pre class="methodSignature">public static&nbsp;double[]&nbsp;getCoords()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Array of Vertices, in the form (x0,y0,x1,y1, ... xN,yN). coordinates
are in pixels, relative to top left corner of limelight feed</dd>
</dl>
</li>
</ul>
<a id="getVertices()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getVertices</h4>
<pre class="methodSignature">public static&nbsp;double[][]&nbsp;getVertices()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Formatted 2D array of coordinates, consisting of an array of X values
and an array of Y values.</dd>
</dl>
</li>
</ul>
<a id="getTargetCornerX()">
<!-- -->
</a>
Expand Down
4 changes: 4 additions & 0 deletions docs/index-all.html
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,8 @@ <h2 class="title">G</h2>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="com/stuypulse/stuylib/network/limelight/Limelight.SnapshotMode.html#getCodeValue()">getCodeValue()</a></span> - Method in enum com.stuypulse.stuylib.network.limelight.<a href="com/stuypulse/stuylib/network/limelight/Limelight.SnapshotMode.html" title="enum in com.stuypulse.stuylib.network.limelight">Limelight.SnapshotMode</a></dt>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="com/stuypulse/stuylib/network/limelight/Limelight.html#getCoords()">getCoords()</a></span> - Static method in class com.stuypulse.stuylib.network.limelight.<a href="com/stuypulse/stuylib/network/limelight/Limelight.html" title="class in com.stuypulse.stuylib.network.limelight">Limelight</a></dt>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="com/stuypulse/stuylib/file/csv/CSVReader.html#getCSVData()">getCSVData()</a></span> - Method in class com.stuypulse.stuylib.file.csv.<a href="com/stuypulse/stuylib/file/csv/CSVReader.html" title="class in com.stuypulse.stuylib.file.csv">CSVReader</a></dt>
<dd>
<div class="block">Get a String Array of the CSV Data</div>
Expand Down Expand Up @@ -992,6 +994,8 @@ <h2 class="title">G</h2>
<dd>
<div class="block">Get the vertical sidelength of the rough bounding box (0 - 320 pixels)</div>
</dd>
<dt><span class="memberNameLink"><a href="com/stuypulse/stuylib/network/limelight/Limelight.html#getVertices()">getVertices()</a></span> - Static method in class com.stuypulse.stuylib.network.limelight.<a href="com/stuypulse/stuylib/network/limelight/Limelight.html" title="class in com.stuypulse.stuylib.network.limelight">Limelight</a></dt>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="com/stuypulse/stuylib/network/limelight/Solve3DResult.html#getX()">getX()</a></span> - Method in class com.stuypulse.stuylib.network.limelight.<a href="com/stuypulse/stuylib/network/limelight/Solve3DResult.html" title="class in com.stuypulse.stuylib.network.limelight">Solve3DResult</a></dt>
<dd>
<div class="block">Get x from Solve3D Result</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/member-search-index.js

Large diffs are not rendered by default.

Binary file modified docs/member-search-index.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/overview-summary.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (11.0.6) on Mon Feb 17 12:54:29 EST 2020 -->
<!-- Generated by javadoc (11.0.6) on Tue Feb 18 13:08:52 EST 2020 -->
<title>StuyLib 1.0.0 API</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript">window.location.replace('index.html')</script>
Expand Down
Binary file modified docs/package-search-index.zip
Binary file not shown.
Binary file modified docs/type-search-index.zip
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public OrderedLowPassFilter(double rc, int order) throws ConstructionError {

IStreamFilter[] filters = new IStreamFilter[order];
for(int i = 0; i < filters.length; ++i) {
filters[i] = new LowPassFilter(rc / order);
filters[i] = new LowPassFilter(rc / Math.sqrt(order));
}

mFilter = new IStreamFilterGroup(filters);
Expand Down

0 comments on commit 229c7a0

Please sign in to comment.