1
0
Fork 0

Fine tuning mktime() support because of varying behavior on different

platforms.
This commit is contained in:
curt 1998-05-02 01:53:17 +00:00
parent 5a4b56c58e
commit 0419841486
3 changed files with 24 additions and 4 deletions

View file

@ -217,7 +217,11 @@ double sidereal_course(struct tm *gmt, time_t now, double lng) {
long int offset;
double diff, part, days, hours, lst;
#ifdef __CYGWIN32__
// I believe the following is Unix vs. Win32 behavior difference.
// If you are having problems with incorrectly positioned
// astronomical bodies, this is a really good place to start
// looking.
#ifdef WIN32
int daylight; // not used but need to keep the compiler happy
long int timezone; // not used but need to keep the compiler happy
int mktime_is_gmt = 1;
@ -375,6 +379,10 @@ void fgTimeUpdate(fgFLIGHT *f, fgTIME *t) {
// $Log$
// Revision 1.6 1998/05/02 01:53:17 curt
// Fine tuning mktime() support because of varying behavior on different
// platforms.
//
// Revision 1.5 1998/04/28 21:45:34 curt
// Fixed a horible bug that cause the time to be *WAY* off when compiling
// with the CygWin32 compiler. This may not yet completely address other

View file

@ -55,7 +55,7 @@ typedef struct {
double sun_lon, sun_gc_lat;
// in cartesian coordiantes
struct fgCartesianPoint fg_sunpos;
fgCartesianPoint3d fg_sunpos;
// (in view coordinates)
GLfloat sun_vec[4];
@ -98,6 +98,10 @@ void fgLightUpdate( void);
// $Log$
// Revision 1.3 1998/05/02 01:53:18 curt
// Fine tuning mktime() support because of varying behavior on different
// platforms.
//
// Revision 1.2 1998/04/24 00:52:31 curt
// Wrapped "#include <config.h>" in "#ifdef HAVE_CONFIG_H"
// Fog color fixes.

View file

@ -50,7 +50,7 @@
#include <Main/views.hxx>
#include <Math/fg_geodesy.h>
#include <Math/mat3.h>
#include <Math/polar.h>
#include <Math/polar3d.h>
#include <Math/vector.h>
#include <Scenery/scenery.hxx>
@ -276,6 +276,7 @@ void fgUpdateSunPos( void ) {
fgTIME *t;
fgVIEW *v;
MAT3vec nup, nsun, v0;
fgPolarPoint3d p;
double sun_gd_lat, sl_radius;
double ntmp;
@ -290,7 +291,10 @@ void fgUpdateSunPos( void ) {
fgGeodToGeoc(sun_gd_lat, 0.0, &sl_radius, &l->sun_gc_lat);
l->fg_sunpos = fgPolarToCart(l->sun_lon, l->sun_gc_lat, sl_radius);
p.lon = l->sun_lon;
p.lat = l->sun_gc_lat;
p.radius = sl_radius;
l->fg_sunpos = fgPolarToCart3d(p);
printf( " t->cur_time = %ld\n", t->cur_time);
printf( " Sun Geodetic lat = %.5f Geocentric lat = %.5f\n",
@ -346,6 +350,10 @@ void fgUpdateSunPos( void ) {
// $Log$
// Revision 1.8 1998/05/02 01:53:18 curt
// Fine tuning mktime() support because of varying behavior on different
// platforms.
//
// Revision 1.7 1998/04/30 12:36:05 curt
// C++-ifying a couple source files.
//