Skip to content

Commit

Permalink
Move conversions to sub-module
Browse files Browse the repository at this point in the history
  • Loading branch information
iancleary committed Jan 17, 2024
1 parent f4a5f4f commit b010615
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 3 deletions.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions src/conversions/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pub mod angle;
pub mod frequency;
File renamed without changes.
4 changes: 2 additions & 2 deletions src/fspl.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use crate::frequency::frequency_to_wavelength;
use crate::conversions::frequency::frequency_to_wavelength;
use std::f64::consts::PI;

pub fn calculate_slant_range(elevation_angle_degrees: f64, altitude: f64, body_radius: f64) -> f64 {
let elevation_angle_radians: f64 =
crate::conversions::degrees_to_radians(elevation_angle_degrees);
crate::conversions::angle::degrees_to_radians(elevation_angle_degrees);
let total_radius: f64 = altitude + body_radius;

let total_radius_ratio: f64 = total_radius / body_radius;
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
pub mod constants;
pub mod conversions;
pub mod frequency;
pub mod fspl;
pub mod noise;
pub mod orbits;

0 comments on commit b010615

Please sign in to comment.