Integrated auto-upright orientation when near planets