search for: lon_diff

Displaying 1 result from an estimated 1 matches for "lon_diff".

2011 Jan 20
1
Generating time progressing line for Google Earth
...Long, lat2 = end_point.Lat, lon2 = end_point.Long) distance_slice = full_distance / numberOfIntervals for(i in 1 : numberOfIntervals) { distance = i * distance_slice ang_dist = distance / 6371.0 lon_1 = Radians(start_point.Long); lat_1 = Radians(start_point.Lat); lat_2 = Radians(end_point.Lat); lon_diff = Radians(end_point.Long - start_point.Long); # First calculate the bearing bearing = atan2( sin(lon_diff) * cos(lat_2), (cos(lat_1) * sin(lat_2)) - (sin(lat_1) * cos(lat_2) * cos(lon_diff)) ); # Then use the bearing and the start point to find the destination new_lat_rad = asin(sin(lat_1) * cos...