Commit 9581b5ff authored by Fabian Kovac's avatar Fabian Kovac
Browse files

[b] altitudes in km for updating pathlengthts

parent 622807c9
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
# Title: Data Preparation for LINK Configs and Transmissions # Title: Data Preparation for LINK Configs and Transmissions
# Author: Fabian Kovac <ds191008@fhstp.ac.at> # Author: Fabian Kovac <ds191008@fhstp.ac.at>
# Team: University of Applied Sciences St. Pölten # Team: University of Applied Sciences St. Pölten
# Version: 3.1 # Version: 3.2
# Last changed: 2021-11-03 # Last changed: 2021-11-11
# #
import sys import sys
...@@ -183,7 +183,7 @@ def get_distance(lon_a: np.array, lat_a: np.array, alt_a: np.array, lon_b: np.ar ...@@ -183,7 +183,7 @@ def get_distance(lon_a: np.array, lat_a: np.array, alt_a: np.array, lon_b: np.ar
distance = np.sqrt(np.square(dx) + np.square(dy) + np.square(dz)) distance = np.sqrt(np.square(dx) + np.square(dy) + np.square(dz))
# incorporate altitudes into the distance # incorporate altitudes into the distance
distance = np.sqrt(np.square(distance) + np.square(alt_a - alt_b)) distance = np.sqrt(np.square(distance) + np.square((alt_a/1e3) - (alt_b/1e3)))
return distance return distance
...@@ -463,9 +463,9 @@ def prep() -> None: ...@@ -463,9 +463,9 @@ def prep() -> None:
# check if columns exists (only present with 2021-05) # check if columns exists (only present with 2021-05)
if 'TXFREQUENCY' in df_config.columns and 'RXFREQUENCY' in df_config.columns: if 'TXFREQUENCY' in df_config.columns and 'RXFREQUENCY' in df_config.columns:
df_config['RXFREQUENCY'] = df_config['RXFREQUENCY'].astype('float') df_config['RXFREQUENCY'] = df_config['RXFREQUENCY'].astype('float')
df_config['RXFREQUENCY'] = df_config['RXFREQUENCY']/1000 df_config['RXFREQUENCY'] = df_config['RXFREQUENCY']/1e3
df_config['TXFREQUENCY'] = df_config['TXFREQUENCY'].astype('float') df_config['TXFREQUENCY'] = df_config['TXFREQUENCY'].astype('float')
df_config['TXFREQUENCY'] = df_config['TXFREQUENCY']/1000 df_config['TXFREQUENCY'] = df_config['TXFREQUENCY']/1e3
_log('Converted RXFREQUENCY and TXFREQUENCY to float and GHz') _log('Converted RXFREQUENCY and TXFREQUENCY to float and GHz')
......
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