How to get current data index

Hello :smiley:
I have successfully implemented the tutorial on how to build a flight tracker. I would like to be able to access the index of the data at a current time in my app. In other words, when cesium is showing the animation of the airplane following the flight path, how can I get the current index that the airplane is at? (the index of my data).

Im using Resium. btw.

    style={{ border: "10px solid green" }}
    position={positionProperty} // this uses the SampledPositionProperty how can I know at what point of the position sample are we?
    // Automatically compute the orientation from the position.
    orientation={new VelocityOrientationProperty(positionProperty)}
    model={{ uri: model, minimumPixelSize: 100, maximumScale: 100.0 }}
      new PathGraphics({
        width: 3,
        material: Color.fromCssColorString("#202025"),
      new TimeIntervalCollection([
        new TimeInterval({ start: start, stop: stop }),

I hope this makes sense. Iā€™m happy to explain further :slight_smile: Thank you so much for your time.