Read each byte as it comes in and build it up.
Identify the X or Y so you know what you are reading.
Convert the ascii to a digit :-
if(inValue > &0x2f & inValue< 0x3a) digit = inValue & 0x0f;
and accumulate the number, that is:-
number = (number * 10) + digit;
when you hit the point this becomes:-
number = number + digit/place; place++;
on a space or any non number you have completed the input of the number.
Or you could search to see when you can get code that does this for you.