Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Turfader authored Apr 11, 2023
1 parent 8ade6fa commit e759ead
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,18 @@
## About The Project

Welcome to the GitHub Repository for Team Cartographer's Application to the 2022-23 NASA App Development Challenge! Our team for this project from Anaheim, CA, is:<br>
- <b> John B. ('23), Abhi A. ('23), Kion M. ('24), Kabir A. ('24), Natalie K. ('24), Chrysa N. ('24), Efe C. ('24) </b><br>
- <b> John B. ('23), Abhi A. ('23), Kion M. ('24), Kabir A. ('24), Natalie K. ('24), Efe C. ('24) </b><br>


## Acknowledgements and Thanks to:
- James Ristow, NASA Kennedy Space Center<br>
- Alexandre Tolstenko, Champlain College Division of IT and Science <br>
- Nchima Kapoma, New School Parsons College of Design
- Dr. Brian Welch, NASA Goddard Flight Center<br>
- Petter Amland, Creator of Python's <a href="https://www.ursinaengine.org/">Ursina</a> Library<br>
- Diana Ramirez, our ADC Lead Teacher<br>
- Mrs. Leslie, Mr. Fawcett, Mr. Drake
- Chrysa N., Khiet H.

## In-App Music Credits
- Petter Amland
Expand Down
12 changes: 7 additions & 5 deletions a_star.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class BreakIt(Exception):
@timeit
def generate_comm_path(comm_path: List[Tuple[int, int]]) -> Tuple[List[Tuple[int, int, int]], List[Tuple[int, int]]]:
for index, point in enumerate(comm_path):
print(f"\rgenerating communication checkpoints: {round(index / len(comm_path) * 100, 2)}% complete", end="")
print(f"\rGenerating communication checkpoints: {round(index / len(comm_path) * 100, 2)}% complete", end="")

x, y = point[0], point[1]
# If a point is already valid, then just leave it.
Expand Down Expand Up @@ -108,6 +108,8 @@ def generate_comm_path(comm_path: List[Tuple[int, int]]) -> Tuple[List[Tuple[int

# Now we generate a new path.
final_path: List[Tuple[int, int, int]] = []
comm_path = sorted(comm_path, key=lambda ele: (ele[0], ele[1]))

for i in range(len(comm_path) - 1):
(start_x, start_y), (goal_x, goal_y) = \
(comm_path[i][0], comm_path[i][1]), (comm_path[i+1][0], comm_path[i+1][1])
Expand Down Expand Up @@ -161,7 +163,7 @@ def update_image(image_path: str, mvmt_path: List[tuple], comm_path: List[tuple]
path: str = image_path
img: Image.Image = Image.open(path)

print("updating path image")
print("Updating path image")
for i in range(len(mvmt_path)):
color: tuple = (0, 0, 255)
x: int = mvmt_path[i][0]
Expand All @@ -182,7 +184,7 @@ def update_image(image_path: str, mvmt_path: List[tuple], comm_path: List[tuple]
# noinspection SpellCheckingInspection
# noinspection PyGlobalUndefined
def run_astar(sv) -> None:
print("finding a suitable lunar path")
print("Finding a suitable lunar path")
global save
save = sv

Expand All @@ -199,7 +201,7 @@ def run_astar(sv) -> None:
goal_node = Node(goal_x, goal_y)

final_path = astar()
print("initial path generated")
print("Initial path generated")
sub_10_path = None

if checkpoints:
Expand All @@ -210,7 +212,7 @@ def run_astar(sv) -> None:
if final_path is not None:
update_image(save.moon_surface_texture_image, final_path, sub_10_path)
else:
show_warning("A* Pathfinding Error", "No Valid Path found between points.")
show_warning("Congrats on finding a bug!", "This shouldn't happen, contact a developer ASAP!")

if checkpoints:
print("Created Path with Communication Checkpoints")
Expand Down
4 changes: 2 additions & 2 deletions artemis_adc_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
packages = ["Pillow", "numpy", "ursina", "PySimpleGUI", "orjson", "seaborn"]
for package in packages:
run([sys.executable, "-m", "pip", "install", package], check=True)
print(f"installed package: {package}")
print(f"Installed package: {package}")

print(f"venv creation completed in {round(time()-start, 2)}s")
print(f"Venv creation completed in {round(time()-start, 2)}s")


print("\nRunning application")
Expand Down
3 changes: 1 addition & 2 deletions display.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,7 @@ def cleanup():

# Music Functionality --------------
track_list: list = ["assets/Night_Sky-Petter_Amland.mp3", "assets/Buffalo-Petter_Amland.mp3.mp3",
"assets/Seraph-Petter_Amland.mp3", "assets/Lonely_Wasteland-John_Bouyer_ft._Natalie_Kwok.mp3",
"assets/Sonata_in-C-Sharp_Minor-John_Bouyer.mp3"]
"assets/Seraph-Petter_Amland.mp3"]
menu_track_list: list = ["assets/Lonely_Wasteland-John_Bouyer_ft._Natalie_Kwok.mp3", "OSU!_Pause_Menu_Track.mp3"]

run_music = Audio(
Expand Down
1 change: 1 addition & 0 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def timed(*args, **kw):
return timed


@timeit
def load_json(json_path: str):
with open(json_path, 'rb') as f:
data = oj.loads(f.read())
Expand Down

0 comments on commit e759ead

Please sign in to comment.