\subsection{Shared Controller}\label{classsharedcontrol}

A new class, \textit{SharedControl}, has been added as a friend of the main wheelchair application class, \textit{CWheelchairApp}. If the \textquoteleft{Shared Control}' check-box is checked in the GUI, an instance of this class is created by \textit{CWheelchairApp} and sensor data is passed to the shared control object, which parses the message string and retrieves the velocity of the wheelchair from the GroundTruth sensor and range data from the sonar and IR sensors. The shared control routines are then called as described in \hyperref[strategy]{Chapter 4}.