#[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 hamlet_bias =
if (-30.0..=-10.0).contains(&latitude_deg) && (20.0..=60.0).contains(&longitude_deg) {
-2_400.0
} else {
0.0
};
let mommur_bias = if latitude_deg > 60.0 { -800.0 } else { 0.0 };
let wave = latitude_deg.to_radians().sin() * 300.0 + longitude_deg.to_radians().cos() * 200.0;
ElevationSample {
latitude_deg,
longitude_deg,
elevation_m: hamlet_bias + mommur_bias + wave,
}
}