/** @file GetAPLU.cpp @author Brian Magill @datecreated 12/23/2005 $Date: 2006/04/06 18:25:15 $ $Revision: 1.2 $ @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 function for determining Knetch values for Solar activity */ //---------------------------------------------------------------------- // #include #include //#include "SOFIE_Exception.h" //#include "StrTools.h" #include "GATS_Utilities.hpp" #include "GetAPLU.h" using namespace std; using namespace GATS_Utilities; float GetAPLU::operator()(long indx) { long knetch_size = 10; // Knecht lookup values: float knetch[] = {0., 4., 7., 15., 27., 48., 80., 132., 207., 400.}; if (indx < 0 || indx >= knetch_size) { string errMsg = "KP Index is out of bounds. index = " + ConvertToString(indx) + ". Should be between 0 and " + ConvertToString(knetch_size); throw runtime_error(errMsg); } return knetch[indx]; }