from haversine import haversine
x = 55.880707
y = 37.55513
l = 0
r = min(180, 90-y)
required_dist = 1
while r-l > 1e-10:
m=(r+l)/2
dist = haversine((x,y),(x,y+m))/1000
if dist > required_dist:
r = m
else:
l = m
step = l
from haversine import haversine
x = 55.880707
y = 37.55513
l = 0
r = min(180, 90-y)
required_dist = 1
while r-l < 1e-10:
m=(r+l)/2
dist = haversine((x,y),(x,y+m))
if dist > required_dist:
r = m
else:
l = m
step = l
body = self.driver.find_element_by_tag_name("body")
body.send_keys(Keys.CONTROL + Keys.SHIFT + 'm')