I'm parsing a file and trying to decode coordinates to the right unit. What happens is that this code is evaluated to 0. If I type it into gdb the result is correct.
int pLat = (int)(
(argv[6].data() == "plus" ? 1 : -1)
* ( atoi(argv[7].data())
+ atoi(argv[8].data()) / 60.
+ atoi(argv[9].data()) / 36000.)
* 2.145767 * 0.0001);
I'm doing a (degrees, minutes, tenth seconds) conversion to wgs. Is there something wrong with this code?