MCPcopy Create free account
hub / github.com/AdaCompNUS/summit / apply_sun_presets

Function apply_sun_presets

PythonAPI/util/weather.py:33–41  ·  view source on GitHub ↗

Uses sun presets to set the sun position

(args, weather)

Source from the content-addressed store, hash-verified

31
32
33def apply_sun_presets(args, weather):
34 """Uses sun presets to set the sun position"""
35 if args.sun is not None:
36 if args.sun in SUN_PRESETS:
37 weather.sun_altitude_angle = SUN_PRESETS[args.sun][0]
38 weather.sun_azimuth_angle = SUN_PRESETS[args.sun][1]
39 else:
40 print("[ERROR]: Command [--sun | -s] '" + args.sun + "' not known")
41 sys.exit(1)
42
43
44def apply_weather_presets(args, weather):

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected