Ptolomeo, astronomía ancestral