After I load a datasource how do I get its position information?

I have a data source that I am loading:

dataSource.load(parser.parseFromString(kml, "text.xml"), name).then(function(dataSource){
    var enitites = dataSource.entities.values;
    for(var i = 0; i < entities.length; i++) {
        var entity = entities[i];
        console.log(entity.position); // this returns an object that has Cartesian3 info, see below
    }
}

The object written to the console is lengthy:

ScaledPositionProperty {_definitionChanged: Event, _value: ConstantPositionProperty, _removeSubscription: function, getValue: function, setValue: function…}_
    _definitionChanged: Event
    _removeSubscription: function () {
    _value: ConstantPositionProperty
        _definitionChanged: Event
        _referenceFrame: 0
        _value: Cartesian3
             x: -214875.50110362846
             y: -5608068.214255967
             z: 3020355.876481625

There is more here, but I think this is all that's necessary to answer the question.

I need to pass the position information to another function but every combination that I have tried does not allow me to get the Cartesian3 data to pass along. Am I missing something obvious?

It’s touched on briefly at the end of the Visualizing Spatial Data tutorial, but we definitely need more explanation (which is planned for part 2 when I get time to write it).

If you look at the documentation for Entity.position, you’ll see it’s type is PositionProperty which is itself a type of Property. Properties don’t have to have a single value, they can represent data as it changes over time. In order to retrieve the value at a given time, you simply call getValue with the time.

var position = entity.position.getValue(time);

Event a ConstantPositionProperty requires a time, because depending on how the position is defined, a value that is constant in one reference frame may not be constant in an another. Usually you pass in the current scene time, but you can query data at any time the property has values for.