Fix bearings on road info, and German words for those
This commit is contained in:
parent
dd72ed791f
commit
251be4a699
|
@ -18,14 +18,16 @@ round_speed = partial(round_to, multiples=0.1)
|
|||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
def get_bearing(a, b):
|
||||
|
||||
def get_bearing(b, a):
|
||||
# longitude, latitude
|
||||
dL = b[0] - a[0]
|
||||
X = numpy.cos(b[1]) * numpy.sin(dL)
|
||||
Y = numpy.cos(a[1]) * numpy.sin(b[1]) - numpy.sin(a[1]) * numpy.cos(
|
||||
b[1]
|
||||
) * numpy.cos(dL)
|
||||
return numpy.arctan2(X, Y)
|
||||
return numpy.arctan2(Y, X) + 0.5 * math.pi
|
||||
|
||||
|
||||
# Bins for histogram on overtaker distances. 0, 0.25, ... 2.25, infinity
|
||||
DISTANCE_BINS = numpy.arange(0, 2.5, 0.25).tolist() + [float('inf')]
|
||||
|
|
|
@ -204,14 +204,14 @@ MapPage:
|
|||
|
||||
cardinalDirections:
|
||||
unknown: unbekannt
|
||||
north: nordwärts
|
||||
northEast: nordostwärts
|
||||
east: ostwärts
|
||||
southEast: südostwärts
|
||||
south: südwärts
|
||||
southWest: südwestwärts
|
||||
west: westwärts
|
||||
northWest: nordwestwärts
|
||||
north: Norden
|
||||
northEast: Nordosten
|
||||
east: Osten
|
||||
southEast: Südosten
|
||||
south: Süden
|
||||
southWest: Südwesten
|
||||
west: Westen
|
||||
northWest: Nordwesten
|
||||
|
||||
regionInfo:
|
||||
unnamedRegion: Unbenannte Region
|
||||
|
|
Loading…
Reference in a new issue