How to compute a star's space velocity