now = cur_time;
start_gmt = sgTimeGetGMT(gmt->tm_year, 2, 21, 12, 0, 0);
- SG_LOG( SG_EVENT, SG_DEBUG, " COURSE: GMT = "
- << sgTimeFormatTime(gmt, tbuf) );
- SG_LOG( SG_EVENT, SG_DEBUG, " March 21 noon (GMT) = " << start_gmt );
-
diff = (now - start_gmt) / (3600.0 * 24.0);
- SG_LOG( SG_EVENT, SG_DEBUG,
- " Time since 3/21/" << gmt->tm_year << " GMT = " << diff );
-
part = fmod(diff, 1.0);
days = diff - part;
hours = gmt->tm_hour + gmt->tm_min/60.0 + gmt->tm_sec/3600.0;
while ( lstTmp < 0.0 ) {
lstTmp += 24.0;
}
-
- SG_LOG( SG_EVENT, SG_DEBUG,
- " days = " << days << " hours = " << hours << " lon = "
- << lng << " lst = " << lstTmp );
-
+
return lstTmp;
}
} else {
cur_time = time(NULL) + warp;
}
- SG_LOG( SG_EVENT, SG_DEBUG,
- " Current Unix calendar time = " << cur_time
- << " warp = " << warp );
// get GMT break down for current time
memcpy( gmt, gmtime(&cur_time), sizeof(tm) );
- SG_LOG( SG_EVENT, SG_DEBUG,
- " Current GMT = " << gmt->tm_mon+1 << "/"
- << gmt->tm_mday << "/" << (1900 + gmt->tm_year) << " "
- << gmt->tm_hour << ":" << gmt->tm_min << ":"
- << gmt->tm_sec );
-
// calculate modified Julian date starting with current
mjd = sgTimeCurrentMJD( ct, warp );
// convert "back" to Julian date + partial day (as a fraction of one)
jd = mjd + MJD0;
- SG_LOG( SG_EVENT, SG_DEBUG, " Current Julian Date = " << jd );
// printf(" Current Longitude = %.3f\n", FG_Longitude * SGD_RADIANS_TO_DEGREES);
lst = sidereal_course( cur_time, gmt,
-location.getLongitudeDeg() ) + gst_diff;
}
-
- SG_LOG( SG_EVENT, SG_DEBUG,
- " Current lon=0.00 Sidereal Time = " << gst );
- SG_LOG( SG_EVENT, SG_DEBUG,
- " Current LOCAL Sidereal Time = " << lst << " ("
- << sidereal_precise( mjd, -location.getLongitudeDeg() )
- << ") (diff = " << gst_diff << ")" );
}
} else {
cur_time = time(NULL) + warp;
}
- SG_LOG( SG_EVENT, SG_DEBUG,
- " Current Unix calendar time = " << cur_time
- << " warp = " << warp );
// get GMT break down for current time
memcpy( gmt, gmtime(&cur_time), sizeof(tm) );
- SG_LOG( SG_EVENT, SG_DEBUG,
- " Current GMT = " << gmt->tm_mon+1 << "/"
- << gmt->tm_mday << "/" << (1900 + gmt->tm_year) << " "
- << gmt->tm_hour << ":" << gmt->tm_min << ":"
- << gmt->tm_sec );
// calculate modified Julian date
// t->mjd = cal_mjd ((int)(t->gmt->tm_mon+1), (double)t->gmt->tm_mday,
x /= 3600.0;
gst = (1.0/SIDRATE)*hr + x;
- SG_LOG( SG_EVENT, SG_DEBUG, " gst => " << gst );
-
return gst;
}