#ifndef POINTINGINTERPOLATIONTVI_H_
#define POINTINGINTERPOLATIONTVI_H_
#include <casacore/casa/aips.h>
#include <casacore/casa/Containers/Record.h>
#include <msvis/MSVis/VisibilityIterator2.h>
#include <msvis/MSVis/ViImplementation2.h>
#include <msvis/MSVis/TransformingVi2.h>
#include <casacore/measures/Measures/MDirection.h>
class PointingInterpolationTVI : public TransformingVi2 {
using PointingTimes = Vector<Double>;
using PointingDir = Vector<Double>;
using PointingDirs = Vector<PointingDir>;
enum class InterpMethod {
void setInterpMethod(InterpMethod method);
InterpMethod getInterpMethod() const;
void setData(const Vector<PointingTimes> &antsTimes,
const Vector<PointingDirs> &antsDirs,
const Vector<bool> &antSelected);
Vector<Double> pointingDir(int ant,double time) const;
double nearestPointingTimeStamp() const;
void init(const Vector<bool> &antSelected = Vector<bool>());
using SplineSegmentCoeffs = Vector<Double>;
using DirSegmentCoeffs = Vector<SplineSegmentCoeffs>;
using SplineCoeffs = Vector<DirSegmentCoeffs>;
void computeSplineCoeffs(const PointingTimes& timeStamps,
const PointingDirs& dirs,
Vector<PointingTimes> antsTimes_;
Vector<bool> isSelected_;
Vector<bool> isInterpolated_;
Vector<SplineCoeffs> antsSplinesCoeffs_;