Skip to main content

MOMA C++ Mining Scripts

Introduction

The MOMA C++ mining scripts are command-line tools built on top of MOMA Data View code.

The primary purpose of these scripts is to extract data into a XINA Online-friendly format. They currently live in mine699.gsfc.nasa.gov in the /home/mpallone/cpp-playground directory (although I intend to move them into /usr/local/bin as soon as I can get permission...):

If running these executables on mine699, be sure to be logged in as a user whose momagse directory is configured and up to date, such as the 'moma' user.

Housekeeping mining script

Absolute filename: /home/mpallone/cpp-playground/extract_hk_data_main

From the file's header comment:

   /**
    * 
    * @file   extract_hk_data_mainclass.cpp 
    * @author Mark Pallone 
    * @date   December, 2015
    * 
    * A script to extract HK data from a TMFile in order to populate XINA online 
    * databases. 
    * 
    * Data will be written to the specified output directory with the preferred 
    * XINA format. That is, one datapoint per line as follows: 
    * 
    *     utc time,fsw time,relative time,hkid,science value
    * 
    * Note that times will be in microseconds, not seconds, unless the --seconds 
    * flag is used.
    * 
    * The name of the output file will be: 
    *     
    *     <tid_number>{=html}_hk_data.csv    
    * 
    * Example usage: 
    * 
    *     ./extract_hk_data_main  --infile <full path to tm.mom file>   
    *                             --outdir <full path to output directory>{=html}  
    *                             --hkids 1,2,5-10,15-20  --dhkids 30-50,55
    * 
    * HKIDs listed immediately after the --hkids flag will have *all* of their 
    * values stored. 
    * 
    * Delta HKIDs listed next to the --dhkids flag will have their initial value
    * stored, and subsequent values will only be stored if they differ from the 
    * previous value for that particular HKID. 
    * 
    * One or both of --hkids, --dhkids must be specified. 
    */