Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add UpdateTimeZoneFromLongitude to ACesiumSunSky #1590

Merged
merged 5 commits into from
Feb 2, 2025
Merged

Conversation

azrogers
Copy link
Contributor

Closes #1258. This PR adds a new method to ACesiumSunSky that updates the TimeZone property based on the given longitude. This is calculation is based on the simple formula of LongitudeInDegrees / 15.0, but this more or less approximates real time zones and when paired with solar time accomplishes the goal of "the sun should be at this position in the sky relative to the current location." UpdateTimeZoneFromLongitude can be called at runtime, but this change also makes it so that clicking "Place Georeference Origin Here" will automatically update the time zone based on the new longitude, reducing friction for new users.

@azrogers azrogers changed the title Add UpdateTimeZoneFromLongitude to ACesiumSunSky Add UpdateTimeZoneFromLongitude to ACesiumSunSky Jan 22, 2025
@kring kring added this to the February 2025 Release milestone Jan 31, 2025
@j9liu j9liu self-requested a review January 31, 2025 19:38
Copy link
Contributor

@j9liu j9liu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @azrogers ! I'll test this locally in a bit, just wanted to leave these comments earlier than later.

Source/CesiumRuntime/Public/CesiumSunSky.h Outdated Show resolved Hide resolved
Source/CesiumRuntime/Public/CesiumSunSky.h Outdated Show resolved Hide resolved
Source/CesiumRuntime/Private/CesiumGeoreference.cpp Outdated Show resolved Hide resolved
Source/CesiumRuntime/Public/CesiumSunSky.h Outdated Show resolved Hide resolved
CHANGES.md Outdated Show resolved Hide resolved
CHANGES.md Outdated Show resolved Hide resolved
@azrogers
Copy link
Contributor Author

@j9liu Incorporated those edits!

@kring
Copy link
Member

kring commented Feb 2, 2025

Thanks @azrogers!

@kring kring merged commit 43cbb03 into main Feb 2, 2025
23 checks passed
@kring kring deleted the sun-sky-time-zone branch February 2, 2025 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compute CesiumSunSky time zone from longitude
3 participants