Commit 3147f766 authored by Christophe Massiot's avatar Christophe Massiot

Merge branch 'titer-master'

parents 356989cf cd1438b3
......@@ -60,7 +60,7 @@ static inline void dvb_mjd_get(uint16_t mjd, int *y, int *m, int *d)
{
int k;
int yp = (mjd * 20 - 301564) / 7305;
int mp = (mjd * 10000 - 149561000 - yp * 3652500) / 306001;
int mp = (mjd * 10000 - 149561000 - 10000 * (yp * 1461 / 4)) / 306001;
*d = mjd - 14956 - yp * 1461 / 4 - mp * 306001 / 10000;
k = (mp == 14 || mp == 15) ? 1 : 0;
*y = yp + k;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment