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

adding a method to retrieve pitch, roll and heading from a quaternion #4047

Merged
merged 19 commits into from
Oct 20, 2016

Conversation

kaktus40
Copy link
Contributor

No description provided.


return HeadingPitchRoll;
});

Copy link
Contributor

Choose a reason for hiding this comment

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

Minor, but can you remove the extra blank lines?

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 25, 2016

Can you add the following functions and unit tests for them?

  • HeadingPitchRoll.clone
  • HeadingPitchRoll.equals
  • HeadingPitchRoll.equalsEpsilon
  • HeadingPitchRoll.prototype.clone
  • HeadingPitchRoll.prototype.equals
  • HeadingPitchRoll.prototype.equalsEpsilon
  • HeadingPitchRoll.prototype.toString

For simple examples, see Cartesian2.

'./defaultValue',
'./defined',
'./DeveloperError',
'./freezeObject',
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove freezeObject and defineProperties; they are not used.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 25, 2016

It would be cool to update the 3D Models Sandcastle example (here and here) to show how to rotate the aircraft model using heading, pitch, and roll.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 25, 2016

@bagnell can you take a quick look at the math?

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 25, 2016

@kaktus40 thanks again for this pull request; I think a lot of users will benefit from this new class, especially when they want to rotate a model in an intuitive way.

Most of the comments were just minor style things; you can check out the Cesium Coding Guide for more details.

@kaktus40
Copy link
Contributor Author

For the sandCastle examples, I think I'll need this pull and my previous pull. For example in this line, I could use aircraftHeadingPitchRollQuaternion instead of headingPitchRollQuaternion.

@bagnell
Copy link
Contributor

bagnell commented Jun 27, 2016

@pjcozzi Looks OK to me.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 28, 2016

For the sandCastle examples, I think I'll need this pull and my previous pull. For example in this line, I could use aircraftHeadingPitchRollQuaternion instead of headingPitchRollQuaternion.

I just merged #4048 so you should be able to merge in master and then make this example.

Also, I just realized that it would be better for the new Transforms functions to take a HeadingPitchRoll instance instead of separate heading, pitch, and roll parameters. Can you please make that change in this pull request?

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 29, 2016

@kaktus40 sorry for the short notice, but the Cesium 1.23 release is on Friday. Do you think you could make this change in the next day? Otherwise, I have to mark the new Transform functions as private to avoid a later breaking change. Thanks!

Also, I just realized that it would be better for the new Transforms functions to take a HeadingPitchRoll instance instead of separate heading, pitch, and roll parameters. Can you please make that change in this pull request?

@kaktus40
Copy link
Contributor Author

Sorry I can't work on it until next week. In paralells, I search a little use case if you have any idea?

Le 29/06/2016 23:09, Patrick Cozzi a écrit :

@kaktus40https://github.com/kaktus40 sorry for the short notice, but the Cesium 1.23 release is on Friday. Do you think you could make this change in the next day? Otherwise, I have to mark the new Transform functions as private to avoid a later breaking change. Thanks!

Also, I just realized that it would be better for the new Transforms functions to take a HeadingPitchRoll instance instead of separate heading, pitch, and roll parameters. Can you please make that change in this pull request?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com//pull/4047#issuecomment-229489523, or mute the threadhttps://github.com/notifications/unsubscribe/AF0OfB5QdLA7vGD6Y8QDcPv47MwnE2MMks5qQt75gaJpZM4I-Yld.

@kaktus40
Copy link
Contributor Author

kaktus40 commented Jul 9, 2016

I added a sandCastle example in development gallery. I need a little help for this example. It uses an keypressed event listener on html document but when the example is launched, it doesn't have the focus also the event listener is useless. In order to work, you have to get the focus on the cesium container (fullscreen, focus on a checkbox used in the example or make a focus on the geocoder). Any ideas?

@kaktus40
Copy link
Contributor Author

kaktus40 commented Jul 9, 2016

That's strange, with jasmine in my navigator, I didn't have errors.

@kaktus40
Copy link
Contributor Author

kaktus40 commented Jul 9, 2016

I have some error with makeZipFile command

[14:11:49] Error: Command failed: /bin/sh -c npm run requirejs -- --eyJ3cmFwIjp0cnVlLCJ1c2VTdHJpY3QiOnRydWUsIm9wdGltaXplIjoibm9uZSIsIm9wdGltaXplQ3NzIjoic3RhbmRhcmQiLCJwcmFnbWFzIjp7ImRlYnVnIjp0cnVlfSwiYmFzZVVybCI6IlNvdXJjZSIsInNraXBNb2R1bGVJbnNlcnRpb24iOnRydWUsIm5hbWUiOiIuLi9ub2RlX21vZHVsZXMvYWxtb25kL2FsbW9uZCIsImluY2x1ZGUiOiJtYWluIiwib3V0IjoiQnVpbGQvY29tYmluZU91dHB1dC9ub25lL0Nlc2l1bS5qcyJ9 --silent

