quicksat 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- quicksat/__init__.py +36 -0
- quicksat/__main__.py +77 -0
- quicksat/agility/__init__.py +9 -0
- quicksat/agility/budget.py +872 -0
- quicksat/agility/report.py +135 -0
- quicksat/data/coastlines.json +1 -0
- quicksat/dataflow/__init__.py +5 -0
- quicksat/dataflow/budget.py +355 -0
- quicksat/dataflow/report.py +229 -0
- quicksat/delta_v/__init__.py +5 -0
- quicksat/delta_v/budget.py +633 -0
- quicksat/delta_v/report.py +231 -0
- quicksat/editor/__init__.py +12 -0
- quicksat/editor/__main__.py +107 -0
- quicksat/editor/editor.py +607 -0
- quicksat/editor/server.py +539 -0
- quicksat/editor/sizing.py +175 -0
- quicksat/editor/templates/scenario/checks.js +178 -0
- quicksat/editor/templates/scenario/editor.html +140 -0
- quicksat/editor/templates/scenario/project.js +463 -0
- quicksat/editor/templates/scenario/run.js +182 -0
- quicksat/editor/templates/scenario/sections.js +634 -0
- quicksat/editor/templates/scenario/view3d.js +348 -0
- quicksat/editor/templates/scenario/views.js +208 -0
- quicksat/editor/templates/scenario/write.js +228 -0
- quicksat/editor/templates/shared/base.js +218 -0
- quicksat/editor/templates/shared/editor.css +338 -0
- quicksat/editor/templates/shared/files.js +152 -0
- quicksat/editor/templates/shared/frame.js +730 -0
- quicksat/editor/templates/shared/open.js +375 -0
- quicksat/editor/templates/sizing/checks.js +137 -0
- quicksat/editor/templates/sizing/editor.html +63 -0
- quicksat/editor/templates/sizing/project.js +376 -0
- quicksat/editor/templates/sizing/sections.js +395 -0
- quicksat/editor/templates/sizing/views.js +137 -0
- quicksat/editor/templates/sizing/write.js +142 -0
- quicksat/mass/__init__.py +5 -0
- quicksat/mass/budget.py +815 -0
- quicksat/mass/equipment.py +93 -0
- quicksat/mass/report.py +345 -0
- quicksat/orbit/__init__.py +5 -0
- quicksat/orbit/attitude.py +430 -0
- quicksat/orbit/ccsds.py +77 -0
- quicksat/orbit/ecsv_trajectory.py +294 -0
- quicksat/orbit/geometry.py +496 -0
- quicksat/orbit/oem_trajectory.py +646 -0
- quicksat/orbit/omm.py +360 -0
- quicksat/orbit/sso.py +284 -0
- quicksat/orbit/tle.py +299 -0
- quicksat/orbit/trajectory.py +625 -0
- quicksat/orbit/trajectory_files.py +88 -0
- quicksat/power/__init__.py +17 -0
- quicksat/power/__main__.py +121 -0
- quicksat/power/budget.py +491 -0
- quicksat/power/config.py +501 -0
- quicksat/power/consumption.py +460 -0
- quicksat/power/generation.py +651 -0
- quicksat/power/orbits.py +145 -0
- quicksat/power/plots.py +424 -0
- quicksat/power/shadowing.py +308 -0
- quicksat/power/viewer.py +290 -0
- quicksat/sample.py +192 -0
- quicksat/scenario/__init__.py +14 -0
- quicksat/scenario/__main__.py +53 -0
- quicksat/scenario/articulation.py +216 -0
- quicksat/scenario/attitude.py +556 -0
- quicksat/scenario/attitude_files.py +307 -0
- quicksat/scenario/config.py +1647 -0
- quicksat/scenario/plots.py +375 -0
- quicksat/scenario/rates.py +169 -0
- quicksat/scenario/run.py +973 -0
- quicksat/scenario/spacecraft.py +400 -0
- quicksat/scenario/templates/vendor/build_vendor.sh +53 -0
- quicksat/scenario/templates/vendor/js-yaml.LICENSE +21 -0
- quicksat/scenario/templates/vendor/js-yaml.min.js +2 -0
- quicksat/scenario/templates/vendor/three.LICENSE +23 -0
- quicksat/scenario/templates/vendor/three.min.js +4622 -0
- quicksat/scenario/templates/vendor/three_entry.js +38 -0
- quicksat/scenario/templates/vendor/uPlot.LICENSE +23 -0
- quicksat/scenario/templates/vendor/uPlot.iife.min.js +2 -0
- quicksat/scenario/templates/vendor/uPlot.min.css +1 -0
- quicksat/scenario/templates/viewer.html +2915 -0
- quicksat/scenario/templates/viewer_logic.js +202 -0
- quicksat/scenario/viewer.py +548 -0
- quicksat/utils/__init__.py +5 -0
- quicksat/utils/intervals.py +229 -0
- quicksat/utils/mission.py +160 -0
- quicksat/utils/parser_helpers.py +272 -0
- quicksat/utils/plot_helpers.py +178 -0
- quicksat-0.1.0.dist-info/METADATA +150 -0
- quicksat-0.1.0.dist-info/RECORD +93 -0
- quicksat-0.1.0.dist-info/WHEEL +4 -0
- quicksat-0.1.0.dist-info/licenses/LICENSE.md +675 -0
quicksat/__init__.py
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# quicksat Basic satellite sizing tool
|
|
2
|
+
#
|
|
3
|
+
# Copyright (C) Egemen Imre
|
|
4
|
+
#
|
|
5
|
+
# Licensed under GNU GPL v3.0. See LICENSE.md for more info.
|
|
6
|
+
"""
|
|
7
|
+
Basic satellite sizing tool.
|
|
8
|
+
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
__version__ = "0.1.0"
|
|
12
|
+
|
|
13
|
+
from astropy import constants
|
|
14
|
+
from astropy import units as u
|
|
15
|
+
from astropy.units import Quantity
|
|
16
|
+
|
|
17
|
+
__all__ = ["MU_EARTH", "Q_", "R_EARTH", "u"]
|
|
18
|
+
|
|
19
|
+
Q_ = Quantity
|
|
20
|
+
"""Shorthand for astropy's `Quantity`, exported the way opticks exports it.
|
|
21
|
+
|
|
22
|
+
The package builds quantities with the constructor, `Q_(123, "m")`, and parses
|
|
23
|
+
text with `Q_("123 m")`. The notebooks write `123 * u.m` instead.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
# astropy.constants creates its constants at import, so pyright cannot see them
|
|
27
|
+
R_EARTH = constants.R_earth # pyright: ignore[reportAttributeAccessIssue]
|
|
28
|
+
"""Earth equatorial radius: astropy's default, the IAU 2015 nominal 6378.1 km."""
|
|
29
|
+
|
|
30
|
+
MU_EARTH = constants.GM_earth # pyright: ignore[reportAttributeAccessIssue]
|
|
31
|
+
"""Earth gravitational parameter: astropy's default, the IAU 2015 nominal GM.
|
|
32
|
+
|
|
33
|
+
A GM rather than G times astropy's `M_earth`. GM is the measured quantity, known
|
|
34
|
+
to about nine significant figures, and G is known to about five. astropy itself
|
|
35
|
+
derives `M_earth` from the two.
|
|
36
|
+
"""
|
quicksat/__main__.py
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# quicksat Basic satellite sizing tool
|
|
2
|
+
#
|
|
3
|
+
# Copyright (C) Egemen Imre
|
|
4
|
+
#
|
|
5
|
+
# Licensed under GNU GPL v3.0. See LICENSE.md for more info.
|
|
6
|
+
"""
|
|
7
|
+
Copy quicksat's sample into a folder, from the command line:
|
|
8
|
+
|
|
9
|
+
python -m quicksat init my_satellite
|
|
10
|
+
|
|
11
|
+
The sample comes from GitHub, for the installed version, with its data, its
|
|
12
|
+
notebooks, and the viewers and editor pages written from them. `--from` takes a
|
|
13
|
+
local copy of the repository instead, as a folder or as its zip. The folder must
|
|
14
|
+
be empty, so nothing is overwritten. See `quicksat.sample`.
|
|
15
|
+
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
import argparse
|
|
19
|
+
from pathlib import Path
|
|
20
|
+
|
|
21
|
+
from quicksat.sample import copy_sample
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def main(argv: list[str] | None = None) -> None:
|
|
25
|
+
"""
|
|
26
|
+
Copy the sample, and print what to do next.
|
|
27
|
+
|
|
28
|
+
Parameters
|
|
29
|
+
----------
|
|
30
|
+
argv : list of str, optional
|
|
31
|
+
The arguments, the command line's by default
|
|
32
|
+
"""
|
|
33
|
+
parser = argparse.ArgumentParser(
|
|
34
|
+
prog="python -m quicksat",
|
|
35
|
+
description="Copy quicksat's sample into a folder.",
|
|
36
|
+
)
|
|
37
|
+
commands = parser.add_subparsers(dest="command", required=True)
|
|
38
|
+
init = commands.add_parser(
|
|
39
|
+
"init",
|
|
40
|
+
help="copy the sample into a folder",
|
|
41
|
+
description="Copy quicksat's sample, from GitHub, into an empty folder.",
|
|
42
|
+
)
|
|
43
|
+
init.add_argument("folder", help="the folder to copy into, made if missing")
|
|
44
|
+
init.add_argument(
|
|
45
|
+
"--from",
|
|
46
|
+
dest="source",
|
|
47
|
+
metavar="PATH",
|
|
48
|
+
help="a local copy of the repository, as a folder or as its zip",
|
|
49
|
+
)
|
|
50
|
+
args = parser.parse_args(argv)
|
|
51
|
+
try:
|
|
52
|
+
files, warnings = copy_sample(args.folder, args.source)
|
|
53
|
+
except (OSError, ValueError) as error:
|
|
54
|
+
parser.exit(1, f"error: {error}\n")
|
|
55
|
+
for warning in warnings:
|
|
56
|
+
print(f"warning: {warning}")
|
|
57
|
+
print(f"Copied {len(files)} files into {args.folder}.")
|
|
58
|
+
print(_next_steps(Path(args.folder)))
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def _next_steps(folder: Path) -> str:
|
|
62
|
+
"""What to do with the copied sample, with its own paths."""
|
|
63
|
+
power = folder / "power"
|
|
64
|
+
sizing = folder / "sizing"
|
|
65
|
+
return f"""
|
|
66
|
+
Next:
|
|
67
|
+
Open the power sample in the Scenario Editor, served from this computer:
|
|
68
|
+
python -m quicksat.editor serve {power / "data"} {power / "output"}
|
|
69
|
+
Or double-click a page written already, such as
|
|
70
|
+
{power / "output" / "power_viewer.html"}
|
|
71
|
+
{sizing / "editor" / "editor.html"}
|
|
72
|
+
The notebooks in {sizing}, {folder / "scenario"} and {power} are the worked
|
|
73
|
+
examples, for Jupyter."""
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
if __name__ == "__main__":
|
|
77
|
+
main()
|