From a2034dd9a2320d75e5bb8e556117c3442809d5b8 Mon Sep 17 00:00:00 2001 From: Goutte Date: Fri, 14 Sep 2018 15:29:05 +0200 Subject: [PATCH] Convert from kilometers to astronomical units for the orbits data. --- web/run.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/run.py b/web/run.py index 6e36ea8..34d3967 100755 --- a/web/run.py +++ b/web/run.py @@ -62,6 +62,8 @@ log.addHandler(logHandler) # HARDCODED CONFIGURATION ##################################################### +ASTRONOMICAL_UNIT_IN_KM = 1.496e8 + # Absolute path to the installed CDF library from https://cdf.gsfc.nasa.gov/ CDF_LIB = '/usr/local/lib/libcdf' @@ -613,8 +615,8 @@ def get_data_for_target(target_config, input_slug, x_hee = None y_hee = None if dkey in orbit_data: - x_hee = orbit_data[dkey][0] - y_hee = orbit_data[dkey][1] + x_hee = orbit_data[dkey][0] / ASTRONOMICAL_UNIT_IN_KM + y_hee = orbit_data[dkey][1] / ASTRONOMICAL_UNIT_IN_KM # First exception: V may be a vector instead of a scalar if hasattr(datum_v, '__len__'): -- libgit2 0.21.2