Controller for a helicopter