Closed Escape9002 closed 2 years ago
https://www.youtube.com/watch?v=x33U7kiEkgQ&list=TLPQMDIxMjIwMjFG0AMt9kP6kg&index=1
got help here dont we?
Distanz wurde gemessen, bei Verwendung eines anderen Sensors lieferte die Integrale Formel korrekte Werte bei falsche Skalierung.
Formeln:
Gleich. Beschl. :
t = (freq / 1000); //hz is not time but frequenzy distance = (distance) + /*(velocity * t) +*/ (acc * (t * t) * 0.5); velocity = acc * t;
Integral:
t = (freq / 1000); // hz to time velocity = t * ((acc + accOld) / 2) + velocity; accOld = acc; distance = t * ((velocity + velocityOld) / 2) + distance; velocityOld = velocity;
Getestet : 30cm fahren
Gleich. Beschl. : 0.30 (+-0.05) Integral : 30 (+- 15)
Fehler der Rechnungen bei Stillstand sind typisch.
0,0000025 ist schon an sich am rand der nachkommastellen (7 von 7) bei float. da 2 mal anwendung nötig == kaputt. ansonsten fehler werte erwartbar und filter die jegliches signal schlucken ^^ FUCKKK