change pilot-long&lat, add missing local vars! code cleanup