Functions in orientation.h