#include <vector>
#include "pslot.hh"
-#define CAR_CURB_TO_CURB 11.031078891255458
-#define CAR_WIDTH 1.771
+// Car dimensions taken from www.car.info
+
+//// Opel Corsa
+//#define SLOT_START_WIDTH_MULTIPLIER 2.0
+//#define CAR_CURB_TO_CURB 9.900
+//#define CAR_FRONT_TRACK 1.320
+//#define CAR_WIDTH 1.532 // 1.944 // with mirrors
+//#define CAR_WHEELBASE 2.343
+//#define CAR_DISTANCE_FROM_REAR_AXLE_TO_FRONT 3.212
+//#define CAR_LENGTH 3.622
+
+//// Wolkswagen transporter
+//#define SLOT_START_WIDTH_MULTIPLIER 12.4
+//#define CAR_CURB_TO_CURB 13.200
+//#define CAR_FRONT_TRACK 1.904
+//#define CAR_WIDTH 1.994 // 2.297 // with mirrors
+//#define CAR_WHEELBASE 3.400
+//#define CAR_DISTANCE_FROM_REAR_AXLE_TO_FRONT 4.308
+//#define CAR_LENGTH 5.500
+
+//// Mercedes-Benz AMG GT
+//#define SLOT_START_WIDTH_MULTIPLIER 9.8
+//#define CAR_CURB_TO_CURB 11.470
+//#define CAR_FRONT_TRACK 1.678
+//#define CAR_WIDTH 1.939 // 2.075 // with mirrors
+//#define CAR_WHEELBASE 2.630
+//#define CAR_DISTANCE_FROM_REAR_AXLE_TO_FRONT 3.528
+//#define CAR_LENGTH 4.544
+
+// Renault ZOE (vorobieva, computed ctc)
+#define SLOT_START_WIDTH_MULTIPLIER 4.5
+#define CAR_CURB_TO_CURB 10.802166641822163
+#define CAR_FRONT_TRACK 1.511
+#define CAR_WIDTH 1.771 // 1.945 // with mirrors
#define CAR_WHEELBASE 2.588
#define CAR_DISTANCE_FROM_REAR_AXLE_TO_FRONT 3.427
#define CAR_LENGTH 4.084
-#define SLOT_MAX_WIDTH 2.2
#define SLOT_STEP_LENGTH 0.01
#define SLOT_STEP_WIDTH 0.01
+#define SLOT_MAX_WIDTH (CAR_WIDTH + (SLOT_START_WIDTH_MULTIPLIER + 40) * SLOT_STEP_WIDTH)
#define PARKING_SPEED -0.001
#define DELTA_ANGLE_TO_SLOT 0.0001
bcar::BicycleCar c;
c.ctc(CAR_CURB_TO_CURB);
+ c.ft(CAR_FRONT_TRACK);
c.w(CAR_WIDTH);
c.wb(CAR_WHEELBASE);
c.df(CAR_DISTANCE_FROM_REAR_AXLE_TO_FRONT);
bcar::Point zp(0.0, 0.0);
double zh = 0.0;
- double w = c.w() + 4.5 * SLOT_STEP_WIDTH;
+ double w = c.w() + SLOT_START_WIDTH_MULTIPLIER * SLOT_STEP_WIDTH;
while (w < SLOT_MAX_WIDTH) {
double len = c.len() + SLOT_STEP_LENGTH;