m b
/
AoA_estimator
Part of a program that estimates the direction of arrival of a signal
Revision 15:29805fab7655, committed 2016-04-28
- Comitter:
- mikeb
- Date:
- Thu Apr 28 17:25:34 2016 +0000
- Parent:
- 14:8865ec38bdc8
- Commit message:
- Fixed Documentation;
Changed in this revision
AoA_Est.h | Show annotated file Show diff for this revision Revisions of this file |
Phase_Finder.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 8865ec38bdc8 -r 29805fab7655 AoA_Est.h --- a/AoA_Est.h Thu Apr 28 17:20:41 2016 +0000 +++ b/AoA_Est.h Thu Apr 28 17:25:34 2016 +0000 @@ -37,10 +37,10 @@ AoA_Est(int numOfSensors, int xPassed[], int yPassed[], float freq); /** Estimate the angle to the sound source * - * @param phases[] Array of phases, first phase is the master. Must correspond to order of X and Y coordinates. + * @param phases[] Array of phases, first phase is the master. Must correspond to order of X and Y coordinates. All sensors must be within 1/2 wavelength of eachother. Will not work otherwise. * @param amp[] Amplitudes. Not currently used. Repeat the phase array here to prevent errors. * @param yPassed[] Y coordinates of every sensor EXCEPT the master - * @return angle relative to X axis + * @return Angle relative to X axis */ float estimate(float phases[], float amp[]); /** Not Used @@ -48,7 +48,7 @@ bool calibrate(); /** Confidence level of the output * - * @return number corresponding to the number of angle determinations used in the average + * @return Float corresponding to the number of angle determinations used in the average */ int confidence;
diff -r 8865ec38bdc8 -r 29805fab7655 Phase_Finder.h --- a/Phase_Finder.h Thu Apr 28 17:20:41 2016 +0000 +++ b/Phase_Finder.h Thu Apr 28 17:25:34 2016 +0000 @@ -12,7 +12,7 @@ float reference[307] = {...}; float phase = 0; Phase_Finder phase(50000, 900, reference); - phase - phase.estimate(signal, 251); + phase = phase.estimate(signal, 251); * } * @endcode */ @@ -31,6 +31,7 @@ * * @param samples[] Input samples * @param leng Length of input sample array + * @return Float of the phase in degrees */ float estimate(float samples[], int leng);