Revert "Use standard formula for calculating hwrotation"

This reverts commit c957c046e42f6c13bcce9ce18df5076a8a4ee79f.