int get_dump_interval_in_frames(const ::npctransport_proto::Assignment& a,
                                double time_step) {
  int ret = get_frames_from_ns(a.dump_interval_ns(), time_step);
  IMP_LOG(VERBOSE, "dump interval = " << ret << " frames, "
            << a.dump_interval_ns() << " ns, time step " << time_step
            << std::endl);
  return ret;
}
Beispiel #2
0
int get_dump_interval_in_frames
(const ::npctransport_proto::Assignment& config, double time_step)
{
  const double fs_in_ns = 1000000;
  double ret =
    config.dump_interval_ns() *  fs_in_ns / time_step;
  if(ret == 0) ret = 1; // make sure at least every frame
  std::cout << "dump interval = " << std::ceil(ret) << " frames, "
            << config.dump_interval_ns() << " ns, time step " << time_step
            << std::endl;;
  return std::ceil(ret);
}