system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: how can a spacecraft calculate its speed in space?

I understand using reference points like the earth or sun but I was thinking about solar sails and travelling to other star systems and I wondered how we would know our speed? Surely using other stars means you wouldn’t be able to get a precise speed reading?
gpt
The answer is, it depends on your reference point. Speed, unlike acceleration, is relative. You can only know the speed of an object when you compare it something. On earth, we measure the speed of an object based on the surface of the earth, or stationary objects. In space, any object you point to is moving at a phenomenal speed, but depending on your frame of reference, only certain ones will appear to be moving, or will appear to be moving at totally different speeds. 

That's the cookie cutter response you'll see here regarding your question, and while it's correct it doesn't really answer you properly. 

You are asking "if a spacecraft, launched from earth and moving to another star, wants to determine it's speed, how would it do so?"

first, depending on it's distance from earth, it could send a signal out and measure the time it took coming back. That would do it. 

Measuring the your speed compared to another stellar body wouldn't work, unless you already knew the speed of that stellar body when compared to earth. 

Another, sneaky method that would work even if you had no reference point, is to simply calculate your speed from the rate of acceleration your ship has. In your question, you talk about a solar sail propelled ship. A ship like that would have largely uniform acceleration, and most changes in acceleration could be accounted for. If you have an acceleration of 1 m/s^2 (or one metre per second increase, every second passed). Using the rate of acceleration, which you know, you can calculate the speed you are currently going.