View full-text article in PMC Sensors (Basel). 2023 Apr 19;23(8):4111. doi: 10.3390/s23084111 Search in PMC Search in PubMed View in NLM Catalog Add to search Copyright and License information © 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/). PMC Copyright notice Algorithm 4 Pseudocode for circle fit estimation 1:procedure CircleFit(iq, previous_circles) 2: n←Length(iq) 3: centroid_I,centroid_Q←Mean(iq) 4: i←Complex(iq)−centroid_I 5: q←Imag(iq)−centroid_Q 6: z←i2+q2 7: M←Covariance(i,q,z)/n 8: a←coefficients_characteristic_polynomial 9:loop: 10: y_new=a(1)+x_new∗(a(2)+x_new(a(3)+x_new∗a(4))) 11: x_new=x_old−y_newDy 12: if (x_new−x_old)/x_new<eps then 13: break 14: goto loop. 15: a,b,r←estimatedbyusingeigenvectorrelatedtorootx_new 16: a,b,r←[a+centroid,b+centroid,r] 17: previous_circles←runningbufferoverlast30estimatedcircles 18: a,b,r←Mean(previous_circles) 19: returna,b,r