summaryrefslogtreecommitdiff
path: root/n
diff options
context:
space:
mode:
Diffstat (limited to 'n')
-rw-r--r--n/asserv/src/asserv/models.host.c6
-rw-r--r--n/asserv/src/asserv/simu.host.c8
2 files changed, 7 insertions, 7 deletions
diff --git a/n/asserv/src/asserv/models.host.c b/n/asserv/src/asserv/models.host.c
index f978cb6..976edd3 100644
--- a/n/asserv/src/asserv/models.host.c
+++ b/n/asserv/src/asserv/models.host.c
@@ -32,7 +32,7 @@
static const struct motor_t gloubi_model =
{
/* Motor caracteristics. */
- 407 * M_2_PI / 60, /* Speed constant ((rad/s)/V). */
+ 407 * (2*M_PI) / 60,/* Speed constant ((rad/s)/V). */
23.4 / 1000, /* Torque constant (N.m/A). */
0, /* Bearing friction (N.m/(rad/s)). */
2.18, /* Terminal resistance (Ohm). */
@@ -65,7 +65,7 @@ static const struct robot_t gloubi_robot =
static const struct motor_t taz_model =
{
/* Motor caracteristics. */
- 407 * M_2_PI / 60, /* Speed constant ((rad/s)/V). */
+ 407 * (2*M_PI) / 60,/* Speed constant ((rad/s)/V). */
23.4 / 1000, /* Torque constant (N.m/A). */
0, /* Bearing friction (N.m/(rad/s)). */
2.18, /* Terminal resistance (Ohm). */
@@ -98,7 +98,7 @@ static const struct robot_t taz_robot =
static const struct motor_t tazg_model =
{
/* Motor caracteristics. */
- 407 * M_2_PI / 60, /* Speed constant ((rad/s)/V). */
+ 407 * (2*M_PI) / 60,/* Speed constant ((rad/s)/V). */
40.2 / 1000, /* Torque constant (N.m/A). */
0, /* Bearing friction (N.m/(rad/s)). */
2.32, /* Terminal resistance (Ohm). */
diff --git a/n/asserv/src/asserv/simu.host.c b/n/asserv/src/asserv/simu.host.c
index bb204c1..adf5b34 100644
--- a/n/asserv/src/asserv/simu.host.c
+++ b/n/asserv/src/asserv/simu.host.c
@@ -218,11 +218,11 @@ simu_step (void)
motor_model_step (&simu_left_model);
motor_model_step (&simu_right_model);
/* Modify counters. */
- counter_left_diff = (simu_left_model.th - old_left_th) / M_2_PI * 500 *
- simu_left_model.i_G;
+ counter_left_diff = (simu_left_model.th - old_left_th) / (2*M_PI)
+ * 500 * simu_left_model.i_G;
counter_left += counter_left_diff;
- counter_right_diff = (simu_right_model.th - old_right_th) / M_2_PI * 500 *
- simu_right_model.i_G;
+ counter_right_diff = (simu_right_model.th - old_right_th) / (2*M_PI)
+ * 500 * simu_right_model.i_G;
counter_right += counter_right_diff;
/* Update position */
simu_pos_update ((simu_left_model.th - old_left_th)