I believe there is an error in the Apoapsis calculation.
I tried the calculation on a synchronous kerbin orbit with 4 satellites.
Apoapsis from the calculation results an Apoapsis of 3,974,352.2 m
but this value is incorrect, since if I check the period with T = (2 * Pi / SQRT (u)) * a ^ 3/2 (https://en.wikipedia.org/wiki/Elliptic_orbit)
where a is the Apoapsis, and result T <> Tcalc.
The corrected Apoapsis is 3,418,843 m.
Is my reasoning correct?
I'm sorry for my english