Set gravity mag+dir in code not using a macro