Hi,
swscanf_s function only format the number to string.
to format it,
out = swscanf_s(buffer, _T("%.9f"), &lat);
and you get 9 decimal places, but it is a string, you can not do any math calculations (like 1.123456789 + 1 -> string + int).
To get 9 decimal places in a number, you can do:
double initial = 1.123456789123456789;
double final = floor((1.123456789123456789*1000000000))/1000000000;
and you get final = 1.123456789
notice that you doing this, you will lost precision.