Skip to content

Commit

Permalink
forgot satgen.py
Browse files Browse the repository at this point in the history
  • Loading branch information
pfandzelter committed Apr 24, 2024
1 parent 9d476a1 commit b89d4d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions celestial/satgen_connstellation.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,12 @@ def __init__(
:param config: The configuration of the constellation.
:param writer: The serializer to use for writing updates.
"""
self.current_time = 0
self.current_time: celestial.types.timestamp_s = config.offset
self.shells: typing.List[celestial.shell.Shell] = []
self.ground_stations: typing.List[celestial.types.MachineID_dtype] = []

self.writer = writer

self.start_time: celestial.types.timestamp_s = 0

for i, sc in enumerate(config.shells):
s = celestial.shell.Shell(
shell_identifier=i + 1,
Expand Down Expand Up @@ -121,7 +119,7 @@ def __init__(
self.machines_state[gst] = celestial.types.VMState.ACTIVE

self.writer.diff_machine(
0, # starting time stamp 0
self.current_time,
gst,
celestial.types.VMState.ACTIVE,
)
Expand Down
4 changes: 2 additions & 2 deletions satgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@
)

# run the simulation
i = 0
i = 0 + config.offset
pbar = tqdm.tqdm(total=int(config.duration / config.resolution))
while i < config.duration:
while i < config.duration + config.offset:
# import cProfile

# cProfile.run("constellation.step(i)", sort="cumtime")
Expand Down

0 comments on commit b89d4d3

Please sign in to comment.