The recently introduced feedback particle filter (FPF) is a control-oriented particle filter (PF) aimed at estimation of nonlinear/non-Gaussian systems. The FPF controls each particle using feedback from the measurements and is resampling free, which is in contrast to conventional PFs based on importance sampling. The control gains are computed by solving boundary value problems. In general, numerical approximations are required and it is an open question how to properly compute the approximate solution. This paper outlines a novel method inspired by high-dimensional data-analysis techniques. Based on the time evolution of the particle cloud, we compute values of the gain function for each particle. We exemplify applicability and highlight the benefit of the approach on a planar two-body problem.