Trial and error no doubt. I can’t imagine conducting a “scientific” experiment that would take numerous years to figure out. I was going to say “I hope they used sticks or something” - but over the course of a year the sticks would have blown away, been damaged, etc. So I suppose they did use large rocks or something.
Interesting that there are 13 towers. 12 spaces (months!?) between each tower.
Maybe all they did was have a few large rocks near the ends of the sun’s travel and noted where it stopped, and then divided the time up accordingly? With another special rock when the sun was at its highest point??
As mentioned there's 13 towers but 14 sun positions because they use both outside positions, right and left. And of course the sun goes back and forth, so it takes about 13 days to get to each position (365/28=13).