#ifndef SUNSENSORSAMPLE_H_ #define SUNSENSORSAMPLE_H_ // //----------------------------------------------------------------------- /// @copyright /// (c) Copyright 2007 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. /// //----------------------------------------------------------------------- /// /// @file SunSensorSample.h /// /// @author John Burton /// /// @date Mon Dec 10 13:53:37 2007 /// //----------------------------------------------------------------------- // //----------------------------------------------------------------------- // Include Files: //----------------------------------------------------------------------- // #include "SOFIE_namespace.h" #include #include // //----------------------------------------------------------------------- // Constants, Defines, Macros and Type Definitions: //----------------------------------------------------------------------- // const unsigned long NSums = 31; // //----------------------------------------------------------------------- // Global Variables: //----------------------------------------------------------------------- // // //----------------------------------------------------------------------- // Class Definition: //----------------------------------------------------------------------- // class SunSensorSample { // //----------------------------------------------------------------------- // Private Members: //----------------------------------------------------------------------- // private: // //----------------------------------------------------------------------- // Protected Members: //----------------------------------------------------------------------- // protected: double time; // time of sample double X_Low; // left edge double X_High; // right edge double Y_Low; // bottom edge double Y_High; // top edge double Elev; // command elevation double Azim; // command azimuth int Status; // return value for Solar Tracker // std::valarray SumsData; std::vector SumsData; // //----------------------------------------------------------------------- // Public Members: //----------------------------------------------------------------------- // public: // // Constructors & Destructors // SunSensorSample(): time(0.0), X_Low(0.0), X_High(0.0), Y_Low(0.0), Y_High(0.0), Elev(0.0), Azim(0.0), Status(0), SumsData(NSums) {}; SunSensorSample(double tm, double xlo, double xhi, double ylo, double yhi, double el, double az, int stat, std::vector sums) : time(tm), X_Low(xlo), X_High(xhi), Y_Low(ylo), Y_High(yhi), Elev(el), Azim(az), Status(stat), SumsData(sums) {}; SunSensorSample(SunSensorSample const& rhs) : time(rhs.time), X_Low(rhs.X_Low), X_High(rhs.X_High), Y_Low(rhs.Y_Low), Y_High(rhs.Y_High), Elev(rhs.Elev), Azim(rhs.Azim), Status(rhs.Status), SumsData(rhs.SumsData) {}; ~SunSensorSample() {}; // // Operators // SunSensorSample& operator = (SunSensorSample const& rhs); bool operator < (SunSensorSample const& rhs ) const; bool operator > (SunSensorSample const& rhs ) const; // // Accessors // double getTime() const { return time; }; double getXLow() const { return X_Low; }; double getXHigh() const { return X_High; }; double getYLow() const { return Y_Low; }; double getYHigh() const { return Y_High; }; double getElev() const { return Elev; }; double getAzim() const { return Azim; }; int getStatus()const { return Status; }; double getXSolarExtent() const { return (X_High - X_Low); }; double getYSolarExtent() const { return (Y_High - Y_Low); }; int getSum(unsigned long j) const; std::vector getSumsData() const{ return SumsData; } ; unsigned int size() const { return SumsData.size(); } ; void dump() const; }; // end class SunSensorSample #endif