When programming in multiaxis (4+) situations, it is always easier to program from a central point. Meaning, the intersecting point of all axis datums.
For example, we program a setup on a 4th axis tombstone where there is only one offset, that offset is the central point of the rotary axis, the central point of the z axis and the central point of the x and y axis. Programming this way allows us to simultaniously machine 4 different parts at the same time, all with multiple compound angles that can not be done in less than 3 operations on a 3 axis. Or for example a set of parts that requires two pieces and each needs an op1 and op2, meaning 4 setups would normally be required to make them. This way, I set the machine up one time, on one offset, and it makes all 4 parts all day long until we have enough. It stops every 2 hours to allow us to remove complete parts, rotate ops1 to ops2, and put in new raw stock.
All this also has to be programmed with backlash, meaning that before going to any rotary position point, the rotary axis stops, or goes to -30* prior to that position in the offset. This ensures that it goes to exact position, as opposed to just directly going to that position from any direction.