ProcessTiltAngle.cc 3.62 KB
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/* 
 * File:   ProcessTiltAngle.cc
 * Author: hacene
 * 
 * Created on June 19, 2020, 10:32 AM
 */
#include <stdlib.h>
#include <string>

#include "Operation.hh"
#include "ParameterManager.hh"

#include "ParameterCreatorFromExpression.hh"
#include "ProcessTiltAngle.hh"
#include "TiltAngleCreator.hh"

namespace AMDA {
    namespace Parameters {
        
        // Tilte Angle

        ProcessTiltAngle::ProcessTiltAngle(Parameter &parameter) : SingleParamProcess_CRTP(parameter) {
        }

        ProcessTiltAngle::ProcessTiltAngle(const ProcessTiltAngle& pProcess, Parameter &parameter) : SingleParamProcess_CRTP(pProcess, parameter) {
        }

        ProcessTiltAngle::~ProcessTiltAngle() {
        }

        TimeStamp ProcessTiltAngle::init() {

            TimeStamp time = _parameterInput->init(this, _timeIntervalList);

            Parameter::InfoList lInfoList = _parameterInput->getInfoList();
            _parameter.getInfoList().insert(lInfoList.begin(), lInfoList.end());

            _paramInput = _parameterInput->getParamData(this).get();
            
            TiltAngleCreator lCreator(*this, *_paramInput, "tilt");

            _operation = lCreator.getOperation();

            _paramData = ParamDataSPtr(_operation->getParamOutput());

            _paramData->setMinSampling(_paramInput->getMinSampling());

            return time;
        }
          // Attitude GSE
        
             ProcessAttitudeGSE ::ProcessAttitudeGSE(Parameter &parameter) : SingleParamProcess_CRTP(parameter) {
        }

        ProcessAttitudeGSE::ProcessAttitudeGSE(const ProcessAttitudeGSE& pProcess, Parameter &parameter) : SingleParamProcess_CRTP(pProcess, parameter) {
        }

        ProcessAttitudeGSE::~ProcessAttitudeGSE() {
        }

        TimeStamp ProcessAttitudeGSE::init() {

            TimeStamp time = _parameterInput->init(this, _timeIntervalList);

            Parameter::InfoList lInfoList = _parameterInput->getInfoList();
            _parameter.getInfoList().insert(lInfoList.begin(), lInfoList.end());

            _paramInput = _parameterInput->getParamData(this).get();
            
            TiltAngleCreator lCreator(*this, *_paramInput, "gse");

            _operation = lCreator.getOperation();

            _paramData = ParamDataSPtr(_operation->getParamOutput());

            _paramData->setMinSampling(_paramInput->getMinSampling());

            return time;
        }
        
                 // Attitude GSM
        
             ProcessAttitudeGSM ::ProcessAttitudeGSM(Parameter &parameter) : SingleParamProcess_CRTP(parameter) {
        }

        ProcessAttitudeGSM::ProcessAttitudeGSM(const ProcessAttitudeGSM& pProcess, Parameter &parameter) : SingleParamProcess_CRTP(pProcess, parameter) {
        }

        ProcessAttitudeGSM::~ProcessAttitudeGSM() {
        }

        TimeStamp ProcessAttitudeGSM::init() {

            TimeStamp time = _parameterInput->init(this, _timeIntervalList);

            Parameter::InfoList lInfoList = _parameterInput->getInfoList();
            _parameter.getInfoList().insert(lInfoList.begin(), lInfoList.end());

            _paramInput = _parameterInput->getParamData(this).get();
            
            TiltAngleCreator lCreator(*this, *_paramInput, "gsm");

            _operation = lCreator.getOperation();

            _paramData = ParamDataSPtr(_operation->getParamOutput());

            _paramData->setMinSampling(_paramInput->getMinSampling());

            return time;
        }
        
        
    }
}