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

Camera flyto fix #9498

Merged
merged 6 commits into from
Apr 27, 2021
Merged

Camera flyto fix #9498

merged 6 commits into from
Apr 27, 2021

Conversation

kalosma
Copy link
Contributor

@kalosma kalosma commented Apr 20, 2021

Fix for bug #9497

The camera flyTo is not properly working when using a generic ellipsoid, for example a lunar one (ellipsoid radius: 1737400).
The final cartographic camera position is the one in WGS84 ellipsoid.

The problem is visible in the following sandcastle example.
The flyTo destination position is set to
(1737500, 0, 0)
The final camera position when the flyTo finishes is
(6378237, 0, 0)

Sandcastle example:
sandcastle

@cesium-concierge
Copy link

Thanks for the pull request @kalosma!

  • ✔️ Signed CLA found.
  • CHANGES.md was not updated.
    • If this change updates the public API in any way, please add a bullet point to CHANGES.md.
  • ❔ Unit tests were not updated.
    • Make sure you've updated tests to reflect your changes, added tests for any new code, and ran the code coverage tool.

Reviewers, don't forget to make sure that:

  • Cesium Viewer works.
  • Works in 2D/CV.
  • Works (or fails gracefully) in IE11.
@ebogo1
Copy link
Contributor

ebogo1 commented Apr 22, 2021

Thanks @kalosma! This change looks good to me. Could you please a unit test for this in CameraFlightPathSpec.js to test that camera properties are set as expected with the new change? CHANGES.md should be updated as well to indicate the bug fix.

cc @lilleyse

@kalosma
Copy link
Contributor Author

kalosma commented Apr 23, 2021

@ebogo1 thanks for looking into this. I added the new test and updated CHANGES.md. Please let me know if anything else is needed

Copy link
Contributor

@ebogo1 ebogo1 left a comment

Choose a reason for hiding this comment

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

I verified that these changes work in Sandcastle and that the build will pass on CesiumJS master. Just a couple small tweaks and this should be good to go!

CHANGES.md Outdated Show resolved Hide resolved
Specs/Scene/CameraFlightPathSpec.js Show resolved Hide resolved
kalosma and others added 2 commits April 26, 2021 11:27
Co-authored-by: Eli Bogomolny <31491650+ebogo1@users.noreply.github.com>
@kalosma
Copy link
Contributor Author

kalosma commented Apr 26, 2021

Thanks @ebogo1! All changes should be in now. Let me know if I need to change anything else

@ebogo1
Copy link
Contributor

ebogo1 commented Apr 27, 2021

Looks good, thanks @kalosma!

@ebogo1 ebogo1 merged commit 6d94a1e into CesiumGS:master Apr 27, 2021
@kalosma kalosma deleted the camera-flyto-fix branch May 24, 2021 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants