how to solve linear curve fitting by casting it as a minimization problem



Hello,

I'm wondering if anybody can help me with this problem. Let's first
limit ourselves to only the first quadrant of a Cartesian coordinate
system. I have a point G that's located on the x-axis, and it's
position (x_G, 0) is known (x_G>0). Now, I have four points A, B, C,
and D in this quadrant. I know these points are on a straight line
(call it AD). This line has some arbitrary slope. I also know the four
distances GA, GB, GC, and GD. Moreover, these four distances are
periodically sampled, meaning that AB=BC=CD. However, I do not know
the coordinates of these four points in the Cartesian system (denoted
as (x_A, y_A), (x_B, y_B), (x_C, y_C), (x_D, y_D), respectively).

I want to find the slope of the line AD in the Cartesian system.
The way I'm thinking about doing is to cast this as a minimization
problem to find the points' coordinates. That way, the traejctory
slope is simply = (y_A - y_B) / (x_A - x_B).

However, I'm not sure how to formulate the minimization (what
should be the objective function, and what should be the constraint
function). Can anyone help me with this? Thanks in advance.
.