Determination of a driving style as input when Adaptive cruise control system is turned to on?

3 views (last 30 days)
I am trying to implement an algo where I need to ouput a particular driving style as an input to one of my state machine states.
For that the car is in a manual mode initially and I compute the relative velocity of my car wrt to a predetermined velocity. Then I output a particular value of driving style. However my state machine control state should take this driving style value when car is in ACC mode i.e from manual to automatic.
How can it be so that I take driving style value only when ACC is on ?

Answers (1)

TAB
TAB on 12 Dec 2012
In your state machine create a local data of same type as driving_style_value input.
In your code
if CAR_IN_ACC_MODE
driving_style_value_local = driving_style_value;
else
driving_style_value_local = Whatever you want.
Use driving_style_value_local for further processing.

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!