Jump to content

KRPC variable server side timestamps?


Ender1618

Recommended Posts

I am a newbie to KRPC, but I was wondering if there was a mechanism for getting server/game time stamps for the state of a variable, such as the vessel’s velocity vector. Say I registered a stream for velocity, and I query the stream at client time t0 and then slightly later at time t1. Is there a way to know the sever/simulation side elapsed time between the 2 observations?

I would think just having client side t0 and t1 and thus client side elapsed time (delta t) wouldn’t be nearly as accurate. Say for use in a client side PID algorithm, for control of some Kerbal system over KRPC.

Thanks, 

Ender

Link to comment
Share on other sites

What part of the kRPC api lets you do this?

So you would query time at t1c, then immediately query the variables you want, then again at t2c?

How would you know that the variables pulled correspond to the the t1s and t2s timestamps, is there a way to batch the calls, to ensure they are from the same server time step?

Thanks,

Ender

Link to comment
Share on other sites

I don't know specifically about the kRPC API, but I am more speaking in general about what I would recommend doing. 

Querying the values at two different client times will give you the ∆t of the server between the two client times, which can determine if the server is running slower or faster than the client. Batching would _not_ be recommended, because that defeats the purpose of having the ∆t on the client side. 

 

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...