Ok, this is a bug in mySQL. It cost me a full day of work.
Basically you are NOT ALLOWED to use same names as columns for your variables, even the capitalization is different. So, instead of
DECLARE latitude DECIMAL(9,6) DEFAULT 0;
you should have
DECLARE var_latitude DECIMAL(9,6) DEFAULT 0;
Nicely done Oracle, this is a very old bug i got this from a 2007 bug report. I wouldn't mind if they bother to spit out some warning.
Hope this will help others when they find a similar situation.