The first thing that jumps out to me is that you set startLocation
to nil
after you tell the location manager to start giving you updates.
Depending on how startLocation
is defined/initialized/reused, it might not contain the initial value you expect it to.