What values do latDiff & lonDiff have. Since they're integers, you're using integer division and apparently getting zero. Try casting them to float when you do the division.
What values do latDiff & lonDiff have. Since they're integers, you're using integer division and apparently getting zero. Try casting them to float when you do the division.