ptd_set additions, refactored set_reference_sat_and_prns, identified bug in old version