Lets say we have an array with the length of n=7, the height of the tree should be 2. I wouldn't count the height by the number of rows but connections between them.
(I think that because in the heapsort algorithm the Siftdown Method says that the last row as a height of 0 it can travel and the row before can travel height of 1, so 2 rows in a tree would allow height 1 to travel.)
So to get the height I would calculate log2(allNodesInTheBottomRow) which is (n+1)/2.
Is log2((n+1)/2) correct?.
Here, an example:

