#ifndef DBSSCANHELPER_H_
#define DBSSCANHELPER_H_


class DbsScanHelper
{
public:

  struct dbs_scan_sector_t
  {
    bool valid;
    int bar_num;
    float half_width;
    float abs_half_width;
    float center;
    float el;

    float ext_lim;
    float int_lim;

    float hard_ext_lim;
    float hard_int_lim;

    float factor;
    float map_ref_time;
  };

  struct dbs_scan_volume_t
  {
    bool valid;
    bool tooSlow;
    const char* invMsg;
    float platform_azimuth;
    float ground_track;
    float dirft;

    int side;
    bool clear;

    dbs_scan_sector_t fullVolume;
    dbs_scan_sector_t b[2];

  };

  void initialize();

  void set_sector(dbs_scan_sector_t& s, float center, float ext_limit, float int_limit);

  bool calculateNewScan(dbs_scan_volume_t& volume, float scan_center_cmd, float scan_width, float ptaz, float vx, float vy, float vz);

  static DbsScanHelper& instance();

  static bool dfeMaster();

  dbs_scan_volume_t& scanVolume();
};


#endif /*DBSSCANHELPER_H_*/

