Project Community based station construction and stationkeeping

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,398
Reaction score
578
Points
153
Location
Vienna
I did, because of the local shenanigans I do expect active clients to get disagreements about each other. But the "ISS on one client, DG on another trying to dock" setup should not result in 10 meter jumps o.o. If you see jumps on the ISS position, trying burning a thruster on the DG and that should smooth out the ISS position instantly.

Open one client, persist ISS.
Open another client, persist a DG. Copy the state of the DG to the ISS.

Switch over to the other client. At this point, hopefully both clients should be in sync. If you see jumps, use a thruster on the intended active client. It has a 30 second timeout, after which you become an inactive client yourself and stop applying localized smoothing to global coordinate updates (thus the 10 meter jumps).

Basically the trade off is: Given that there is agreement between two parties that one will remain inactive and one is approaching, the active party will see no jitter at all. If you see jitter, you are inactive.

The behavior for non-orbital vessels remains unchanged, can you explain the steps you took to reproduce the behavior? I created a DG on the ISS client, persisted it. Switched focus to the DG on the other client, and it remains on the ground plopping like always.

My digitalocean droplet is temperamental, I guess this isn't the intended use of their droplets :p What's your ping like to orbiter.world?
I am going to move over to Google cloud soon, so we should get much better performance from HTTP side...

But I'd love to know how you managed to get 10 m jitters on ISS in orbit. The github has the latest source, you can take a look that on local active clients if the local displacement is really high it just ignores it entirely, thus the need for reconciliation. The ISS client will see jitter, but it should be a lot less than what you'd normally see with straight up global vessel coordinates.

Talked in IRC about this... just a post here to drop the ping value: around 100ms.
 

Majid

Active member
Joined
Oct 31, 2014
Messages
156
Reaction score
27
Points
43
Persistence is in. The server currently has the "limited fuel" option unchecked. I have a Deltaglider set to circle the Earth, currently it's flying over the U.S. Once you log off, the control of the vessel is switched over to an existing persister. When you login, the control is switched back to you.
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,398
Reaction score
578
Points
153
Location
Vienna
Cool :thumbup: . Unfortunately, I won't have much time the next days to test it.

BTW: I've set up a first Orbiter.World entry in the OrbiterWiki. Perhaps you can take a few moments and fill up the gaps there.
 

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
10,866
Reaction score
2,128
Points
203
Location
between the planets
Just as a thought, has anyone ever looked into using WebSocket for this? Might take some of the complexity and latency out of the polling. There seem to be several C++ implementations, although I didn't have the time to check if any of them are for unmanaged C++.
 

Majid

Active member
Joined
Oct 31, 2014
Messages
156
Reaction score
27
Points
43
Just as a thought, has anyone ever looked into using WebSocket for this? Might take some of the complexity and latency out of the polling. There seem to be several C++ implementations, although I didn't have the time to check if any of them are for unmanaged C++.

Given that I am using nodejs as the backend, using WebSocket seemed like the natural thing to do and indeed that's the first thing I tried. It was a couple years ago when I tried this, but at that time I couldn't make any of the C++ implementations I came across on GitHub work. I spent maybe a day trying to make that happen but got impatient (because I wanted to see actual progress) and decided to just stick with HTTP :lol:

Web sockets are nice because they fallback to straight up polling in unsupported environments and are way way more efficient in client to server data transfer due to keeping an open connection. It shouldn't be hard to move over to websockets given that I can make an implementation work from C++/Orbiter. Before doing that though, I think it'd be even more straightforward to use http2. From the nodejs/express side of things, I don't think I'll have to make any changes. From the Orbiter side of things, currently each request opens/closes a handle/connection. The handles would have to be shared across requests for the connection to remain open.

With that said though, I think HTTP is more than good enough for the scope of this project. Especially for something like persistence, HTTP is all you need. You just need 1 request to the server letting it know that you are logging off, and 1 request when logging back on. In that case latency/overhead cost of HTTP doesn't matter.

---------- Post added at 12:01 PM ---------- Previous post was at 11:49 AM ----------

Cool :thumbup: . Unfortunately, I won't have much time the next days to test it.

BTW: I've set up a first Orbiter.World entry in the OrbiterWiki. Perhaps you can take a few moments and fill up the gaps there.

Oh nice! Thank you for doing that, I'll take a look and fill in the gaps.

I have a DG flying at 300 m/s 8k-9k altitude. It took off late last night. When I checked this morning it was well into Canada, and here it is now:

0EnAlcz.png


I want to see how many times it can go around the Earth before something crashes :rofl:

---------- Post added at 12:15 PM ---------- Previous post was at 12:01 PM ----------

Modified the heading to fly over/intercept the cape.

BTW, you don't need to persist a vessel of your own to see other people's vessels. If you don't persist a vessel of your own, you'll just be an anonymous observer. You don't even need the server persister module active in that case, all you need is the mjdcontroller and client persister active.
 

Majid

Active member
Joined
Oct 31, 2014
Messages
156
Reaction score
27
Points
43
Combat MFD/missiles/bug fixes added. A lot of server side changes.. hopefully the regressions aren't too bad.

Next goal is to make dockings a rock solid experience by maintaining a global docking list to eliminate all discrepancies. Currently the experience isn't rock solid enough to allow for communal docking stations.

But the missiles did help fix a number of bugs. Made me go :facepalm: a couple times.

You can persist your vessel docked to another vessel, but sadly right now you have to undock and redock to make sure that the docking states are synchronized (which only happens during a dock even, and this information is lost when you reload the scenario, particularly if you load a different scenario entirely). Also if you're using scenario editor to do this, do not move ISS (or your target) to your location, rather move your vessel to your target. You can't arbitrarily modify the position of other vessels.
 
Last edited:

Majid

Active member
Joined
Oct 31, 2014
Messages
156
Reaction score
27
Points
43
Atmospheric flight and ground taxing should be smoother now. For landed vessels the lat/lon coordinates are being used so there is no jitter. For in flight vessels there is now client side smoothing so you should see greatly reduced jitter.

I have a space station Alpha in orbit on the primary persister. My laptop occasionally logs in with the docked DG.

There is also a ShuttlePB hovering close to the VAB.

---------- Post added at 08:33 PM ---------- Previous post was at 05:20 PM ----------

I made a ShuttlePB hover above the VAB, nulled the relative velocity as best as I could then went to bed because it's Sunday. When I woke up it's 158 Km from cape canaveral moving at 14 m/s.
 
Top