/** @file SetUpDrift @author Brian Magill @creation date 8/24/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 Finds the time corresponding to a given altitude */ #include #include "SetUpDrift.h" #include "ConvertAlt2Time.h" #include "SOFIE_namespace.h" #include "GATS_Utilities.hpp" using namespace std; using GATS_Utilities::ConvertToString; SetUpDriftParam SetUpDrift::operator()(SigEarthLocParam const & earthInfo, BalanceTimes const & balTimes) const { ConvertAlt2Time convert(earthInfo); double z; vector timeArray; vector altArray; // Changed by GJP on 10/01/2010 to make each channel's time // interval independent. // double interval; vector IntervalArray; string keyName; string strErr; int i; try { // Removed by GJP on 10/01/2010 // interval = config->GetReal(sectionName, "TimeInterval"); for(i = SOFIE::O3 ; i <= SOFIE::NO; i++) { keyName = string("Channel_") + ConvertToString(i + 1) + "_Altitude"; z = config->GetReal(sectionName, keyName); altArray.push_back(z); timeArray.push_back(convert(z)); // Added by GJP on 10/01/2010 to retrieve the independent time intervals keyName = string("Channel_") + ConvertToString(i + 1) + "_TimeInterval"; z = config->GetReal(sectionName, keyName); IntervalArray.push_back(z); } } catch (exception &ex) { strErr = string("Problem in SetUpDrift::operator() ") + ex.what(); throw runtime_error(strErr); } return SetUpDriftParam(timeArray, altArray, // Modified by GJP on 10/01/2010 balTimes.getStartTime(), balTimes.getEndtTime(), IntervalArray); }