Fix observing_night_quality: use topo_elevation() accessor, not .elevation composite
This commit is contained in:
parent
ae8deae67e
commit
76b4e449c7
@ -85,8 +85,8 @@ BEGIN
|
||||
illum := moon_illumination(astro_dusk);
|
||||
IF illum > 0.75 THEN
|
||||
-- Check if Moon is above horizon during darkness
|
||||
moon_up := (moon_observe($1, astro_dusk)).elevation > 0
|
||||
OR (moon_observe($1, astro_dusk + (astro_dawn - astro_dusk) / 2)).elevation > 0;
|
||||
moon_up := topo_elevation(moon_observe($1, astro_dusk)) > 0
|
||||
OR topo_elevation(moon_observe($1, astro_dusk + (astro_dawn - astro_dusk) / 2)) > 0;
|
||||
IF moon_up THEN
|
||||
score := score - (illum * 30)::int; -- Up to -30 for full moon
|
||||
END IF;
|
||||
|
||||
@ -1759,8 +1759,8 @@ BEGIN
|
||||
illum := moon_illumination(astro_dusk);
|
||||
IF illum > 0.75 THEN
|
||||
-- Check if Moon is above horizon during darkness
|
||||
moon_up := (moon_observe($1, astro_dusk)).elevation > 0
|
||||
OR (moon_observe($1, astro_dusk + (astro_dawn - astro_dusk) / 2)).elevation > 0;
|
||||
moon_up := topo_elevation(moon_observe($1, astro_dusk)) > 0
|
||||
OR topo_elevation(moon_observe($1, astro_dusk + (astro_dawn - astro_dusk) / 2)) > 0;
|
||||
IF moon_up THEN
|
||||
score := score - (illum * 30)::int; -- Up to -30 for full moon
|
||||
END IF;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user