[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20050418: udunits documentation


>Date: Mon, 18 Apr 2005 13:30:28 -0400
>From: Jeremy Rolph <address@hidden>
>Organization: Florida State University
>To: Steve Emmerson <address@hidden>
>Subject: Re: 20050418: udunits documentation 

The above message contained the following:

> I have since figrued that out.  I am, however having a problem using
> utcaltime and uticaltime to go from true julian day and milliseconds to
> the time convention here at COAPS which is  minutes since 1980-1-1
> 000:00:00.  If you have any suggestions I would appreciate it.

The function julday_to_gregdate() in the UDUNITS library isn't
documented, but you could do something like this:

    int         julDay, milliseconds, year, month, day;
    utUnit      unit;           /* minutes since 1980-1-1 */
    double      stdTime;        /* minutes since 1980-1-1 */
    (void)utScan("minutes since 1980-1-1", &unit);
    julday_to_gregdate(julDay, &year, &month, &day);
    (void)utInvCalendar(year, month, day, 0, 0, milliseconds/1000.0, &unit,

I'm assuming that the milliseconds is since midnight.

> Thanks,
> Jeremy Rolph

Steve Emmerson