Geo-Spline

 view release on metacpan or  search on metacpan

README.md  view on Meta::CPAN

      print "Lat:", $_->{"lat"}, ", Lon:", $_->{"lon"}, "\n";
    }

# DESCRIPTION

This program was developed to be able to calculate the position between two GPS fixes using a 2-dimensional 3rd order polynomial spline.

    f(t)  = A + B(t-t0)  + C(t-t0)^2 + D(t-t0)^3 #position in X and Y
    f'(t) = B + 2C(t-t0) + 3D(t-t0)^2            #velocity in X and Y

I did some simple Math (for an engineer with a math minor) to come up with these formulas to calculate the unknowns from our knowns.

    A = x0                                     # when (t-t0)=0 in f(t)
    B = v0                                     # when (t-t0)=0 in f'(t)
    C = (x1-A-B(t1-t0)-D(t1-t0)^3)/(t1-t0)^2   # solve for C from f(t)
    C = (v1-B-3D(t1-t0)^2)/2(t1-t0)            # solve for C from f'(t)
    D = (v1(t1-t0)+B(t1-t0)-2x1+2A)/(t1-t0)^3  # equate C=C then solve for D

# CONSTRUCTOR

## new



( run in 0.422 second using v1.01-cache-2.11-cpan-26ccb49234f )