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.
Dependencies: mbed-rtos mbed QEI BNO055 MPU6050_DMP_Nucleo-I2Cdev virgo3_imuHandler MAX17048 Servo MODSERIAL
Fork of Orion_PCB_test_Faulhaber_gear_ratio41_waypoint_cmd by
Diff: 02_Localization/localization.cpp
- Revision:
- 16:9a227791998a
- Parent:
- 11:49344285c82a
--- a/02_Localization/localization.cpp Tue May 03 05:36:33 2016 +0000 +++ b/02_Localization/localization.cpp Mon May 16 08:49:34 2016 +0000 @@ -1,6 +1,6 @@ #include "localization.h" -localization::localization() +Localization::Localization() { wheelDia = wheel_dia; trackWidth = track_width; @@ -11,7 +11,7 @@ } } -void localization::updatePosition(float heading, float wheel_revolutions[2]) +void Localization::updatePosition(float heading, float wheel_revolutions[2]) { incrementalDistance = M_PI * wheelDia * ( (wheel_revolutions[0] - prevRevolutions[0]) + (wheel_revolutions[1] - prevRevolutions[1]) ) / 2.0; @@ -22,7 +22,7 @@ prevRevolutions[1] = wheel_revolutions[1]; } -void localization::setPosition(float position_in[2]) //[x,y] position +void Localization::setPosition(float position_in[2]) //[x,y] position { position[0] = position_in[0]; position[1] = position_in[1];