<commit_before><commit_msg>src/CheckPRData.hpp: Added class to check that pseudorange data is between reasonable (and adjustable) values.<commit_after>
/**
 * @file CheckPRData.hpp
 * This class checks that pseudorange data is between reasonable values.
 */

#ifndef CheckPRData_GPSTK
#define CheckPRData_GPSTK

//============================================================================
//
//  This file is part of GPSTk, the GPS Toolkit.
//
//  The GPSTk is free software; you can redistribute it and/or modify
//  it under the terms of the GNU Lesser General Public License as published
//  by the Free Software Foundation; either version 2.1 of the License, or
//  any later version.
//
//  The GPSTk is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU Lesser General Public License for more details.
//
//  You should have received a copy of the GNU Lesser General Public
//  License along with GPSTk; if not, write to the Free Software Foundation,
//  Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
//  
//  <NAME> - gAGE. 2006
//
//============================================================================



namespace gpstk
{

    /** @addtogroup RinexObs */
    //@{


    /// This class checks that pseudorange data is between reasonable values.
    class CheckPRData
    {
    public:

        /// Default constructor
        CheckPRData()
        {
            minPRange = 15000000.0;
            maxPRange = 30000000.0;
        };


        /// Constructor that allows to set the data span values
        CheckPRData(double min, double max)
        {
            setMinPRange(min);
            setMaxPRange(max);
        };


        /** Checks that the given pseudorange data is between the limits 
         * @param prange    The pseudorange data to be test
         *
         * @return
         *  True if check was OK.
         */
        virtual bool check(double prange)
        {
            return ( prange>=minPRange && prange<=maxPRange );
        };  // end CheckPRData::check()


        /// Set the minimum pseudorange value allowed for data (in meters).
        virtual void setMinPRange(const double minPR) { minPRange = minPR; };

        /// Get the minimum pseudorange value allowed for data (in meters).
        virtual double getMinPRange(void) { return minPRange; };

        /// Set the maximum pseudorange value allowed for data (in meters).
        virtual void setMaxPRange(const double maxPR) { maxPRange = maxPR; };

        /// Get the maximum pseudorange value allowed for data (in meters).
        virtual double getMaxPRange(void) { return maxPRange; };


        /// Destructor
        virtual ~CheckPRData() {};


    protected:

        /// Minimum pseudorange value allowed for input data (in meters).
        double minPRange;

        /// Maximum pseudorange value allowed for input data (in meters).
        double maxPRange;



   }; // end class CheckPRData
   

   //@}
   
}

#endif

{'fraction_non_alphanumeric': 0.13064516129032258, 'fraction_numerical': 0.012258064516129033, 'mean_word_length': 2.381679389312977, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4697122', 'n_tokens_mistral': 861, 'n_tokens_neox': 783, 'n_words': 320}