Setting reference coordinate frame