Home > atmlab > time > mjd2localtime.m

mjd2localtime

PURPOSE ^

MJD2LOCALTIME Approximative local solar time

SYNOPSIS ^

function ltime = mjd2localtime( mjd, lon )

DESCRIPTION ^

 MJD2LOCALTIME   Approximative local solar time

    The function calculates in a simplistic manner a local solar time
    based on modified julian date and longitude. 

 FORMAT   ltime = mjd2localtime( mjd, lon )
        
 OUT   ltime     Approximative local time [0,23.9999]
 IN    mjd       Modified julian date. Tensor or scalar.
       lon       Longitudes. Matching tensor or scalar.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

mjd2localtime.m

SOURCE CODE ^

0001 % MJD2LOCALTIME   Approximative local solar time
0002 %
0003 %    The function calculates in a simplistic manner a local solar time
0004 %    based on modified julian date and longitude.
0005 %
0006 % FORMAT   ltime = mjd2localtime( mjd, lon )
0007 %
0008 % OUT   ltime     Approximative local time [0,23.9999]
0009 % IN    mjd       Modified julian date. Tensor or scalar.
0010 %       lon       Longitudes. Matching tensor or scalar.
0011 
0012 % 2008-03-18   Created by Patrick Eriksson.
0013 
0014 function ltime = mjd2localtime( mjd, lon )
0015                                                                             %&%
0016 rqre_element_math( mjd, lon )                                               %&%
0017 
0018   
0019 lon = shift_longitudes( lon, 0, 360 );
0020   
0021 ltime = rem( 24*(mjd-floor(mjd)) + lon/15, 24 );
0022

Generated on Mon 15-Sep-2014 13:31:28 by m2html © 2005