Skip to content

Commit

Permalink
fix formatting'
Browse files Browse the repository at this point in the history
  • Loading branch information
jbwillis committed Dec 20, 2023
1 parent 8bf56dd commit 9e87b57
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
2 changes: 1 addition & 1 deletion scenarios/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
import sys
sys.path.insert(0, os.path.abspath(
os.path.join(os.path.dirname(__file__), '..', 'flight'))) # noqa
# fmt: on
# fmt: on
30 changes: 22 additions & 8 deletions scenarios/run_scenario.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,38 @@
import os

import context
import pygnc_main # type: ignore
import pygnc_main # type: ignore

# full linewidth printing
np.set_printoptions(
edgeitems=30, linewidth=100000, formatter=dict(float=lambda x: "%.3e" % x)
)
)


def main(scenario_path, timeout, spacecraft_time):
pygnc_main.pygnc_config.batch_sensor_gps_filepath = os.path.join(scenario_path, "batch_sensor_gps_data.bin")
pygnc_main.pygnc_config.batch_sensor_gps_filepath = os.path.join(
scenario_path, "batch_sensor_gps_data.bin"
)
pygnc_main.main(timeout, spacecraft_time)



if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Run the pygnc software stack locally with a scenario as input, bypassing the tty")
parser.add_argument('scenario_path', help="Path to the scenario directory")
parser.add_argument('--timeout', '-t', default=600, help="Allotted runtime in seconds - pi will shut down after this time")
parser.add_argument('--spacecraft_time', '-s', default=1699924855, help="Spacecraft time since Unix epoch in seconds")
parser = argparse.ArgumentParser(
description="Run the pygnc software stack locally with a scenario as input, bypassing the tty"
)
parser.add_argument("scenario_path", help="Path to the scenario directory")
parser.add_argument(
"--timeout",
"-t",
default=600,
help="Allotted runtime in seconds - pi will shut down after this time",
)
parser.add_argument(
"--spacecraft_time",
"-s",
default=1699924855,
help="Spacecraft time since Unix epoch in seconds",
)

args = parser.parse_args()

Expand Down

0 comments on commit 9e87b57

Please sign in to comment.