/** @class CalcPointing.cpp @author Brian Magill @creation date 1/1/2007 $Date:$ $Revision:$ @copyright (©) Copyright 2006 by GATS Inc. 11864 Canon Blvd., Suite 101, Newport News, VA 23606 All Rights Reserved. No part of this software or publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise without the prior written permission of GATS Inc. @brief Calculates the pointing signal correction */ #include "CalcPointing.h" #include "SolarSourceModeling.h" #include "SOFIE_namespace.h" #include "GATS_Utilities.hpp" #include "Vec2Val.hpp" using namespace std; using GATS_Utilities::ConvertToString; void CalcPointing::operator()(valarray const &time, ChannelSignals const &in, PointingSigParam &pointingParam, string &comments) { int gasID = in.getID(); vector A; vector B; vector C; vector qual; bool calcDone = true; valarray workStrong; valarray workWeak; vector timeArray = Val2Vec(time); vector elevLockdown = earthLoc.getElevLockDown(); vector azLockdown = earthLoc.getAzimLockDown(); //vector 0) comments = string("Channel ") + ConvertToString(gasID) + string(" : ") + comments; in.getSignal(SOFIE::Strong, workStrong); SolarSourceModeling solarModel(mode, balStart, balEnd, elevLockdown, azLockdown, Val2Vec(workStrong), timeArray, calStart, calEnd, offset); solarModel.getCoefficients(&slopeAz, &slopeEl, &intercept); if(solarModel. good()) { goodQuality = GOOD; } else { goodQuality = 1; } A.push_back(slopeAz); B.push_back(slopeEl); C.push_back(intercept); qual.push_back(goodQuality); in.getSignal(SOFIE::Weak, workWeak); solarModel = SolarSourceModeling(mode, balStart, balEnd, elevLockdown, azLockdown, Val2Vec(workWeak), timeArray, calStart, calEnd, offset); solarModel.getCoefficients(&slopeAz, &slopeEl, &intercept); if(solarModel. good()) { goodQuality = GOOD; } else { goodQuality = 1; } A.push_back(slopeAz); B.push_back(slopeEl); C.push_back(intercept); qual.push_back(goodQuality); pointingParam = PointingSigParam(gasID, A, B, C, qual, calcDone); }