IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 25, 2024, 3:50:12 PM (20 months ago)
Author:
cclin33
Message:

CCL: add plot pointing, airmass, and data quality. and some minor changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippMonitor/raw/ipp.php

    r42384 r42736  
    958958}
    959959
     960function getMJD() {
     961    // Get the current date and time in UTC as a Unix timestamp
     962    $currentTimestamp = time();
     963   
     964    // Convert the Unix timestamp to Julian Date (JD)
     965    $jd = 2440587.5 + ($currentTimestamp / 86400);
     966   
     967    // Calculate the Modified Julian Date (MJD)
     968    $mjd = $jd - 2400000.5;
     969    $mjdDay = floor($mjd); // Get only the day part of MJD
     970   
     971    // Concatenate the desired string for expname
     972    //$expname = "o" . $mjdDay . "%";
     973   
     974    // Format the current date in 'YYYY-MM-DD-HH:mm:ss' for display
     975    //$currentUTC = gmdate('Y-m-d-H:i:s', $currentTimestamp);
     976   
     977    // Display the result
     978    //echo "Current UTC: $currentUTC, MJD: $mjdDay, expname: $expname<br>";
     979   
     980    // Return MJD day as an integer
     981    return $mjdDay;
     982}
     983
     984
     985
    960986?>
Note: See TracChangeset for help on using the changeset viewer.