Skip to content

Commit

Permalink
include kinematic parameters that are fixed for all heliostats
Browse files Browse the repository at this point in the history
  • Loading branch information
kalebphipps committed Nov 27, 2024
1 parent 72690e6 commit c0756b0
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 7 deletions.
20 changes: 20 additions & 0 deletions paint/util/paint_mappings.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,3 +382,23 @@
WGS84_A = 6378137.0 # Major axis in meters
WGS84_B = 6356752.314245 # Minor axis in meters
WGS84_E2 = (WGS84_A**2 - WGS84_B**2) / WGS84_A**2 # Eccentricity squared

# Extra Kinematic Properties
FIRST_JOINT_TRANSLATION_E_KEY = "first_joint_translation_e"
FIRST_JOINT_TRANSLATION_N_KEY = "first_joint_translation_n"
FIRST_JOINT_TRANSLATION_U_KEY = "first_joint_translation_u"
SECOND_JOINT_TRANSLATION_E_KEY = "second_joint_translation_e"
SECOND_JOINT_TRANSLATION_N_KEY = "second_joint_translation_n"
SECOND_JOINT_TRANSLATION_U_KEY = "second_joint_translation_u"
CONCENTRATOR_TRANSLATION_E_KEY = "concentrator_translation_e"
CONCENTRATOR_TRANSLATION_N_KEY = "concentrator_translation_n"
CONCENTRATOR_TRANSLATION_U_KEY = "concentrator_translation_u"
FIRST_JOINT_TRANSLATION_E = 0.0
FIRST_JOINT_TRANSLATION_N = 0.0
FIRST_JOINT_TRANSLATION_U = 0.0
SECOND_JOINT_TRANSLATION_E = 0.0
SECOND_JOINT_TRANSLATION_N = 0.0
SECOND_JOINT_TRANSLATION_U = 0.315
CONCENTRATOR_TRANSLATION_E = 0.0
CONCENTRATOR_TRANSLATION_N = -0.17755
CONCENTRATOR_TRANSLATION_U = -0.4045
50 changes: 43 additions & 7 deletions preprocessing-scripts/generate_properties_json_and_stac.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import argparse
import json
import os
from pathlib import Path
from typing import Any

Expand Down Expand Up @@ -88,6 +87,35 @@ def extract_properties_data_and_generate_stac_item(
]:
kinematic_data.pop(key_to_remove, None)

# Include additional kinematic properties that are identical for all heliostats change.
kinematic_data[
mappings.FIRST_JOINT_TRANSLATION_E_KEY
] = mappings.FIRST_JOINT_TRANSLATION_E
kinematic_data[
mappings.FIRST_JOINT_TRANSLATION_N_KEY
] = mappings.FIRST_JOINT_TRANSLATION_N
kinematic_data[
mappings.FIRST_JOINT_TRANSLATION_U_KEY
] = mappings.FIRST_JOINT_TRANSLATION_U
kinematic_data[
mappings.SECOND_JOINT_TRANSLATION_E_KEY
] = mappings.SECOND_JOINT_TRANSLATION_E
kinematic_data[
mappings.SECOND_JOINT_TRANSLATION_N_KEY
] = mappings.SECOND_JOINT_TRANSLATION_N
kinematic_data[
mappings.SECOND_JOINT_TRANSLATION_U_KEY
] = mappings.SECOND_JOINT_TRANSLATION_U
kinematic_data[
mappings.CONCENTRATOR_TRANSLATION_E_KEY
] = mappings.CONCENTRATOR_TRANSLATION_E
kinematic_data[
mappings.CONCENTRATOR_TRANSLATION_N_KEY
] = mappings.CONCENTRATOR_TRANSLATION_N
kinematic_data[
mappings.CONCENTRATOR_TRANSLATION_U_KEY
] = mappings.CONCENTRATOR_TRANSLATION_U

# Extract renovation date.
renovation_date = renovations.renovation_number_to_date[
renovation_data[mappings.RENOVATION_ID]
Expand Down Expand Up @@ -269,14 +297,22 @@ def main(arguments: argparse.Namespace):


if __name__ == "__main__":
lsdf_root = str(os.environ.get("LSDFPROJECTS"))
input_axis = Path(lsdf_root) / "paint" / "PAINT" / "axis_data.csv"
output_folder = Path(lsdf_root) / "paint" / mappings.POWER_PLANT_GPPD_ID
# lsdf_root = str(os.environ.get("LSDFPROJECTS"))
# input_axis = Path(lsdf_root) / "paint" / "PAINT" / "axis_data.csv"
# output_folder = Path(lsdf_root) / "paint" / mappings.POWER_PLANT_GPPD_ID
# input_position = (
# Path(lsdf_root) / "paint" / "PAINT" / "Heliostatpositionen_xyz.xlsx"
# )
# input_renovations = Path(lsdf_root) / "paint" / "PAINT" / "renovation_data.csv"
# input_facets = Path(lsdf_root) / "paint" / "PAINT" / "facet_data.npy"

input_axis = Path(PAINT_ROOT) / "ExampleDataKIT" / "axis_data.csv"
output_folder = Path(PAINT_ROOT) / "AAA_ARGH"
input_position = (
Path(lsdf_root) / "paint" / "PAINT" / "Heliostatpositionen_xyz.xlsx"
Path(PAINT_ROOT) / "ExampleDataKIT" / "Heliostatpositionen_xyz.xlsx"
)
input_renovations = Path(lsdf_root) / "paint" / "PAINT" / "renovation_data.csv"
input_facets = Path(lsdf_root) / "paint" / "PAINT" / "facet_data.npy"
input_renovations = Path(PAINT_ROOT) / "ExampleDataKIT" / "renovation_data.csv"
input_facets = Path(PAINT_ROOT) / "ExampleDataKIT" / "facet_data.npy"

parser = argparse.ArgumentParser()
parser.add_argument(
Expand Down

0 comments on commit c0756b0

Please sign in to comment.