Changeset 16078 for trunk/FACT++


Ignore:
Timestamp:
05/23/13 12:10:40 (12 years ago)
Author:
tbretz
Message:
Improved the calculation of the date for loading the DRS calib. This has changed with the new definition of the date related to sun-rise rather than noon
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/scripts/CheckUnderflow.js

    r16050 r16078  
    160160        console.out("Trying to restore last DRS calibration #"+nn+"  ["+runs.time+"]");
    161161
    162         var night = new Date(runs.time-1000*60*60*12);
     162        var night;
     163        if (Sun.horizon(null, runs.time).isUp)
     164            night = new Date(runs.time);
     165        else
     166            night = new Date(runs.time-1000*60*60*12);
     167
    163168        var yy = night.getUTCFullYear();
    164169        var mm = night.getUTCMonth()+1;
Note: See TracChangeset for help on using the changeset viewer.