I remember we had a star tracking device come to us via some donation source for a prototype satellite build when I was in college. About as big as my fist, from memory.
Unfortunately, it was Russian and the only documentation accompanying it was one page, in Russian.
But there are certainly CotS parts that you can buy to provide a star-tracked location data source.
The SR-71 Blackbird used a navigation system that incorporated both methods (inertia and star-watching).[1]
[0]: https://en.wikipedia.org/wiki/Celestial_navigation
[1]: https://timeandnavigation.si.edu/multimedia-asset/nortronics...