I forget who setup the original --time-match-local options (and friends) and I never really understood how they went together. I think if you do test out a change here, make sure that the --timeofday=dawn,noon,morning,night,etc. option still works correctly.
Regards, Curt. Durk Talsma wrote: > Hi all, > > I'm investigating a time-offset initialization problem, related to a broken > --time-match-local command line option. This option should set the local > simulator time to the same time as where I am in real life. For example, I am > located in a CET timezone, where it is 13:15, and want to fly in the pacific > time zone, and also have the time there to be 13:15 locally. The > --time-match-local option takes care of this by adding a 9 hour time offset > to the value of "warp". > > > In src/Main/fg_init.cxx, line 1413 in the function fgInitTimeOffset() there > is > a line that reads: > > int orig_warp = globals->get_warp(); > ... > [some warp computations] > ... > which is later followed by: > > globals->set_warp( orig_warp + warp ); > > > > The problem is that this function is called twice. The first time through, > warp is set correctly, but the second time through it is messed up, because > warp is calculated correctly the first time through, but then the same warp > is _added_ to the already existing warp value. The end result is that not 9 > hours, but 18 hours are added to warp. > > Considering that this function is called Init, I believe that the statement > on > line 1413 is wrong. An init function should not carry over existing values or > the very variable it is supposed to initialize. Therefore, I'm inclined to > remove that part. However, I just want to double check whether there is a > compelling reason to keep this in the code. Is there another function that > can already set warp before time is initialized? > -- Curtis Olson http://www.flightgear.org/~curt HumanFIRST Program http://www.humanfirst.umn.edu/ FlightGear Project http://www.flightgear.org Unique text: 2f585eeea02e2c79d7b1d8c4963bae2d Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel