21 #ifndef otbLagrangianOrbitInterpolator_h
22 #define otbLagrangianOrbitInterpolator_h
54 std::vector<Orbit>
const& orbits,
55 unsigned int polynomial_degree = 8)
80 for (std::size_t nBegin = 0; nBegin < nLast ; ++nBegin)
86 for (std::size_t offset_i=0; offset_i < offset_max ; ++offset_i)
88 std::ptrdiff_t i = offset_i + nBegin;
89 assert(i < std::ptrdiff_t(nLast));
93 unsigned int j = nBegin;
97 auto const den = t_i -
m_orbits[j].time;
98 assert(den.NumberOfTicks() != 0);
99 w *= den.NumberOfTicks();;
101 for( ++j ; j < nEnd; ++j)
104 auto const den = t_i -
m_orbits[j].time;
105 assert(den.NumberOfTicks() != 0);
106 w *= den.NumberOfTicks();;
111 m_inv_den(
unsigned(nBegin),
unsigned(offset_i)) = 1.0 / w;
117 TimePoint time, std::size_t nBegin, std::size_t nEnd)
const
121 assert(nBegin < nEnd);
124 std::array<double, 30> td1s;
125 for(
unsigned int i = nBegin; i < nEnd; ++i)
127 td1s[i-nBegin] = (time -
m_orbits[i].time).NumberOfTicks();
133 for(
unsigned int i = nBegin; i < nEnd; ++i)
136 std::size_t j = nBegin;
142 for( ; j < nEnd; ++j)
146 auto const den =
m_inv_den(std::ptrdiff_t(nBegin), std::ptrdiff_t(i-nBegin));
173 #endif // otbLagrangianOrbitInterpolator_h