From acd5945e959d78503899661ca7db9da988f9aba6 Mon Sep 17 00:00:00 2001 From: Artem30801 Date: Mon, 10 Feb 2020 17:03:52 +0300 Subject: [PATCH] Fix telem (2) --- Server/copter_table_models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Server/copter_table_models.py b/Server/copter_table_models.py index 8e90029..36ee4b6 100644 --- a/Server/copter_table_models.py +++ b/Server/copter_table_models.py @@ -131,8 +131,8 @@ def check_start_pos(item, context): if context.current_position is None: return item != 'NO_POS' # maybe should return true - delta = get_distance(get_position(context.current_position[:2]), - get_position(context.start_position[:2])) + delta = get_distance(get_position(context.current_position), + get_position(context.start_position)) if math.isnan(delta): return False @@ -141,7 +141,7 @@ def check_start_pos(item, context): def get_position(position): if position != 'NO_POS' and position[0] != 'nan': # float('nan')? - return position + return position[:2] return [float('nan')] * 3