modify GPSfunction by yokozawa