Setting a series of goals can help you measure your progress. Not just the "I want my book published" end goal (if that is your end goal), but a series of goals that will move you along in a stepwise fashion.
This isn't my idea. I got it from Jack M. Bickham, who mentions it in The 38 Most Common Fiction Writing Mistakes (and How to Avoid Them). He recommends using a five-year plan. Start with where you want to be in five years. To achieve that, where will you be in four years? And in three? In two? At this time next year? And then, what can you do this week, even today, to move you forward?
If you set a series of goals, you can make them small, things you can accomplish in a reasonable period of time. How long will it take you to write the first chapter? Or to do research? To figure out how the story weaves together?
By taking things one step at a time, you will be able to measure your progress, even when you feel you aren't getting anywhere. A series of goals helps keep discouragement at bay. And it gives you lots of reasons to celebrate along the way.
What are your writing goals? Over the next five years? For this year? Today?