// $Header: https://oberon.oapd.inaf.it/shins/trunk/shins/src/util/defaults.hpp 3944 2022-05-11 13:51:01Z depa $

#ifndef _SHINS_DEFAULTS_
#define _SHINS_DEFAULTS_
#include <string>
#include <cstring> // std::memcpy

// defaults values used across SHINS.
// change these values, re-build SHINS.
namespace shins
{
namespace util
{
namespace defaults
{
const int sashaXMin = 1;
const int sashaXMax = 2048;
const int sashaYMin = 1;
const int sashaYMax = 2048;
//////////////////
// TIPTILT_CTRL //
//////////////////
const bool saveAllFrames = true;
const bool jumboEnabled  = false;
const bool loopEnabled   = false;
const bool PXtoDSM       = true;
const unsigned int decimationFactor = 0;

const float centroidGainX = -4.249796; // 8.957422e+00;
const float centroidGainY = 3.7651188; // 8.970333e+00;
// const float centroidOriginX[5] = {-1.968234e-01, -1.968234e-01, 2.077437e-01, 2.077437e-01, 0};
// const float centroidOriginY[5] = {-1.968234e-01, -1.968234e-01, 2.077437e-01, 2.077437e-01, 0};
const float centroidOriginX[5] = {0.0, 0.0, -0.2953, -0.2953, 0};
const float centroidOriginY[5] = {0.0, 0.0, -0.2953, -0.2953, 0};
const float baseFreq = 106.25e+06;
const float boardFreq = (baseFreq / 7.) * 4.;
const float dspFreq = boardFreq * 4;
const int nSlopePixels = 16;
const int timeHistoryLen = 50000;
const int cRedRows = 512;
const int cRedCols = 640;

const int DMMaxPower = 15;

const int pixelMinThreshold = 300;
const int diagFrameDec = 0 + 0x80000000;
const int minCentroidValue = -2;
const int maxCentroidValue = +2;
const int minTTCommandValue = -5;
const int maxTTCommandValue = +5;
const int modesVectorLen = 30;

const std::string MACws = "4C:D9:8F:A0:22:44";
const std::string IPws  = "192.168.61.113"; // HEX: C0.A8.3D.71
const int PORTws = 8001; // 1f41


////////////////
// TRACK_CTRL //
////////////////
const double DROT_TIMEOUT = 142.0;  // sec
const double DROT_HOME    = 0;      // steps
const double ADCOFFSET    = 0.503;  //
const double PSLOPE       = 6.3e-4; // arcsec/mbar
const double PBIAS        = 733;    // mbar
const double TSLOPE       = 1.8e-3; // arcsec/K
const double TBIAS        = 273;    // K

}
}
}
#endif
