RizzoTheRat Posted December 6, 2019 Share Posted December 6, 2019 Sounds like your code is completing without going through the bit you want it to do. A couple of common issues I've messed myself up with a few times is to define the function but not actually call it, or have a bit of script to do a task but forget to put it in a loop so it just runs once and then stops. Best thing I can advise to try and debug your problem is to put in plenty of print statements to try and work out where it's going in the code. In general I have a common boot script that copies various other files to the KOS module and runs them, so that I don't have to modify the boot script and revert back to VAB to reload it, which sounds like what you're trying to do. Quote Link to comment Share on other sites More sharing options...
Albert7df Posted December 9, 2019 Share Posted December 9, 2019 Hi, i'm a fanatic to this game and specially to this mod, I would like this mod a bit more realistic regarding as how some telemetry is handled. Currently, you can access all information without restriction, but for instance, in real life, is impossible to know exactly where the position is or speed has, or some other telemetry reading without a direct communication to a ground station or GPS connection. Also the device must be very precise at longer distances. I would like the mod take into account this rule as option. Other realism options like precision of this reading depending of the epoch could be added, but i think it's a bit more complex. Is it a right place to make this request? Quote Link to comment Share on other sites More sharing options...
Kartoffelkuchen Posted December 13, 2019 Share Posted December 13, 2019 On 12/9/2019 at 8:10 AM, Albert7df said: Hi, i'm a fanatic to this game and specially to this mod, I would like this mod a bit more realistic regarding as how some telemetry is handled. Currently, you can access all information without restriction, but for instance, in real life, is impossible to know exactly where the position is or speed has, or some other telemetry reading without a direct communication to a ground station or GPS connection. Also the device must be very precise at longer distances. I would like the mod take into account this rule as option. Other realism options like precision of this reading depending of the epoch could be added, but i think it's a bit more complex. Is it a right place to make this request? Well, noone forces you to use all the build-in accessible flight variables like altitude, airspeed etc. You are free to code your very own IMU and so on by using the data you can get from the stock in game sensor parts, would actually be quite interesting to try that. Quote Link to comment Share on other sites More sharing options...
Albert7df Posted December 13, 2019 Share Posted December 13, 2019 Are you saing to create like a wrapper around KOS in kerboscript? Many times i had think to donwload the code and make tiny modifiations to have some of this features, but the debug process is a hell, and more when it's not my code. What IMU is? 4 minutes ago, Albert7df said: 58 minutes ago, Kartoffelkuchen said: Well, noone forces you to use all the build-in accessible flight variables like altitude, airspeed etc. You are free to code your very own IMU and so on by using the data you can get from the stock in game sensor parts, would actually be quite interesting to try that. Are you saing to create like a wrapper around KOS in kerboscript? Many times i had think to donwload the code and make tiny modifiations to have some of this features, but the debug process is a hell, and more when it's not my code. What IMU is? Quote Link to comment Share on other sites More sharing options...
RizzoTheRat Posted December 16, 2019 Share Posted December 16, 2019 Inertial Measurement Unit. Basically a set of gyroscopes that can be used to measure acceleration in different directions. https://airandspace.si.edu/collection-objects/inertial-measurement-unit-space-shuttle kOS can access the output of science instruments you put on your vessel, so you can use the accelerometer to work out your ships acceleration. I've done this before to estimate drag by comparing thrust, mass and acceleration, but you could use the acceleration to calculate your speed and some fancy maths to then work out your location. You could also use the inbuilt vector system to imitate direction radio navigation, put in some ground stations and then measure the angle between them. Apollo also used a telescope and sextant as a backup method to update the INS, but that would be a bit trickier in KSP as you only have the planets to take bearings on rather than stars. I personally see kOS as a higher level system and accept that other instruments/systems have already worked out my velocity and location and I'm just putting the control layer over the top, but it's a powerful system so you should be able to work out things like ship:velocity:orbit by other means. Quote Link to comment Share on other sites More sharing options...
Albert7df Posted December 18, 2019 Share Posted December 18, 2019 (edited) On 12/16/2019 at 4:41 AM, RizzoTheRat said: Inertial Measurement Unit. Basically a set of gyroscopes that can be used to measure acceleration in different directions. https://airandspace.si.edu/collection-objects/inertial-measurement-unit-space-shuttle kOS can access the output of science instruments you put on your vessel, so you can use the accelerometer to work out your ships acceleration. I've done this before to estimate drag by comparing thrust, mass and acceleration, but you could use the acceleration to calculate your speed and some fancy maths to then work out your location. You could also use the inbuilt vector system to imitate direction radio navigation, put in some ground stations and then measure the angle between them. Apollo also used a telescope and sextant as a backup method to update the INS, but that would be a bit trickier in KSP as you only have the planets to take bearings on rather than stars. I personally see kOS as a higher level system and accept that other instruments/systems have already worked out my velocity and location and I'm just putting the control layer over the top, but it's a powerful system so you should be able to work out things like ship:velocity:orbit by other means. The inercial system could give you acceleration and orientation of the ship (Also by some image processing of the the starts), but "following" the position and speed by integrating of those parameter is very inaccuratelly in real life, once you have the information from ground, and with no rocket propulsion also you could predict position and speed, but frecuently you need updates because the little variations of all the solar system. So.. i thinks for more realism a very easy patch rule could be like this: If no connetion (or not sight view) with some ground station then no position and speed are available. Also the position and speed should be given with a delay. I'm assuming the position and speed is gathered by the doopler effect on radio wave emited by the ship and usual radars detection. This patch is very simple to do. I'm waiting also the feature to emulate a KSC main program running on the ground and a vessel program running. I have read it's going to include in next releases. With this feature, this realism would be almost natural. Edited December 18, 2019 by Albert7df adding Quote Link to comment Share on other sites More sharing options...
Drew Kerman Posted January 28, 2020 Share Posted January 28, 2020 Finally flying a ship that contains two separate CPUs, one for the lifter rocket and another for the payload to be deployed. I have the naming priority setup so the probe is properly named once it is deployed, but I can't seem to access that name until the payload becomes its own ship. Is there any way a future kOS version could get at this information? Quote Link to comment Share on other sites More sharing options...
kcs123 Posted January 28, 2020 Share Posted January 28, 2020 12 hours ago, Drew Kerman said: Finally flying a ship that contains two separate CPUs, one for the lifter rocket and another for the payload to be deployed. I have the naming priority setup so the probe is properly named once it is deployed, but I can't seem to access that name until the payload becomes its own ship. Is there any way a future kOS version could get at this information? Have you tried to play arond with craft naming feature under command module PAW ? For each probe is possible to set specific ship name that should be preserved even after undocking. IIRC, it is stock feature and it should prevent creating random craft names after separation. It is being a while, but I think it is possible to create script in a way that use exact vessel name instead generic "SHIP". Hope that it helps. Quote Link to comment Share on other sites More sharing options...
Drew Kerman Posted January 28, 2020 Share Posted January 28, 2020 3 hours ago, kcs123 said: For each probe is possible to set specific ship name that should be preserved even after undocking. IIRC, it is stock feature and it should prevent creating random craft names after separation. That is the naming priority that I set up. I can’t seem to reference it tho in flight Quote Link to comment Share on other sites More sharing options...
fulgur Posted February 7, 2020 Share Posted February 7, 2020 Hey, does anyone know anything about the 'kode' IDE at https://github.com/TN-1/Kode_Desktop/tree/0.5.0? The last update I can find was 4y ago... Quote Link to comment Share on other sites More sharing options...
KnedlikMCPE Posted February 9, 2020 Share Posted February 9, 2020 Just a question: How can i do the following? Wait until surface prograde is heading 90, pitch 87, then follow pitch 3 lower than surface prograde. Quote Link to comment Share on other sites More sharing options...
Kerbal007 Posted February 23, 2020 Share Posted February 23, 2020 Just curious if KOS integrates with probe control room at all ? Cheers Quote Link to comment Share on other sites More sharing options...
infinite_monkey Posted February 24, 2020 Share Posted February 24, 2020 On 2/9/2020 at 5:50 PM, KnedlikMCPE said: Just a question: How can i do the following? Wait until surface prograde is heading 90, pitch 87, then follow pitch 3 lower than surface prograde. It'll be hard for prograde to be EXACTLY (90, 87), but heading shouldn't matter that much for 87 degrees, so I'd suggest this: wait until vang(ship:up:vector, ship:velocity:surface) > 3. lock steering to heading(90, 90 - vang(ship:up:vector, ship:velocity:surface) - 3). Quote Link to comment Share on other sites More sharing options...
Drew Kerman Posted February 25, 2020 Share Posted February 25, 2020 On 2/23/2020 at 5:33 PM, Kerbal007 said: Just curious if KOS integrates with probe control room at all ? Cheers Yep, use this Quote Link to comment Share on other sites More sharing options...
Kerbal007 Posted February 26, 2020 Share Posted February 26, 2020 Thanks mate !!! Quote Link to comment Share on other sites More sharing options...
infinite_monkey Posted March 3, 2020 Share Posted March 3, 2020 I have an annoying issue, not sure if it can be solved: some keyboard entries are not catched by the kOS terminal and toggle other screens. Most notably, since I just installed probe control coom, "c" switches camera to the control room. Or (on German Keyboard it's Alt Gr + 0) "}" toggles EVE settings. Is there a way to get around this? Quote Link to comment Share on other sites More sharing options...
Stone Blue Posted March 3, 2020 Share Posted March 3, 2020 2 hours ago, infinite_monkey said: I have an annoying issue, not sure if it can be solved: some keyboard entries are not catched by the kOS terminal and toggle other screens. Most notably, since I just installed probe control coom, "c" switches camera to the control room. Or (on German Keyboard it's Alt Gr + 0) "}" toggles EVE settings. Is there a way to get around this? idk... "c" works ok for me... Just make sure you click on the terminal first, and make sure the terminal outline/border is lit up green? Quote Link to comment Share on other sites More sharing options...
infinite_monkey Posted March 3, 2020 Share Posted March 3, 2020 6 minutes ago, Stone Blue said: idk... "c" works ok for me... Just make sure you click on the terminal first, and make sure the terminal outline/border is lit up green? It is. It happens in the middle of typing a command, which makes it so annoying. The c issue seems to be new, might have to do with probe control room. Quote Link to comment Share on other sites More sharing options...
Stone Blue Posted March 3, 2020 Share Posted March 3, 2020 11 minutes ago, infinite_monkey said: It is. It happens in the middle of typing a command, which makes it so annoying. The c issue seems to be new, might have to do with probe control room. hmm.. that is weird? ... does this *only* happen with PCR *open*?... Quote Link to comment Share on other sites More sharing options...
infinite_monkey Posted March 3, 2020 Share Posted March 3, 2020 2 minutes ago, Stone Blue said: hmm.. that is weird? ... does this *only* happen with PCR *open*?... No, it actually OPENS pcr. Or the EVE settings in case of "}" Quote Link to comment Share on other sites More sharing options...
ElWanderer Posted March 3, 2020 Share Posted March 3, 2020 4 hours ago, infinite_monkey said: I have an annoying issue, not sure if it can be solved: some keyboard entries are not catched by the kOS terminal and toggle other screens. Most notably, since I just installed probe control coom, "c" switches camera to the control room. Or (on German Keyboard it's Alt Gr + 0) "}" toggles EVE settings. Is there a way to get around this? It's a known issue: https://github.com/KSP-KOS/KOS/issues/2659 The best way around it is probably to write your code outside of kOS (which is generally preferred anyway) and avoid typing in the terminal (which makes it hard to test code). Quote Link to comment Share on other sites More sharing options...
infinite_monkey Posted March 3, 2020 Share Posted March 3, 2020 1 hour ago, ElWanderer said: It's a known issue: https://github.com/KSP-KOS/KOS/issues/2659 The best way around it is probably to write your code outside of kOS (which is generally preferred anyway) and avoid typing in the terminal (which makes it hard to test code). Ah, thanks for the hint. Yes, I usually write outside of kOS, but I usually not use bootfiles until I'm done experimenting. So I have to type at least "switch to 0"... ;-) And sometimes I do just some quick checks in order to see if a formula is correct, the contents of a list... Quote Link to comment Share on other sites More sharing options...
Lookerksy Posted March 14, 2020 Share Posted March 14, 2020 Has anyone know how to get position about center of mass? Thanks. I use Ship:Altitude, but it doesn't work well. It's about position of root part, not center of mass. Quote Link to comment Share on other sites More sharing options...
Corax Posted March 14, 2020 Share Posted March 14, 2020 (edited) On 3/3/2020 at 11:15 PM, infinite_monkey said: Ah, thanks for the hint. Yes, I usually write outside of kOS, but I usually not use bootfiles until I'm done experimenting. So I have to type at least "switch to 0"... ;-) And sometimes I do just some quick checks in order to see if a formula is correct, the contents of a list... It's been a while, but I used to have a default boot file that did only one thing: load another script from the archive that has the same name as the vessel (which of course you read from within the boot script), and run that. Everything else gets set up there, and you can safely edit that file outside the game. EDIT: If you don't want to use the ship's name, you might use the CPU's name tag. Doesn't make the issue go away of course, but may be one less stumbling block. Edited March 14, 2020 by Corax Quote Link to comment Share on other sites More sharing options...
Alchemist Posted March 14, 2020 Share Posted March 14, 2020 4 hours ago, Lookerksy said: Has anyone know how to get position about center of mass? Thanks. The way kOS handles it, vessel:position returns the center of mass. And the coordinate system is ship-centered, so for current vessel ship:position=v(0,0,0) Not the most obvious thing, but that's how it works Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.