app.get('/mjd', function(req, res){
res.status(200).send(""+orb.time.JDtoMJD(orb.time.dateToJD(new Date())));
});
Ran Orbiter all night. No crashes, still running, everything survived the night. What a relief My DG somehow ended up miles away from where I left it, but that's on the client machine.. Kind of puzzled about that.
I'll have some time tomorrow to get online, looking forward to test it then.
Quick question: what about proxy mechanisms? Does libcurl support them?
Can you be more specific? I am not sure I understand what specifically you mean by proxy mechanisms? I just abstracted libcurl into my own helper library with just 2 methods, curl_get/curl_post an use those for everything. Do you have a specific use case in mind for what you are talking about for context?
I mean HTTP proxy settings.
---------- Post added at 18:56 ---------- Previous post was at 17:34 ----------
Loaded the new client, synced, added new DG "Face", pressed PER, CTD. It seems like the vessel made it into the tele list, though. Any log or somesuch I can send to you?
---------- Post added at 19:01 ---------- Previous post was at 18:56 ----------
Exactly the same problem on a second run.
Face, I noticed the CTD in hitting PER, too. The crash happened in libcurl, I couldn't reproduce it readily. Are you able to?
I did some research, some people say it might have to do with mismatch of CRT's. I built libcurl using VS 2015 in release x86 mode. I thought it might also have to do with threading. I am pretty certain libcurl is thread-safe. I was thinking of wrapping my helper curl methods in critical sections just to make sure. I actually had wrapped my methods in critical sections previously, but upon reading that curl is thread safe I removed them.
At any rate, I couldn't reproduce the problem consistently enough to determine the root cause.
I'll look into this when I get home and during the weekend.
---------- Post added at 05:57 PM ---------- Previous post was at 05:33 PM ----------
I logged on from work using a fresh install of Orbiter. I was able to see the vessels already on the server and I could see your new Dg's. I also added a new vessel called Atlantis.
I can reproduce it consistently. Everytime I try to persist a ScnEditor-spawn vessel, Orbiter crashes. No exception dialog, just a hard CTD.
Modules are updated in the same location. Aside from the libcurl changes, I have increased the MJD request interval to 2 seconds and have added some rudimentary interpolation.
Now it keeps on running when I press PER. However, if I log off and log on again with the same persister ID, my vessel is not synchronized back again. If I log on after deleting the ID file, the vessel gets shown, but of course with a very strange jumping. I guess that's because nobody updates the server states for that vessel anymore.
I noticed that the list was empty before I logged on. It would be interesting to see what happens if more than one client is online, will test that...
I have added a ShuttleA hovering a few km over BB, ISS, a DG hovering 10km over Mars.
The logout bug is a known problem that'll go away this weekend when logged off vessels are moved into an actual persister pool and then moved back into your pool.
I managed to get two clients to show each other vessels. However, I get a 1-second jitter of about half a meter on Earth. It is pretty smooth on the moon, although still showing noticeable jitter.
On orbit, I get wild displacement every minute or so, like displayed here:
However, I get that too with OMP on 2016, although with a smaller amplitude. On 2010, even the Earth orbit absolute vectors are very smooth. Perhaps something with the callback order changed accuracy of DefSetStateEx.
I'd say for small concurrent teams this is certainly a good start to try out your ideas. :thumbup:
Good luck with the persistence .
I was watching your stunts. Sadly I forgot to persist my own vessel, otherwise you would have seen me going through you on on the moon. The wild displacement is by design, it only updates the states every 60 seconds for vessels in orbit, to get rid of jitter all together. But you'd have to synchronize with the other party to not burn.
The idea isn't to replicate OMP with PTP synchronized timestamps Someday I hope to integrate with OMP for super high accuracy "instance" like situations, but for the cost of 1 ajax call, I am going to get as much multiplayer as I can get. The next thing I am going to try is smoothing in local coordinates from the POV of the focus vessel if the distance of the spawned vessel is small.
Sorry, I can't reply to your post in kind due to work but I value user experience > realism -> so I am going to treat docking as an event and transmit that to the clients so the discrepancy you describe doesn't happen (for docking).
Also, if I am understanding you correctly: control lag for the user would be horrendous. I tried to fly a DG by using the client for visual feedback and it was awful with 1 second update intervals. It was doable with 0.25 second update interval.
What I meant was more event based. Whenever you control your vessel, gather the events for e.g. 100ms, then post them to the server object. The server (or persister) plays it back to the server-hosted object, which in turn updates its reactions. Since this only runs if somebody does something (instead of coasting or playing with MFDs), the strain on the server would not be that high.
I did a similar thing in OMP when trying to tackle the animation problem, but of course there it the round-trip was much faster. It worked pretty sweet, enabling people to control the vessels of other users. Unfortunately, it did not really fit into the P2P approach, so I deprecated that, too.
New update: http://orbiter.world/orbiter.online.zip
Improved the mjd controller, decreased clock update interval to 3 seconds. Added orbital vector smoothing. Got rid of the slow update cycle, so now everything updates at 1 Hz even vessels in orbit.
It's possible now to do real-time dockings and for both parties to see real-time non-jittery updates. The plug-in handles this by treating vessels which haven't burnt in the past 30 seconds as inactive. Active vessels get rid of the jitter by simply ignoring all state changes that result in a displacement greater than twice the relative velocity. Whenever such an event occurs, the active vessel asks the inactive vessel to reconcile its position in local coordinates resulting in less jitter.
So the approaching active vessel will see no jitter, the inactive vessel will see greatly reduced jitter.
Did you try that with more than 2 clients already? I guess it will cause a third observer to disagree on the relation between the other two. Especially if there is more than 1 active vessel, i.e. two approaching ISS simultaneously.
---------- Post added at 20:13 ---------- Previous post was at 20:08 ----------
:rofl: GL-01 does a funny bunny-hopping now on the second client while landed.
---------- Post added at 20:16 ---------- Previous post was at 20:13 ----------
The standard "ISS on one client, DG on another, trying to dock" jumps around in a 10 meter fashion in 1Hz now.