Why does the ant need to know its heading?
I would suggest all it needs to know is what to do when it encounters a particular marker, based on goal (heading to food, heading to nest) and maybe some time history. So its movements would be relative to its existing motion, with changes (keep going, bear left, bear right, go back) based on the marker [or a limited history] and what it is trying to do (e.g. the responses for an ant heading to food from the nest would differ from the responses of an ant carrying food to the nest).
Would an ant be able to make sense of colocated markers (for example, respond differently to A on top of B versus B on top of A versus A only versus B only)?