Commit a2034dd9a2320d75e5bb8e556117c3442809d5b8

Authored by Goutte
1 parent fd1829c3

Convert from kilometers to astronomical units for the orbits data.

Showing 1 changed file with 4 additions and 2 deletions   Show diff stats
@@ -62,6 +62,8 @@ log.addHandler(logHandler) @@ -62,6 +62,8 @@ log.addHandler(logHandler)
62 62
63 # HARDCODED CONFIGURATION ##################################################### 63 # HARDCODED CONFIGURATION #####################################################
64 64
  65 +ASTRONOMICAL_UNIT_IN_KM = 1.496e8
  66 +
65 # Absolute path to the installed CDF library from https://cdf.gsfc.nasa.gov/ 67 # Absolute path to the installed CDF library from https://cdf.gsfc.nasa.gov/
66 CDF_LIB = '/usr/local/lib/libcdf' 68 CDF_LIB = '/usr/local/lib/libcdf'
67 69
@@ -613,8 +615,8 @@ def get_data_for_target(target_config, input_slug, @@ -613,8 +615,8 @@ def get_data_for_target(target_config, input_slug,
613 x_hee = None 615 x_hee = None
614 y_hee = None 616 y_hee = None
615 if dkey in orbit_data: 617 if dkey in orbit_data:
616 - x_hee = orbit_data[dkey][0]  
617 - y_hee = orbit_data[dkey][1] 618 + x_hee = orbit_data[dkey][0] / ASTRONOMICAL_UNIT_IN_KM
  619 + y_hee = orbit_data[dkey][1] / ASTRONOMICAL_UNIT_IN_KM
618 620
619 # First exception: V may be a vector instead of a scalar 621 # First exception: V may be a vector instead of a scalar
620 if hasattr(datum_v, '__len__'): 622 if hasattr(datum_v, '__len__'):