Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / Your task is to design the Control Logic Module

Your task is to design the Control Logic Module

Electrical Engineering

Your task is to design the Control Logic Module. Below is the level 1 interfacing for this module. Module Control Logic Module Input Guide input. Reflected in the variable angleData: integer value between -4 and +4. Radar input. Reflected in the variable radarData: integer value within {0, 2, 6, 14). Velocity input. Reflected in the variable velocityData: integer value between 0 and 7. Lap change input. Reflected in the variable lapChangeData: 0 or 1. Damage input. Reflected in the variable damageData: 0 or 1. Output Turning command. Reflected in the variable turnVal: integer value between -3 and +3. Acc./Brake command. Reflected in variable accVal: integer value between -2 and +2. Gear up/down command. Reflected in variable gearChangeData: integer between -2 and +1 Functionality Each Control Logic Module have internal variables angleData, radarData, velocityData, lapChangeData, damageData, turnVal, accVal, gearChangeData. ProcessData() function is called by Interface Module. ProcessData() should encode Control Logic, deciding what the car should do based on input data contained in variables angleData, radarData, velocityData, lapChangeData, damageData. ProcessData() should write commands by writing values into variables turnVal, accVal, and gearChangeData. The figure below illustrates how the Interface Module will interact with each student Control Logic Module: class Car { old velFromSim ToCar(int v) { old angleFromSimToCar(int a) { velocityData = v; angleData = a; void damageFromSimToCar(int d) { void radarFromSimToCar(int r) { damageData = d; radarData = r; INTERFACE MODULE oid lapFromSimToCar( lapChangeData = lapd; Send Guide & Radar info // ## STUDENTS WORK BELOW THIS LINE #N# void processData() { CONTROL LOGIC CODE Execute Control Logic //student code to process unput data (/student issue commands in variables"turnVal", "accVal", "gearChangeData" Get Commands // ## STUDENTS WORK ABOVE THIS LINE ### nt turnCommandFromCarToSim() int gearCommandFromCarToSim) { return turnVal; 3 return gearChangeData; int accBreakCommandFromCarToSim() { return accVal; 2.2. Level 2 Design of Control Logic Module Your task is to design the Control Logic Module for your Virtual Car. In a few words, you need to program a logic that autonomously decides which TURNING, ACCELERATION/BRAKE, or GEAR CHANGE commands to send to the computer based on the incoming information: GUIDE, RADAR, VELOCITY, DAMAGE, and LAP CHANGE. For that, it is important to have more details of the input signals that you will receive in the variables angleData, radarData, velocityData, damageData, and lapChangeData.

 

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE