Skip to content

SteeringController

andyp13 edited this page Sep 26, 2016 · 3 revisions

#SteeringController The Class that manages steering. This Class will use a lot of other classes to get the desired steering angle.

##Methods ###headingChange Description: Takes a number and will change the heading based on the number. If the number is larger that what is straight then it will add to the heading. If it is smaller it will subtract.

Inputs:

Name Type Description
steeringCommand int Changes which which way to change the heading

Outputs: This code will change wantedHeading to the wanted new heading.

###change Description: This will return a number that can move a servo into the correct position. Output: int -> A number used to change a steering servo.

###getWantedHeading Description: Will return the current wantedHeading in the correct format. Output: double -> This is the wanted heading in degree format.

###checkHeading Description: A private method that is used to check the heading has not gone out of bounds. If it has it will convert it to the correct heading.

##Variables

Name Type View Description
lastSteeringCommand long Private Keeps track of the last command that was sent
wantedHeading double Private This is the desired heading of the user
currentHeading double Private The current heading of the vehicle

Clone this wiki locally