Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Now the car sends its personal data (encoder speed, estimated fitness, desired pwm, etc.) to CPS that forwards this data to all the cars. If the encoder of a car does not work you can set to 0 the constant USE_ENCODER in "Andrea/src/car_src/const_car.h" and the CPS will estimate the car speed from differentials which is currently not that accurate (See #CPS MEASURED 2D SPEED).
  • Each car listen on a different port (base_port_number + car_number). This was required to make the simulator handle multiple cars and I extended it to the CPS for coherence.

...

There are 4 files which contains basically all the constants in the code. These should be the ones to check whenever you want to configure something.

  • "Andrea/src/car_src/const_car.h": contains the compilation options that activate/deactivate the features of the code in the car and few other constants specific for the car code such as the car number, the initial pwm and when it has to stop.
  • "Andrea/src/sim_src/const_sim.h": this contains very few simulator-specific constants which include the real fitness parameters of the cars, the paths followed by each car and whether to apply the measurement noise during the simulation.
  • "Andrea/src/sim_src/model.c": contains the amplitudes of the noise signals that are applied to the physical quantities by the simulator.
  • "Andrea/src/util/constants.h": this basically contains all the others. They range from network configuration to control parameters to physical constants.

...