Skip to content
Snippets Groups Projects
Commit 7971ae19 authored by Lionel GUEZ's avatar Lionel GUEZ
Browse files

Rename variable `lat_for_conv` to latitude

parent ec21ffbc
No related branches found
No related tags found
No related merge requests found
......@@ -183,8 +183,8 @@ for edge in g.edges():
source_node = edge.source()
target_node = edge.target()
lat_for_conv = math.radians((g.vp.pos_last[source_node][1] +
g.vp.pos_first[target_node][1]) / 2)
latitude = math.radians((g.vp.pos_last[source_node][1] +
g.vp.pos_first[target_node][1]) / 2)
# (latitude needed for conversion of degrees to kilometers)
# Because of the wrapping issue (360° wrapping incorrectly to 0°),
......@@ -193,7 +193,7 @@ for edge in g.edges():
- g.vp.pos_first[target_node][0])
if lon_diff > 300: lon_diff = 360 - lon_diff
Delta_Cent = math.sqrt((lon_diff * 111.32 * math.cos(lat_for_conv))**2
Delta_Cent = math.sqrt((lon_diff * 111.32 * math.cos(latitude))**2
+ ((g.vp.pos_last[source_node][1]
- g.vp.pos_first[target_node][1]) * 110.574)**2)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment