Changeset 19716 for trunk


Ignore:
Timestamp:
10/04/19 20:47:00 (5 years ago)
Author:
tbretz
Message:
Use a new flag from the DB to decice if this source followws sattelite pointings.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/scheduler.cc

    r19658 r19716  
    426426        int16_t key { -1 };
    427427        bool isToO { false };
     428        bool satellite; { false };
    428429    };
    429430
     
    458459            " fSourceName,\n"
    459460            " ADIST(fDeclination, fRightAscension*15, "+to_string(dec)+", "+to_string(ra)+") AS Dist,\n"
    460             " fIsToO\n"
     461            " fIsToO,\n"
     462            " fFollowSatellite\n"
    461463            "FROM Source\n"
    462464            "WHERE fSourceTypeKEY=1\n"
     
    482484                source.key   = res1[0]["fSourceKey"];
    483485                source.isToO = res1[0]["fIsToO"];
     486                source.satellite= res1[0]["fFollowSatellite"];
    484487
    485488                Warn("Sources closer than "+Tools::Form("%.2f", check_dist)+"\u00b0 detected.");
     
    672675            // For non prioritized sources we require a threshold <3
    673676            // and for prioritized sources a threshold <10
    674             const set<uint16_t> prioritized_sources = { 1, 2, 7 };
    675 
    676             const bool prio = prioritized_sources.find(source.key)!=prioritized_sources.end();
    677677
    678678            // Special check for the threshold. Threshold condition atm only
    679679            // applies for pointings and is different for prioritized sources
    680             if ((check.threshold>3 && !prio) || !check.valid_threshold)
     680            if ((check.threshold>3 && !source.satellite) || !check.valid_threshold)
    681681            {
    682682                Warn(Tools::Form("Relative threshold [%6.2f] too high... skipping.", check.threshold));
Note: See TracChangeset for help on using the changeset viewer.