From 0d5ace819208be1ad9c75a878bf4ae1dfe581a38 Mon Sep 17 00:00:00 2001 From: Helge Eichhorn Date: Mon, 10 Jun 2024 15:25:34 +0200 Subject: [PATCH] Remove `lox-comms` crate (#112) --- Cargo.lock | 4 --- Cargo.toml | 1 - README.md | 5 ---- crates/lox-comms/Cargo.toml | 11 -------- crates/lox-comms/src/antennae.rs | 46 -------------------------------- crates/lox-comms/src/lib.rs | 1 - 6 files changed, 68 deletions(-) delete mode 100644 crates/lox-comms/Cargo.toml delete mode 100644 crates/lox-comms/src/antennae.rs delete mode 100644 crates/lox-comms/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index 49555284..e24f648f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -375,10 +375,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "lox-comms" -version = "0.1.0" - [[package]] name = "lox-coords" version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index 8c1e292c..3b609c14 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,6 @@ authors = ["Helge Eichhorn and the lox-space contributors"] [workspace.dependencies] lox-bodies = { path = "crates/lox-bodies" } -lox-comms = { path = "crates/lox-comms" } lox-coords = { path = "crates/lox-coords" } lox-earth = { path = "crates/lox-earth" } lox-ephem = { path = "crates/lox-ephem" } diff --git a/README.md b/README.md index 905419a3..04d2ff75 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,6 @@ and `lox-coords` provide tools for advanced users and scientific computing. * Python bindings for easy integration with industry standard tools. * Tools for working with time in UTC, TAI, UT1, TT, TCB, TCG and TDB, in wall clock, Julian and high-precision representations. -* An RF communication toolkit. * Work with fixed and rotating frames in Cartesian and Keplerian coordinate systems. * Ephemeris, size and shape data for all major celestial bodies. * Ingest and interpolate Earth orientation parameters with ease. @@ -43,10 +42,6 @@ representations. Offers leap-second aware conversion from UTC to continuous time Provides structs representing all major celestial bodies, conveniently categorized by a variety of traits exposing SPICE-dervied data. -### lox-comms - -Tools for planning and analysing RF communication links between spacecraft and ground stations. - ### lox-coords Tools for working with fixed and inertial coordinate systems, including transformations between them. diff --git a/crates/lox-comms/Cargo.toml b/crates/lox-comms/Cargo.toml deleted file mode 100644 index 7e830564..00000000 --- a/crates/lox-comms/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "lox-comms" -version = "0.1.0" -rust-version.workspace = true -edition.workspace = true -license.workspace = true -authors.workspace = true - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] diff --git a/crates/lox-comms/src/antennae.rs b/crates/lox-comms/src/antennae.rs deleted file mode 100644 index dc5f3c97..00000000 --- a/crates/lox-comms/src/antennae.rs +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2023. Helge Eichhorn and the LOX contributors - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - */ - -use std::f64::consts::PI; - -pub trait Antenna { - fn gain(&self, frequency: f64) -> f64; - fn beam_width(&self, frequency: f64) -> f64; -} - -pub struct Parabolic { - diameter: f64, - efficiency: f64, -} - -impl Antenna for Parabolic { - fn gain(&self, frequency: f64) -> f64 { - let a = area(self.diameter); - let lambda = wavelength(frequency); - let g = to_db(4.0 * PI * a / lambda.powi(2)); - g + to_db(self.efficiency) - } - - fn beam_width(&self, frequency: f64) -> f64 { - 70.0 * wavelength(frequency) / self.diameter - } -} - -fn area(diameter: f64) -> f64 { - PI * diameter.powi(2) / 4.0 -} - -const C0: f64 = 2.99792458e8; - -fn wavelength(frequency: f64) -> f64 { - C0 / frequency -} - -fn to_db(val: f64) -> f64 { - 10.0 * val.log10() -} diff --git a/crates/lox-comms/src/lib.rs b/crates/lox-comms/src/lib.rs deleted file mode 100644 index 31f432b8..00000000 --- a/crates/lox-comms/src/lib.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod antennae;