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

Earth-centered view in ICRF frame #825

Open
emackey opened this issue Jun 1, 2013 · 4 comments
Open

Earth-centered view in ICRF frame #825

emackey opened this issue Jun 1, 2013 · 4 comments

Comments

@emackey
Copy link
Contributor

emackey commented Jun 1, 2013

There should be a way to get a view similar to the Home view, centered on the Earth, in the ICRF frame instead of Earth-fixed.

@mramato
Copy link
Contributor

mramato commented Jun 1, 2013

The code to do this is actually trivial (see the below snippet). But I'm not sure how we would implement it in widget form (because it's not a one-off thing and depends on state). It's also highly specific to space-based visualization, so I'm not sure the majority of people would care. It's certainly something Cesium Viewer will be able to do at some point, but the new Viewer widget will probably not. It's also probably going to be part of a larger system and not just a click button for "inertial view". That being said, I'm just thinking out loud and open for ideas.

//Put this in an onTick callback and execute every frame.
var mode = this.scene.mode;
var camera = this.scene.getCamera();
if (mode === SceneMode.SCENE3D) {
  this.icrfTransform = Transforms.computeIcrfToFixedMatrix(currentTime, this.icrfTransform);
  if (typeof this.icrfTransform !== 'undefined') {
      Matrix4.fromRotationTranslation(this.icrfTransform, Cartesian3.ZERO, camera.transform);
  }
}

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 25, 2014

This is also in the Camera Sandcastle example now.

https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Apps/Sandcastle/gallery/Camera.html#L150

Should we close this?

@emackey
Copy link
Contributor Author

emackey commented Jun 27, 2014

Stored views depend on this. The code examples above have the 1 frame lag bug on the selectionIndicator.

@mramato
Copy link
Contributor

mramato commented Jun 27, 2014

There are also bugs in the sandcastle example (panning the mouse for instance). The only "real" way to add ICRF support is to build it into the camera itself. We had some discussion of this in #1789. I would leave this open until we have complete out of the box support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants