twilight2angle function

twilight argument check and conversion