I've got one lying in my parts box for about 40 years and never got to use it.
Old joysticks were analog, so if you can find one in the thrift store with a 15-pin sub-D connector, you know you've got the one you need.
Or, you could just buy a new one, there's a lot of them.
And since it's an analog signal you will be measuring, you'll also need two A/D convertors too.