#[derive(Debug, Clone, Copy, PartialEq)]
pub struct ElevationSample {
pub latitude_deg: f64,
pub longitude_deg: f64,
pub elevation_m: f64,
}
pub fn sample_dem(latitude_deg: f64, longitude_deg: f64) -> ElevationSample {
let volcanic_bias =
if (10.0..=20.0).contains(&latitude_deg) && (300.0..=315.0).contains(&longitude_deg) {
-3_000.0
} else {
0.0
};
let mountain_bias =
if (-30.0..=-20.0).contains(&latitude_deg) && (120.0..=140.0).contains(&longitude_deg) {
12_000.0
} else {
0.0
};
let wave = latitude_deg.to_radians().sin() * 800.0 + longitude_deg.to_radians().cos() * 500.0;
ElevationSample {
latitude_deg,
longitude_deg,
elevation_m: volcanic_bias + mountain_bias + wave,
}
}