I kinda sorta used a similar method for processing TLEs and naming satellites.
https://github.com/dmead/skyfind