<commit_before>#pragma ident "$Id:$"
/**
*  ConstellationList - Produce comma separated list of PRN ID values for
*  the SVs that are in the constellation.  In order to do this, the program
*  needs:
*    (1.)  An input file that defines the GPS constellation at a given date
*          (or dates)
*    (2.)  The year of interest (2-digit or 4-digit will do)
*    (3.)  The day of year of interest (Julian day, 0-365/366)
*  The user may also specify if they want the list in the "baseline 24", the
*  "excess" above the baseline, or both.
*
*  USAGE:
*  >ConstellationList -i<definitionFile> -y<year> -j<DOY> [-b] [-x] [-n] [-O]
*  -i : Constellation defintion file
*  -y : year (2-digit or 4-digit)
*  -j : day of year (0-365|366)
*  -b : List "baseline 24" PRN IDs
*  -x : List PRN IDs "in excess of" the baseline 24, but in-use on orbit
*  -n : List PRN IDs that are current not in baseline 24, either on-orbit 
*       "excess" or simply not in use at this time. 
*  -O : Assume input file is in form of USCG Ops Advisory.  By default a 
*       comma separated value file is assumed.
*
*/
//============================================================================
//
//  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
//
//  Copyright 2009, The University of Texas at Austin
//
//============================================================================

//============================================================================
//
//This software developed by Applied Research Laboratories at the University of
//Texas at Austin, under contract to an agency or agencies within the U.S.
//Department of Defense. The U.S. Government retains all rights to use,
//duplicate, distribute, disclose, or release this software.
//
//Pursuant to DoD Directive 523024
//
// DISTRIBUTION STATEMENT A: This software has been approved for public
//                           release, distribution is unlimited.
//
//=============================================================================
// System
#include <stdio.h>

// Library
#include "BasicFramework.hpp"
#include "DayTime.hpp"
#include "icd_200_constants.hpp"

// Project
#include "ConstellationSet.hpp"

using namespace std;
using namespace gpstk;


class ConstellationList : public gpstk::BasicFramework
{
public:
   ConstellationList(const std::string& applName,
              const std::string& applDesc) throw();
   ~ConstellationList() {}
   virtual bool initialize(int argc, char *argv[]) throw();
   
protected:
   virtual void process();
   gpstk::CommandOptionWithAnyArg inputOption;
   gpstk::CommandOptionNoArg typeOption;
   gpstk::CommandOptionWithAnyArg yearOption;
   gpstk::CommandOptionWithAnyArg DOYOption;
   gpstk::CommandOptionNoArg base24Option;
   gpstk::CommandOptionNoArg excessOption;
   gpstk::CommandOptionNoArg notBase24Option;
   gpstk::CommandOptionNoArg SVNOption;

   FILE *logfp;
   ConstellationSet cs;
   
   bool outputPRN;
};

int main( int argc, char*argv[] )
{
   try
   {
      ConstellationList fc("ConstellationList", "List the satellites in or out of the Base 24.");
      if (!fc.initialize(argc, argv)) return(false);
      fc.run();
   }
   catch(gpstk::Exception& exc)
   {
      cout << exc << endl;
      return 1;
   }
   catch(...)
   {
      cout << "Caught an unnamed exception. Exiting." << endl;
      return 1;
   }
   return 0;
}

ConstellationList::ConstellationList(const std::string& applName, 
                       const std::string& applDesc) throw()
          :BasicFramework(applName, applDesc),
           inputOption('i', "input-file", "The name of the ConstallationDefinition file(s) to read.", true),
           typeOption('O', "OpsAd","Assume input file is Op Advisory format (CSV is default)",false),
           yearOption('y', "year", "Year of interest.", true),
           DOYOption('j',"day-of-year","Day of year.", true),
           SVNOption('s',"SVN Output","Output SVN in place of PRN (only valid fo -O)",false),
           base24Option('b',"Base24", "List PRNs in Base 24 constellation", false),
           notBase24Option('n',"notBase24","List PRNs NOT used in Base 24 constellation",false),
           excessOption('x',"excessSVs","List PRNs in use, but in excess of the Base 24 constellation",false)
{
   inputOption.setMaxCount(10);
   yearOption.setMaxCount(1);
   DOYOption.setMaxCount(1);
}

