To solve the problem, [Alan] built up a quick automatic leveling circuit (YouTube link ... and automatic gain control circuits have been passed around the internet for years.