View Single Post
  #5   Spotlight this post!  
Unread 16-05-2013, 23:16
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: paper: FRC #33 The Killer Bees 2013 Software - BuzzXVIII (Buzz18)

Added file buzz_lib_sw_2013.zip (BuzzLib 2013)

New functionality from last year:
-Simple Vref Diagnostics - Used with shorting jumper on adc7 (between 5v and analog pin), used to diagnose simple faults of 5v rail and provide ratiometric multiplier for ratiometric sensors.
-Sharp IR - Scaling blocks for all three Sharp IR sensors sold by Sparkfun. Analog to cm values copied directly from datasheet and interpolated using multipoint linear interpolator (see below)
-2d interpolation - Interpolates a 2d curve from a prelookup and 1d array of Z points. Also variants to round down and round up to nearest Z point.
-3d interpolation - Interpolates a 3d map from two prelookups and a 2d array of Z points.
-Prelookup - Finds the index and fractional index from a x input and 1d array of X breakpoints. All breakpoints must be spaced least->greatest, there is no checking of this. Used for 2d and 3d interpolation, as it is the most computationally intense step a single prelookup can be shared by multiple interpolations who share the same axis breakpoints.
-Accel calculator - Calculates the acceleration of a velocity assuming 10ms iteration time. Really just finds current derivative, but used for acceleration of shooter wheel speed.
-Hysteresis - Threshold with hysteresis.


The 2d and 3d interpolation tables are the most interesting. For an example of their use, see the Sharp IR blocks in BuzzLib, as they do 2d interpolation in the most basic form.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
Reply With Quote