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 f88460d
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 4 deletions.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions src/conversions/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pub mod angle;
pub mod frequency;
pub mod noise;
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
2 changes: 0 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
pub mod constants;
pub mod conversions;
pub mod frequency;
pub mod fspl;
pub mod noise;
pub mod orbits;

0 comments on commit f88460d

Please sign in to comment.