save orientation to a global thread-safe struct