Jump to content

CAN bus - Parts communicating with other parts


jarmund

Recommended Posts

Since I'm both a coder and a KSP player, I decided to give modding a go. I somehow inspired myself when making a comment somewhere a while back saying something along the lines of "...Because the numpty who installed the accelerometer on the pod couldn't be bothered to connect it to the CAN bus".

The keyword here being CAN bus. I want my ships to have one. Partially because I like the concept, partially because it'd be a nice project to learn the KSP API.

For those not aware of what a CAN bus is, think of it as a form of network made for inter-device communications on a scale much lower than ethernet and the likes. What it does in it simplest form is allow electronics to communicate with each other without having to implement, for example, a full TCP/IP stack. It is found in many, if not most, modern vehicles, cars being the most familiar application. For those not yawning themselves to death this far down the paragraph, feel free to read more about it here.

So, the question now is: What would a CAN bus be used for?

My rough ideas would include:

- Auto-grab science from instruments, similar to what Science Containers does, but with some alterations/additions/modifications.

- Inter-vessel communication, allowing the above to be done wirelessly with nearby (physics range, I would guess) vessels.

- Vessel remote control, not having to focus on that vessel to control it. I remember seeing a mod for this, but i can't remember its name. It's not important anyway.

What else would a CAN bus be used for in KSP? I'm especially after what could be achieved by letting parts local to one craft talk to each other.

And yes, I am aware that most, if not all, of what is mentioned above already exists in one form or another through other mods, but think of this mainly as a training exercise than a mod idea.

Edited by jarmund
Link to comment
Share on other sites

There's also this topic

http://forum.kerbalspaceprogram.com/threads/113260-WIP-Elektronics-Logics-and-electronic-circuits!

And my proposal for the proximity sensor.

Do you think some kind of cooperation could be an idea?

While the electronics-mod is a lot more detailed than the scope of what i want to achieve, the proximity sensor is certainly something that could be useful for this. In fact, most types of sensors would be useful, so that a controller node can act on sensor input.

As for cooperation, it could be an idea, but I believe I am curently lacking in ability to keep up with any form of cooperation at this point due to:

I'm still just getting into KSP modding (I'm more of a linux dev, and android dev, so perl and java are my primary languages).

+ I have very little time on my hands (too many kids, too little elbow room, can barely hear myself think during daytime)

= It would be faster for you to just do it yourself rather than wait on me to catch up

Link to comment
Share on other sites

Not me, I'm very strong in the visualizing department and logic too (can build a moving machine inside my head in seconds, textured or wireframe, fly myself through).

But the syntax of both maths and programming languages always makes me wanna cry. I can help someone with designing a structure though.

Link to comment
Share on other sites

Additional ideas:

Proximity sensor activating landing gear, lights, and other things that can be assigned to action groups

Barometer deploying solar panels

SAS disabled if electrical power runs low (in addition to enabling "fuel flow" from an assigned backup battery)

Thermometer ditching a heat-shield

Fuel tank decoupling once empty

Basically, a part that is set to be connected to the CAN bus can trigger an action group.

In addition to obvious things such as a centralized data readout for all attached instruments, for example, right clicking the pod or the controller gives allows you to see data for thermometer, data store, and others, in one single context menu.

Any others?

Link to comment
Share on other sites

On your Vessel remote control all the mods so far your still limited to physics range and on your menu, I wouldn’t put on the pods context menu that could be a problem depending on what all mods one has installed that can get real long and you can't get it on screen.

Link to comment
Share on other sites

On your Vessel remote control all the mods so far your still limited to physics range and on your menu, I wouldn’t put on the pods context menu that could be a problem depending on what all mods one has installed that can get real long and you can't get it on screen.

Limited to physics range is a given. Also, I consider it unrealistic to have something as simple as a CAN bus trying to compensate for transmission-delay when going interplanetary. Besides, for that we have probe cores and remote tech.

Anyway, for now I'm just thinking aloud (in written form, at least) about something semi-useful to work towards as a learning experience. Any great ideas to include would be welcome, as i'm not entirely sure how useful the work would be other than the learning experience itself.

Link to comment
Share on other sites

Would like to see a mod that added a life span on battery’s and solar panels and for your deploying solar panels be base on battery level just off the top of my head and maybe a heating and cooling system for life support systems.

EDIT- Think for long missions the probes would have to go in sleep mode and that is where it sounds like your mod comes in to play on that part of it.

EDIT- There are 2 mods that, I know of that adds a life span to RTG but both, I don't see how to add it to battery or solar panels.

Edited by Mecripp2
Link to comment
Share on other sites

Would like to see a mod that added a life span on battery’s and solar panels and for your deploying solar panels be base on battery level just off the top of my head and maybe a heating and cooling system for life support systems.

Different battery types.... LiPo decays if charge is stagnant, and Lead+Acid suffers if left without charge for extended periods of time. I like it. Not directly related to my original idea, but realistic batteries sounds both fun to do and use. Makes Eeloo probes more challenging.

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...