/** * An Ellipsoid instance initialized to the standard Mars Sphere.
* @member of Ellipsoid */
Ellipsoid.MARSSPHE = freezeObject(new Ellipsoid(3396000.0, 3396000.0, 3396000.0));
There are many places in Cesium where it defaults to Earth's WGS84 when no ellipsoid is provided so chances are Cesium is still using WGS84 in some places.
A reasonable test/workaround would be to just change what Cesium thinks is WGS84. You will not have to explicitly pass around ellipsoids everywhere and since you're application is dealing only with Mars there is no conflicts.
https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Core/Ellipsoid.js#L224
//Your applications javascript file.
var marsEllipsoid = new Cesium.Ellipsoid(3396000.0, 3396000.0, 3396000.0);
var viewer = new Cesium.Viewer('cesiumContainer', {
mapProjection: new Cesium.GeographicProjection(marsEllipsoid),
..
..
..
});
viewer = new Viewer('cesiumContainer', {
mapProjection: new GeographicProjection(Ellipsoid.MARSIAU2000),
globe : new Globe(Ellipsoid.MARSIAU2000),
baseLayerPicker : false,
imageryProvider : imageryProvider,
terrainProvider : new EllipsoidTerrainProvider({ellipsoid: Ellipsoid.MARSIAU2000}),
skyAtmosphere: false,
});
I'm sure people would love to see some screenshots of your application when you're done.