On Tue, 2005-07-26 at 10:37, Erik Hofman wrote: > To prevent any problems in the future I would like to see that file > removed and the functions added to tmp.[ch]xx >
Remove sunpos.[ch]xx completely? OK. > But what is really needed is a way to get sun_angle() working in > sunsolver.cxx which is done by replacing fgSunPositionGST() with a new > version (or by writing a new function that can calculate the sun_angle > any time of day at any location) Funnily enough, I was just having a cup of tea and reading that very file just as your email came in (you're in Europe I presume?). fgSunPositionGST seems to be derived from Johnson's 'xearth' code, but it calculates where on earth the sun is directly overhead. That makes sense for 'xearth' where one of the options is to display the planet from the sun's point of view (so to speak). I can't work out what that routine is doing in FlightGear! It's only used in 'sunsolver.cxx' which was written by Curtis anyway, and is GPL of course. But why is called at all? The rest of Curtis's code does what I'd expect - which is to find the time of day when the sun is at a given angle (so you can specify flying at dusk, or noon or whatever). Give me a bit longer to disentangle it all! I can't work on it right now, (I'm at work) but I can take a quick look at lunchtime, and do more this evening. Steve. _______________________________________________ Flightgear-devel mailing list Flightgear-devel@flightgear.org http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d