guess_orientation function

Guess the orientation from model formula