#[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 valhalla_bias =
if (5.0..=25.0).contains(&latitude_deg) && (-20.0..=20.0).contains(&longitude_deg) {
-3_200.0
} else {
0.0
};
let asgard_bias =
if (-35.0..=-15.0).contains(&latitude_deg) && (120.0..=160.0).contains(&longitude_deg) {
-1_800.0
} else {
0.0
};
let wave = latitude_deg.to_radians().sin() * 400.0 + longitude_deg.to_radians().cos() * 300.0;
ElevationSample {
latitude_deg,
longitude_deg,
elevation_m: valhalla_bias + asgard_bias + wave,
}
}