* @param {Number} [pitch=0.0] The pitch component in radians.
* @param {Number} [roll=0.0] The roll component in radians.
*/
var HeadingPitchRoll = function(heading, pitch, roll) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Use the more concise function HeadingPitchRoll syntax here. We use to use var to workaround a Jasmine bug that has been fixed.

@kaktus40
Copy link
Contributor Author

Hello, sorry for my heaviness but is there any news about a new review of this pull?

@hpinkos
Copy link
Contributor

hpinkos commented Aug 23, 2016

Thank you for your patience @kaktus40. We want to get better at reviewing pull requests in a more timely manner.

@pjcozzi @bagnell what's the status here? This is functionality that is requested with some frequency on the forum so it would be nice to get merged in.

@kaktus40 in the meantime, please merge in master when you get a chance. thanks!

@kaktus40
Copy link
Contributor Author

Hello @hpinkos , what do you mean by merging in master? Do you mean in my repository?

@hpinkos
Copy link
Contributor

hpinkos commented Aug 24, 2016

Yes, you need to sync the master branch in your fork with our master branch. Then merge your master into your branch. Right now there are conflicts so we can't merge your branch until you're synced up.

Here are some instructions for syncing a fork: https://help.github.com/articles/syncing-a-fork/

Thanks!

@kaktus40
Copy link
Contributor Author

Ok it's done. Conflicts only in the CHANGES.md.

@hpinkos
Copy link
Contributor

hpinkos commented Sep 13, 2016

@kaktus40 sorry we haven't gotten back to you yet, we have some people out on vacation and we've been pretty busy around here lately. We have a bug bash coming up in October, and I've labeled this PR for the bug bash so we will definitely be able to review it then, if not sooner. Thanks!

@kaktus40
Copy link
Contributor Author

Ok no problem.
I'm working on a PR for calculating polygon area. I worked with algorithm edited here
Have you any suggestion for this PR? For example is it a good place for the function (into polygonGraphics)?

@hpinkos
Copy link
Contributor

hpinkos commented Sep 13, 2016

Something like that would be a stand-alone function. I don't think area is something we would want tied into the entities layer.
I'm honestly not sure if polygon area is something we would merge into the main code base. Cesium is primarily a rendering engine so we might not want to add analysis tools in the core Cesium library.
However, I'm sure people would appreciate it if you wanted to share it on the forum. It's definitely a frequently asked question

@kaktus40
Copy link
Contributor Author

Ok I'll cancel this pull.

@bagnell
Copy link
Contributor

bagnell commented Oct 19, 2016

This looks good to me. The development example doesn't work in Chrome for me, but it does work in Firefox. It looks like mostly whitespace issues and an update to CHANGES.md remain.

@pjcozzi Do you want to do another review?

@pjcozzi
Copy link
Contributor

pjcozzi commented Oct 19, 2016

@kaktus40 I'm going to finish the review for this now.

For polygon area, do you need to roll a new algorithm or could you use http://turfjs.org/?

@pjcozzi
Copy link
Contributor

pjcozzi commented Oct 19, 2016

@kaktus40 the tests pass and the Sandcastle example looks great, but the controls did not work for me in Chrome or Firefox (running Mac) even after setting focus to the canvas or running fullscreen. Do they work for you?

Also, would you be able to update CHANGES.md (just move your changes to the 1.27 section) and merge in master?

@kaktus40
Copy link
Contributor Author

I didn't use turf for calculating the area of a polygon. I used the algorithms defined here. I wrote the most precise and algorithm and the approximate algorithm.
I test the example on firefox, it's ok. On chromium, it's KO. I don't know how to capture the focus in the window in order trigger the keyboard event.
Anyway. I updated the CHANGES.md.

@pjcozzi
Copy link
Contributor

pjcozzi commented Oct 19, 2016

I test the example on firefox, it's ok. On chromium, it's KO. I don't know how to capture the focus in the window in order trigger the keyboard event.

Sorry, I'm not following. Do the keyboard options work for you? If not, perhaps you could replace them with buttons like other Sandcastle examples or look at the Camera Tutorial example that uses key input.

Anyway. I updated the CHANGES.md.

Thanks. Can you please also merge master from this repo into your branch so the final merge is smooth?

@kaktus40
Copy link
Contributor Author

I changed the key event in the example and it's now ok for me in chromium. I just merge changes.md

@pjcozzi
Copy link
Contributor

pjcozzi commented Oct 20, 2016

Thanks again @kaktus40 for this nice contribution and working with us on the review.

I'm going to do a few tweaks/fixes to the Sandcastle example and will open a separate PR in a few minutes.

@pjcozzi
Copy link
Contributor

pjcozzi commented Oct 20, 2016

@hpinkos can you please update any forum threads if folks were asking for this?

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.

5 participants