If you own a Samsung Galaxy S it may be possible that you have an early batch release with issues with the GPS. Evidence of this problem is seen when you run Google Maps and the software will never be able to pinpoint your location. You can also try installing Foursquare
Here’s how to fix it.
Go to Settings->Location and Security-> Enable “Use GPS Satellites” and disable “Use wireless networks”.
Go to Dialer and dial *#*#1472365#*#* —–> This will open up a new menu that control a lot of the stuff that regular users should not fiddle around with. But now you should.
Under “Application settings” Change “Operation Mode” to MS Based
Under SUPL/CP Settings” enter supl.google.com port 7276
After doing this, I was able to get my GPS running with WiFi turned on. However it also automatically connected using 3.5G. To disable this you can create a new bogus connection under Mobile Network Settings –> Access Point Names (you can name this anything you want with bogus settings). But I would prefer that you perform a hard reset on the device. Don’t forget to back up your phone!