I'm having problems with my query below. Basically I need to calculate the feet between two gps coordinates.

Basically once I can get this formula completed instead of manually entering the data I'll use a temp table and then select the top 2 rows and then delete these and keep looping through until everything has been calculated but this gps thing is driving me nutz!

Please help.

```
declare @pi int
declare @D2R int
declare @dLon int
declare @x int
declare @y int
declare @lat1 int
declare @lat2 int
declare @lon1 int
declare @lon2 int
set @lat2 = 28.089375
set @lat1 = 28.0892416666667
set @lon1 = -81.9935083333333
set @lon2 = -81.9935933333333
set @pi = 3.14159265358979
set @D2R = @pi / 180
set @lat1 = @D2R * @lat1
set @lat2 = @D2R * @lat2
set @dLon = @D2R * (@lon2 - @lon1)
set @x = Sin(@lat1) * Sin(@lat2) + Cos(@lat1) * Cos(@lat2) * Cos(@dLon)
set @y = Sqrt((Cos(@lat2) * Sin(@dLon)) ^ 2 + (Cos(@lat1) * Sin(@lat2) - Sin(@lat1) * Cos(@lat2) * Cos(@dLon)) ^ 2)
--set @go = atan(@x * @y)
print @x
print @y
print @go
```