Question: the program is C this activity 3 below Write a as a a . function that takes inputs robot location and terrain Map The Map


the program is C
this activity 3 below 
Write a as a a . function that takes inputs robot location and terrain Map The Map is a grid like the one from activity 3 and each cell has a number associated with a terrain type (0-asphalt, 1-grass, 2-sand). Your function should return a string associated to the gait to be employed by the robot e.g., slow, medium, fast. void getGait(int x, int y, int *terrainMap, char* gaitSpeed) "Write a second function getLocalTerrain, which takes as inputs the current x,y robot location and the terrain map. The function should return the predominant terrain surrounding the robot. That is you need to look at all neighboring cells (N,S,E,W when applicable) and select the terrain that shows up the most. If there are ties, choose the worst terrain type. int getLocalTerrain(int x, int y, int *terrainMap) Write a as a a . function that takes inputs robot location and terrain Map The Map is a grid like the one from activity 3 and each cell has a number associated with a terrain type (0-asphalt, 1-grass, 2-sand). Your function should return a string associated to the gait to be employed by the robot e.g., slow, medium, fast. void getGait(int x, int y, int *terrainMap, char* gaitSpeed) "Write a second function getLocalTerrain, which takes as inputs the current x,y robot location and the terrain map. The function should return the predominant terrain surrounding the robot. That is you need to look at all neighboring cells (N,S,E,W when applicable) and select the terrain that shows up the most. If there are ties, choose the worst terrain type. int getLocalTerrain(int x, int y, int *terrainMap)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
