Commit 89803821 authored by Fabian Kovac's avatar Fabian Kovac
Browse files

[i] wording (wgs84, not utm)

parent e9accd30
......@@ -2,8 +2,8 @@
# Title: Data Preparation for LINK Configs and Transmissions
# Author: Fabian Kovac <>
# Team: University of Applied Sciences St. Pölten
# Version: 2.2
# Last changed: 2021-07-15
# Version: 2.4
# Last changed: 2021-09-08
import sys
......@@ -112,7 +112,7 @@ def load_inca_data(dir_inca: pathlib.Path) -> np.array:
def get_midpoint(lon_a: np.array, lat_a: np.array, lon_b: np.array, lat_b: np.array) -> np.array:
"""Calculcates the midpoint between two utm coordinate pairs
"""Calculcates the midpoint between two wgs 84 coordinate pairs
lon_a (np.array): Longitudes of point A
......@@ -183,19 +183,19 @@ def get_distance(lon_a: np.array, lat_a: np.array, lon_b: np.array, lat_b:
return distance
def utm_to_lambert(lon: np.array, lat: np.array) -> tuple:
def wgs84_to_lambert(lon: np.array, lat: np.array) -> tuple:
"""Convert UTM coordinates to an Austrian Lambert Conic Conformal Projection (lcc)
EPSG code: 31287, see
lon (np.array): Vector containing utm longitudes
lat (np.array): Vector containing utm latitudes
lon (np.array): Vector containing wgs 84 longitudes
lat (np.array): Vector containing wgs 84 latitudes
x, y (np.array): Vectors containing lcc coordinates
# convert utm coordinates to radians
# convert wgs 84 coordinates to radians
lon = np.radians(lon)
lat = np.radians(lat)
......@@ -291,9 +291,9 @@ def get_inca_data(datetimes: np.array, lon_a: np.array, lat_a: np.array, lon_b:
_log(f'Created search indices vector for each transmission for INCA RR tensor')
# convert utm coordinates to lambert conic conformal projection
xa, ya = utm_to_lambert(lon_a, lat_a)
xb, yb = utm_to_lambert(lon_b, lat_b)
# convert wgs 84 coordinates to lambert conic conformal projection
xa, ya = wgs84_to_lambert(lon_a, lat_a)
xb, yb = wgs84_to_lambert(lon_b, lat_b)
# create lambert coordinate matrices for start and end points
start = np.array([xa, ya]).T
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment