Jump to content

Can a vessel id be changed?


Recommended Posts

I have a problem which is caused by a vessel keeping the same vessel id after undocking and then redocking.

Would it be a problem if the vessel id was changed?

The problem arises when a vessel undocks into two.  One vessel gets a new id, the other keeps the same id.  

I'm trying to preserve certain information in the command pod for each vessel when undocked, but share new information when docked.  I'm currently using the vessel id for this. The issue is when redocking, since the original vessel id is the same, data which was supposed to be private to each command pod is shared from the original vessel to the newly-docked vessel.  I think that if I ensured that the vessel id of undocked vessels gets replaced, the problem would be resolved.

Thanks, and Happy New Year to all

Link to comment
Share on other sites

  • 2 weeks later...

Changing the vesselId would create other issues, hence there is no public method for doing that.

You can remove and add a vessel/vesselId but that also will create unwanted issues for you as that fires events and other processing.. as removing it - means it's being removed.

You could try that. but I can't say that you won't have other side effects.

Feels to me you should be tracking your data based on the command pod/root part persistentId and then sharing the data between them if they are part of the same vessel.

Link to comment
Share on other sites

5 minutes ago, JPLRepo said:

Changing the vesselId would create other issues, hence there is no public method for doing that.

You can remove and add a vessel/vesselId but that also will create unwanted issues for you as that fires events and other processing.. as removing it - means it's being removed.

You could try that. but I can't say that you won't have other side effects.

Feels to me you should be tracking your data based on the command pod/root part persistentId and then sharing the data between them if they are part of the same vessel.

Thanks, I've already moved past that.  I found I was able to do it a different way.

Link to comment
Share on other sites

  • 1 month later...
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...