Пример #1
0
void FillLinearTrajectory(Position<F> const& initial,
                          Velocity<F> const& velocity,
                          Instant const& t0,
                          Time const& Δt,
                          int const steps,
                          not_null<T<F>*> const trajectory) {
  for (int i = 0; i < steps; ++i) {
    Time const iΔt = i * Δt;
    Displacement<F> const displacement_i = velocity * iΔt;
    trajectory->Append(t0 + iΔt,
                       DegreesOfFreedom<F>(initial + displacement_i,
                                           velocity));
  }
}