1. A concise explanation of the problem you’re experiencing.
If I create a Cartesian3 point and I convert it to Cartographic, the longitude and latitude do not appear to be correct. This happens for every set of points I’ve tried.
2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.
const point = Cesium.Cartesian3.fromDegrees(-53.09, -10.78, 0);
const earth = this.cesiumViewer.scene.globe.ellipsoid;
const pointLatLon = earth.cartesianToCartographic( point );
console.log( ‘pointLatLon.longitude’, pointLatLon.longitude ); //-0.9265952998837899
console.log( ‘pointLatLon.latitude’, pointLatLon.latitude );//1.070235897322923
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
I am trying to draw arcs to demonstrate bi-directional data. I plan on getting the midpoint, and using the meter distance and radial distance to get a consistent tilt of the arc in one way or the other so instead of the arcs being seen from above as a straight line, |, the arcs will look like an elipse, (). If I can get the midpoint, I can then get a perpendicular line to the arc, and move alone that line to get a perfect elipse.
4. The Cesium version you’re using, your operating system and browser.
“cesium”: {
“version”: “1.44.0”,
“resolved”: “https://registry.npmjs.org/cesium/-/cesium-1.44.0.tgz”,
“integrity”: “sha512-C9Tv0PivQHIQwZntcIsa4s6Z71sOxRbt8NyeZHCXozCt2oAexci4PbXc2QY8aZzyk8P+m/CNfdQsOgsK0Pd+Yg==”,
“dev”: true,
“requires”: {
“requirejs”: “2.3.5”
}
},
Mac OS 10.13.1
Google Chrome
Version 65.0.3325.181 (Official Build) (64-bit)