1 unstable release
new 0.1.0 | Feb 2, 2025 |
---|
#258 in Simulation
50KB
923 lines
Astrograph binary
A binary that assists with generating star-charts for arbitrary universes or solar systems.
Getting started
You can either compile this binary yourself or use a pre-compiled binary
Building
-
Ensure you have
cargo
installed -
If you want to run the binary through cargo run
cargo run -- {your arguments}
-
otherwise run
cargo build --release
orcargo install
-
You will see some warnings like this
warning: astrograph-bin@{version}: Completion file for {shell} has been generated at: "/path/to/astrograph/ target/release/build/astrograph-bin-{hash}/..."
-
If you want completions for your shell append the appropriate file to your completions file.
- e.g. for bash
cat target/release/build/astrograph-bin-*/astrograph.bash >> ~/.bash_completion
- e.g. for zsh
cp target/release/build/astrograph-bin-*/_astrograph ~/.local/lib/oh-my-zsh/cache/completions/
- e.g. for powershell
type target\release\build\astrograph-bin-*\_astrograph.ps1 >> $profile
- e.g. for bash
-
You can also install the man page by running
sudo cp target/release/build/astrograph-bin-*/out/astrograph.1 /usr/local/share/man/man1/
-
-
if you ran cargo
cargo build
copy the compiled binary where you would like it (e.g. into your$path
, which is whatcargo install
does)- The compiled binary will be at
target/release/astrograph
- The compiled binary will be at
Running
Now that the binary is installed you can run
astrograph --output universe.json build --star-count 1000
to generate a
thousand stars. You can then download this file
since we do not automatically generate observatories yet.
Then you can generate observations with this command astrograph simulate -end-time 5 --universe universe.json --observatories observatories.json
to generate observations from all observatories for times 0, 1, 2, 3, and 4
Dependencies
~4.5–7.5MB
~133K SLoC