
Security News
NVD Quietly Sweeps 100K+ CVEs Into a “Deferred” Black Hole
NVD now marks all pre-2018 CVEs as "Deferred," signaling it will no longer enrich older vulnerabilities, further eroding trust in its data.
ANISE provides a toolkit and files for Attitude, Navigation, Instrument, Spacecraft, and Ephemeris data. It's a modern replacement of NAIF SPICE file.
ANISE is a rewrite of the core functionalities of the NAIF SPICE toolkit with enhanced performance, and ease of use, while leveraging Rust's safety and speed.
Please fill out our user survey
In the realm of space exploration, navigation, and astrophysics, precise and efficient computation of spacecraft position, orientation, and time is critical. ANISE, standing for "Attitude, Navigation, Instrument, Spacecraft, Ephemeris," offers a Rust-native approach to these challenges. This toolkit provides a suite of functionalities including but not limited to:
ANISE stands validated against the traditional SPICE toolkit, ensuring accuracy and reliability, with translations achieving machine precision (2e-16) and rotations presenting minimal error (less than two arcseconds in the pointing of the rotation axis and less than one arcsecond in the angle about this rotation axis).
Note: The tutorials can be viewed in read-only form on the Github repo.
In Python, start by adding anise to your project: pip install anise
.
from anise import Almanac, Aberration
from anise.astro.constants import Frames
from anise.astro import Orbit
from anise.time import Epoch
from pathlib import Path
def test_state_transformation():
"""
This is the Python equivalent to anise/tests/almanac/mod.rs
"""
data_path = Path(__file__).parent.joinpath("..", "..", "data")
# Must ensure that the path is a string
ctx = Almanac(str(data_path.joinpath("de440s.bsp")))
# Let's add another file here -- note that the Almanac will load into a NEW variable, so we must overwrite it!
# This prevents memory leaks (yes, I promise)
ctx = ctx.load(str(data_path.joinpath("pck08.pca"))).load(
str(data_path.joinpath("earth_latest_high_prec.bpc"))
)
eme2k = ctx.frame_info(Frames.EME2000)
assert eme2k.mu_km3_s2() == 398600.435436096
assert eme2k.shape.polar_radius_km == 6356.75
assert abs(eme2k.shape.flattening() - 0.0033536422844278) < 2e-16
epoch = Epoch("2021-10-29 12:34:56 TDB")
orig_state = Orbit.from_keplerian(
8_191.93,
1e-6,
12.85,
306.614,
314.19,
99.887_7,
epoch,
eme2k,
)
assert orig_state.sma_km() == 8191.93
assert orig_state.ecc() == 1.000000000361619e-06
assert orig_state.inc_deg() == 12.849999999999987
assert orig_state.raan_deg() == 306.614
assert orig_state.tlong_deg() == 0.6916999999999689
state_itrf93 = ctx.transform_to(
orig_state, Frames.EARTH_ITRF93, None
)
print(orig_state)
print(state_itrf93)
assert state_itrf93.latitude_deg() == 10.549246868302738
assert state_itrf93.longitude_deg() == 133.76889100913047
assert state_itrf93.height_km() == 1814.503598063825
# Convert back
from_state_itrf93_to_eme2k = ctx.transform_to(
state_itrf93, Frames.EARTH_J2000, None
)
print(from_state_itrf93_to_eme2k)
assert orig_state == from_state_itrf93_to_eme2k
# Demo creation of a ground station
mean_earth_angular_velocity_deg_s = 0.004178079012116429
# Grab the loaded frame info
itrf93 = ctx.frame_info(Frames.EARTH_ITRF93)
paris = Orbit.from_latlongalt(
48.8566,
2.3522,
0.4,
mean_earth_angular_velocity_deg_s,
epoch,
itrf93,
)
assert abs(paris.latitude_deg() - 48.8566) < 1e-3
assert abs(paris.longitude_deg() - 2.3522) < 1e-3
assert abs(paris.height_km() - 0.4) < 1e-3
if __name__ == "__main__":
test_state_transformation()
maturin
, e.g. via pipx
as pipx install maturin
cd anise/anise-py && python3 -m venv .venv
patchelf
for faster builds: pip install patchelf
, and pytest
for the test suite: pip install pytest
maturin develop
to build the development package and install it in the virtual environmentpython -m pytest
To run the development version of ANISE in a Jupyter Notebook, install ipykernels in your virtual environment.
pip install ipykernel
python -m ipykernel install --user --name=.venv
jupyter notebook
Type hints are extremely useful for Python users. Building them is a bit of manual work.
maturin develop
to build the latest librarypython generate_stubs.py anise anise.pyi
builds the top level type hintsutils
, time
, astro
, astro.constants
, rotation
writing to a new file each time:
python generate_stubs.py anise.astro anise.astro.pyi
python generate_stubs.py anise.time anise.time.pyi
python generate_stubs.py anise.astro.constants anise.astro.constants.pyi
python generate_stubs.py anise.utils anise.utils.pyi
python generate_stubs.py anise.rotation anise.rotation.pyi
anise.pyi
since that's the only one used by maturin
.FAQs
ANISE provides a toolkit and files for Attitude, Navigation, Instrument, Spacecraft, and Ephemeris data. It's a modern replacement of NAIF SPICE file.
We found that anise demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
NVD now marks all pre-2018 CVEs as "Deferred," signaling it will no longer enrich older vulnerabilities, further eroding trust in its data.
Research
Security News
Lazarus-linked threat actors expand their npm malware campaign with new RAT loaders, hex obfuscation, and over 5,600 downloads across 11 packages.
Security News
Safari 18.4 adds support for Iterator Helpers and two other TC39 JavaScript features, bringing full cross-browser coverage to key parts of the ECMAScript spec.