code: function getHeightValue(data, recordIndex, heightIndex) {
    if (recordIndex > 720) {
      recordIndex = 720;
    } else if (recordIndex < 0) {
      recordIndex = 0;
    }
  
    if (heightIndex > 1439) {
      heightIndex -= 1440;
    } else if (heightIndex < 0) {
      heightIndex += 1440;
    }
  
    return data[recordIndex * 1440 + heightIndex];
  }
docs: Heights returned by this function are in centimeters.