;> original in mua.c ; ; we use buie's routines function misc_zulu_to_julian, zdate jd = jdparse(zdate) return, jd end ;----------------------------------------------------------------------- ; Convert zulu time in the form: 2012-01-16T20:38:17.046 (for example) ; 0123 56 89 12 45 78 ; to a double precision julian day. The seconds can be an integer ; or any number of decimal places. ; ;/*@@*/ ;double misc_zulu_to_julian( char zdate[] ) ;{ ;/**/ ;int year,month,day,hour,minute,jd; ;double djd,seconds; ;char wrd[200]; ;/**/ ;year = cvalread0( zdate, 0, 3); ;month = cvalread0( zdate, 5, 6); ;day = cvalread0( zdate, 8, 9); ;hour = cvalread0( zdate,11,12); ;minute = cvalread0( zdate,14,15); ;substrcpy_terminate( zdate, 17, clc(zdate), wrd, 0); ;seconds= GLV(wrd,1); ;jd = misc_gregorian_to_julian( year, month, day ); ;djd = ((double)jd - 0.5) + ; ((((seconds / 60.) + (double)minute) / 60.) + (double)hour) / 24.; ;return(djd); ;}