-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setTimestamp on EntityStatePdu #94
Labels
Comments
@AJPerriello there's a class in the Java library named disTime that may help answer your questions |
@AJPerriello 's a class in the Java library named disTime may help answer your questions Many simulations, especially the in-house kind, ignore timestamp and handle packets the order they are received. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've done reading and haven't found a good code example.
But from what I read in the standard is that DIS servers may reject EntityStatePdu is the timestamp is not 0 (relative) or valid.
So using this open-dis library I'm not sure how this would work properly.
I've seen other dis implementations that manage more code and logic to handle timestamps and updating them for persistent entities. In other words, if timestamps are not relevant or too latent then it could be perceived that the entity is no longer existing.
Unix time in milliseconds since epoch fits in 64 bit long, but not 32 bit int, furthermore, it seems timestamps need to be DIS compliant by setting the least significant bit too 0 or 1. (relative or absolute) and then the next 31 bits could hold at most (2^31) - 1 values. This will not work for epoch time without significant loss, so I think it means that time values are how many ticks since the top of the hour. I can't see how this would be used with the current library APIs on Pdu::setTimestamp(). An example would help. But I can't find one. For now, I'll just keep trying different techniques to see what works. If you have more info or a good example in C++ thank you.
The text was updated successfully, but these errors were encountered: