Skip to content
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

[Feature]:TimeKeeper Integration #31

Open
Lucaspec72 opened this issue Jan 19, 2021 · 7 comments
Open

[Feature]:TimeKeeper Integration #31

Lucaspec72 opened this issue Jan 19, 2021 · 7 comments
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@Lucaspec72
Copy link
Contributor

Is your feature request related to a problem? Please describe.


There isn't a way to get the number of sols/orbits that the current vessel achieved (example : 42 orbits since the vessel was launched ### A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
i need a way to get the number of Sols/Orbits of the active vessel (basicly just get the value from https://forum.kerbalspaceprogram.com/index.php?/topic/178121-18-timekeeper-102-2019-10-17-orbits-and-sols-counter/&tab=comments#comment-3446917) ### What is the issue that you are facing, that you would like resolved? How would it benefit players?
adding integration for Timekeeper would allow players to easily get the number of days that went by since landing, or the number of orbits a satellite has done since it was placed in orbit.

Is it an existing/new feature in the game that would benefit from support by this mod?


not that i know of

Describe the solution you'd like

add a way of getting the sol/orbit's value from the mod as a float or something (idk about the format, float is just a example) and a boolean to know whenether the float value are Sols or Orbits

A clear and concise description of what you want to happen.


get the current sol/orbit (sol vs orbit determined by boolean ?) value of the current vessel and the state

How would it be best that the feature is implemented? What sort of data may need to be sent by the mod to controllers? Would it require a digital signal, or an analogue one? Maybe it needs a terminal command to help use it, or a GUI button?


just get the sol/orbit value from the TimeKeeper mod as you do with variables like altitude for example ###

Describe alternatives you've considered


the only alternative is not adding a day/orbit counter, and it's not that big of a deal, but it would be neat to have ### A clear and concise description of any alternative solutions or features you've considered.
none ### What about the current features of the program do not quite, if at all, allow you to implement/carry out what you would like to do?
there aren't any ### What is the nearest feature in the mod (If there is one), that is along the lines of what you are suggesting? ...

Additional context


the timekeeper mod (https://forum.kerbalspaceprogram.com/index.php?/topic/178121-18-timekeeper-102-2019-10-17-orbits-and-sols-counter/&tab=comments#comment-3446917) ### Add any other context or screenshots about the feature request here. Any drawings, screenshots, pseudocode/logic diagrams, and more are all appreciated. Anything that you feel may help others understand your idea would be great!
@PBechon
Copy link
Collaborator

PBechon commented Jan 19, 2021

Here is the clickable link to the mod.

I think a simple message would be

struct TimekeeperData{
  bool isOrbitMode; //true if counting orbits, false if counting sols
  int count; // number of orbits/sols as reported by the Timekeeper mod
}

The first field should be TimekeeperModule.mode == TimekeeperModule.CountModes.Orbits. The second field should be a copy of TimekeeperModule.count

@Lucaspec72 would that be OK with you ?
@LRTNZ What is your opinion on support this mod as an optional dependency ?

@Lucaspec72
Copy link
Contributor Author

this would be perfect ^^ (i am a bit worried of the integer limit though, is timekeeper's count also a integer ? if not maybe a float could be better (i think it has a higher max value right ?))

@PBechon
Copy link
Collaborator

PBechon commented Jan 20, 2021

On Timekeeper side, an int is used. But in C# a int is 32 bit while in Arduino it is a 16bit int. I agree with your point, we should use the same thing on both side. How about this then (since long is 32 bit in Arduino) :

struct TimekeeperData{
  bool isOrbitMode; //true if counting orbits, false if counting sols
  long count; // number of orbits/sols as reported by the Timekeeper mod
}

@Lucaspec72
Copy link
Contributor Author

Sounds good.

@LRTNZ
Copy link
Collaborator

LRTNZ commented Jan 20, 2021

this would be perfect ^^ (i am a bit worried of the integer limit though, is timekeeper's count also a integer ? if not maybe a float could be better (i think it has a higher max value right ?))

You would be better off using a double as a larger int, than a float in most cases. Unless you want to deal with the imprecision of a floating point number?

@Lucaspec72
Copy link
Contributor Author

float was just a example, as long as we can get the value, it's format isn't that big of a deal. (PBachon's comment about using a long sounds like a good idea, since it doesn't have the 16bit limit of arduino integers. never used long variables though so i may be wrong)

@PBechon
Copy link
Collaborator

PBechon commented Mar 29, 2021

Based on a first try on my part, this seems to be difficult without modyfing Timekeeper. The attributes are not public so cannot be easily accessed from another mod.

@PBechon PBechon added enhancement New feature or request wontfix This will not be worked on labels May 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants