Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 2:1b02b22417bd, committed 2016-04-18
- Comitter:
- mikeb
- Date:
- Mon Apr 18 18:51:16 2016 +0000
- Parent:
- 1:4fceb43e2dd3
- Child:
- 3:fdefe922ce38
- Commit message:
- Needs filter. Needs further testing. High accuracy version.
Changed in this revision
| AoA_Est.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/AoA_Est.h Mon Apr 18 18:43:15 2016 +0000
+++ b/AoA_Est.h Mon Apr 18 18:51:16 2016 +0000
@@ -110,12 +110,12 @@
bool flag = false;
confidence = 0;
for (short i = 1; i <= ITERATIONS; i++) {
- if (abs(angle - ambigAngles[0][i]) < 30) {
+ if (abs(angle - ambigAngles[0][i]) < abs(angle-ambigAngles[1][i]) && abs(angle-ambigAngles[0][i]) < 30) {
angle = ambigAngles[0][i];
avg += ambigAngles[0][i];
confidence++;
}
- else if (abs(angle - ambigAngles[1][i]) < 30) {
+ else if (abs(angle - ambigAngles[1][i]) < abs(angle-ambigAngles[0][i]) && abs(angle - ambigAngles[1][i]) < 30) {
angle = ambigAngles[1][i];
avg += ambigAngles[1][i];
confidence++;