bool ConstellationList::initialize(int argc, char *argv[])<commit_msg>Minor argument updates to ConstellationList<commit_after>#pragma ident "$Id:$"
/**
*  ConstellationList - Produce comma separated list of PRN ID values for
*  the SVs that are in the constellation.  In order to do this, the program
*  needs:
*    (1.)  An input file that defines the GPS constellation at a given date
*          (or dates)
*    (2.)  The year of interest (2-digit or 4-digit will do)
*    (3.)  The day of year of interest (Julian day, 0-365/366)
*  The user may also specify if they want the list in the "baseline 24", the
*  "excess" above the baseline, or both.
*
*  USAGE:
*  >ConstellationList -i<definitionFile> -y<year> -j<DOY> [-b] [-x] [-n] [-O]
*  -i : Constellation defintion file
*  -y : year (2-digit or 4-digit)
*  -j : day of year (0-365|366)
*  -b : List "baseline 24" PRN IDs
*  -x : List PRN IDs "in excess of" the baseline 24, but in-use on orbit
*  -n : List PRN IDs that are current not in baseline 24, either on-orbit 
*       "excess" or simply not in use at this time. 
*  -O : Assume input file is in form of USCG Ops Advisory.  By default a 
*       comma separated value file is assumed.
*
*/
//============================================================================
//
//  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
//
//  Copyright 2009, The University of Texas at Austin
//
//============================================================================

//============================================================================
//
//This software developed by Applied Research Laboratories at the University of
//Texas at Austin, under contract to an agency or agencies within the U.S.
//Department of Defense. The U.S. Government retains all rights to use,
//duplicate, distribute, disclose, or release this software.
//
//Pursuant to DoD Directive 523024
//
// DISTRIBUTION STATEMENT A: This software has been approved for public
//                           release, distribution is unlimited.
//
//=============================================================================
// System
#include <stdio.h>

// Library
#include "BasicFramework.hpp"
#include "DayTime.hpp"
#include "icd_200_constants.hpp"

// Project
#include "ConstellationSet.hpp"

using namespace std;
using namespace gpstk;


class ConstellationList : public gpstk::BasicFramework
{
public:
   ConstellationList(const std::string& applName,
              const std::string& applDesc) throw();
   ~ConstellationList() {}
   virtual bool initialize(int argc, char *argv[]) throw();
   
protected:
   virtual void process();
   gpstk::CommandOptionWithAnyArg inputOption;
   gpstk::CommandOptionNoArg typeOption;
   gpstk::CommandOptionWithAnyArg yearOption;
   gpstk::CommandOptionWithAnyArg DOYOption;
   gpstk::CommandOptionNoArg base24Option;
   gpstk::CommandOptionNoArg excessOption;
   gpstk::CommandOptionNoArg notBase24Option;
   gpstk::CommandOptionNoArg SVNOption;

   FILE *logfp;
   ConstellationSet cs;
   
   bool outputPRN;
};

int main( int argc, char*argv[] )
{
   try
   {
      ConstellationList fc("ConstellationList", "List the satellites in or out of the Base 24.");
      if (!fc.initialize(argc, argv)) return(false);
      fc.run();
   }
   catch(gpstk::Exception& exc)
   {
      cout << exc << endl;
      return 1;
   }
   catch(...)
   {
      cout << "Caught an unnamed exception. Exiting." << endl;
      return 1;
   }
   return 0;
}

ConstellationList::ConstellationList(const std::string& applName, 
                       const std::string& applDesc) throw()
          :BasicFramework(applName, applDesc),
           inputOption('i', "input-file", "The name of the ConstallationDefinition file(s) to read.", true),
           typeOption('O', "OpsAd","Assume input file is Op Advisory format (CSV is default)",false),
           yearOption('y', "year", "Year of interest.", true),
           DOYOption('j',"day-of-year","Day of year.", true),
           SVNOption('s',"SVN Output","Output SVN in place of PRN (not valid for -O)",false),
           base24Option('b',"Base24", "List PRNs in Base 24 constellation", false),
           notBase24Option('n',"notBase24","List PRNs NOT used in Base 24 constellation",false),
           excessOption('x',"excessSVs","List PRNs in use, but in excess of the Base 24 constellation",false)
{
   inputOption.setMaxCount(10);
   yearOption.setMaxCount(1);
   DOYOption.setMaxCount(1);
}

bool ConstellationList::initialize(int argc, char *argv[])
{'fraction_non_alphanumeric': 0.16310679611650486, 'fraction_numerical': 0.01650485436893204, 'mean_word_length': 3.445835131635736, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, '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': '656736', 'n_tokens_mistral': 3185, 'n_tokens_neox': 2923, 'n_words': 1111}