What kind of Coordinate system is Cesium using?

I am loading a KML file into Cesium and trying to load the KML point position by clicking on it. I am using the code below to get the coordinate:

var handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas); handler.setInputAction(function(click) {

var pickedObject = viewer.scene.pick(click.position);
var positionUnformat = pickedObject.id.position.getValue(viewer.clock.currentTime);

}, Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK);

However, the coordinate i got from this code seems like to be different from what is actually written in the KML file. It is not the true position and altitude of the real world. How can I get the position coordinate correct? Or I have to transform the value to get the right answer?

Cesium uses radians by default for angular measurements. You'll need to convert the coordinates you see using Cesium.Math.toDegrees(yourRad)

The position you are getting is in Earth-fixed Cartesian coordinates, so those numbers are in meters. You can easily convert this to longitude/latitude/height. See the “Show Cartographic Position on Mouse Over” example for the details: http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Picking.html&label=Showcases

Hi Matthew,
Thanks for your answer. I can get the proper longitude and latitude right now, however I still can not get the correct altitude. The value of the altitude is always zero. Do I have to load the height map by setting something before I can get the value of KML file altitude?

Is the data being clamped to the ground? Otherwise the height should be correct. If it’s being clamped, then the value is expected to be 0. Can you post the Placemark snippet and style from the KML file?

Yes, here is the whole part of the KML file omitted the description part:

<kml xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://www.opengis.net/kml/2.2">
  <Document>
    <Folder>
      <name>BusinessRule1</name>
      <Style id="BR1Stl">
        <IconStyle>
          <Icon>
            <href>blackcircle.png</href>
          </Icon>
          <scale>0.7</scale>
        </IconStyle>
        <LabelStyle>
          <scale>0.8</scale>
        </LabelStyle>
      </Style>
      <Placemark id="103215">
        <name>51-AIRPORTSGIS-103215</name>
        <styleUrl>#BR1Stl</styleUrl>
        <description>....</description>
        <Point>
          <altitudeMode>absolute</altitudeMode>
          <coordinates>-76.43594397,36.77823129,33.3030576</coordinates>
          <extrude>1</extrude>
        </Point>
      </Placemark>
    </Folder>
  </Document>
</kml>

Is the data clamped to the ground? How can I know that?

absolute indicates that the data is not to be clamped to the ground. See this for more information.

Scott