How can I split a string into three parts after space and turn the values to doubles?
You're almost there. Strtok returns the first token in the string only. You then have to convert that to a double yourself. You then call strtok again with NULL as the source string to get the next token. And so on.

I have written a good strtok example on here already. Look around, you may find it.