/****************************************************************************/
/* Copyright (c) 2018 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  : Power Buoy Controller Settings                                */
/* Filename : PbConSettings.hpp                                             */
/* Author   : Henthorn                                                      */
/* Project  : Power Buoy                                                    */
/* Version  : 1.0                                                           */
/* Created  : 05/04/2018                                                    */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/


// Just a simple way to maintain the pb controller settings and state
// between sessions
// 
class PbConSettings
{
public:

   PbConSettings(const char* filename = "./pbcon.cfg");
  ~PbConSettings();

   char *cfg_file;

   // Standard way to save and load the setting configuration
   // 
   int load(const char* filename);
   int save(const char* filename);

   // Range PID loop settings/state
   // 
   double rpid_kp;
   double rpid_ki;
   double rpid_kd;
   double rpid_min;
   double rpid_max;
   double rpid_target;

   // Depth PID loop settings/state
   // 
   double dpid_kp;
   double dpid_ki;
   double dpid_kd;
   double dpid_min;
   double dpid_max;
   double dpid_target;

   // Range Estimator initialization parameters/state
   // 
   double re_sigma;
   double re_cov1;
   double re_cov2;
   double re_force_slope;
   double re_force_offset;
};
