Stuffer wrote:Hi,
My ScriptedOrbit and ScriptedRotation works. But is it possible though that Celestia calls those two functions with a different frequency?
I inserted a counter into both functions and subjectively said I would think that the ScriptedOrbit Counter counts faster than the ScriptedRotation's one.
It's possible that they are called at different frequencies. And object's ScriptedOrbit/ScriptedRotation are called whenever Celestia needs a position/orientation for that object, and there are no guarantees about when this might occur. Celestia does cache the position/orientation by a ScriptedOrbit/ScriptedRotation--it assumes that if the simulation time hasn't changed, then the result of the calculate will not change (an option to override this behavior will be implemented soon.)
Is this because of the more functions included into ScriptedRotation?
I observed that the Rotation's counter only starts when going to the s/c by the goto-command.
Can I somehow synchronise them when using both?
ScriptedRotation and ScriptedOrbit functions should be written so that they don't assume a particular calling frequency. Would it be possible to provide some of the code from your ScriptedRotation? (Feel free to PM me if you don't want to post it in the forum.)
Also when I read data from a socket and then use the written variables (defined as table in hookscript) in those functions (just assign them to locals end give those back by return), after some time celestia starts to call those functions less often, so my s/c starts "jumping" from one angle to the next. This is especially with ScriptedRotation active.
This is strange behavior... Again, I'd probably need to see some code in order to help you figure out what's going on.
Does this have something to do with my RAM? Does Celestia write something into it and it eventually gets full?
I observed that the CPU usage is on 100% even when running Celestia without doing the socket thing. Is my CPU too slow?
I have a 3.4GHz machine here with 1GB RAM and WinXP.
My graphique card is a nVidia Quadro with 128MB.
Your graphics card, CPU, and RAM are probably all just fine. Celestia can spend 100% of CPU time rendering for very complex scenes (or even not so complex--it depends a lot on your CPU and graphics card.)
--Chris