maculator Posted April 14, 2017 Share Posted April 14, 2017 Thank you again for explaining that to me. Link to comment Share on other sites More sharing options...
Probus Posted April 15, 2017 Share Posted April 15, 2017 I keep getting a "power starved" condition after a few minutes of flight even though I have loads of ec and I am connected to the KSC. Is this a common problem? Link to comment Share on other sites More sharing options...
dsonbill Posted April 16, 2017 Share Posted April 16, 2017 (edited) On 12/1/2016 at 3:28 PM, hvacengi said: I only see one output_log.txt, and it has the error for "run", not the error you mentioned for steering. Not a huge deal at this point I suppose, since I'll be able to test it myself when I get home from work. As Drew points out, kOS itself does not provide the support for RasterPropMonitor, so we don't really know how gui objects are instantiated there. I honestly cannot see this working well in the raster window, simply because of scale. That doesn't mean that we can't look at keeping a certain level of abstraction available so that it might theoretically be possible. But I wouldn't expect that to exist in the first incarnation. After the GUI system is working we can look at pulling out the necessary components so that it can support any kind of UI system available. Sorry for such a late reply, but take a look at what I've done. kOSPropMonitor is certainly not just theoretical. It works quite well, though scale is a thing. I'm here to inquire about when I should make my next release. It seems that every time I get back here, I release the thing right before you guys break it I'm still reviewing my code and kOS, and it looks like everything is pretty much OK from this preliminary stage. I'm assuming now no one really know from what Steve said, so I'll definitely be working off public release for now. I'll likely have to do a little bit once you merge dev in, but it's nothing I can't handle once I remember to come back and work on this again. Cheers. Edited April 16, 2017 by dsonbill Link to comment Share on other sites More sharing options...
sturdy-chainsaw Posted April 18, 2017 Share Posted April 18, 2017 does anyone know of any assembler and/or disassembler for kRISC? Link to comment Share on other sites More sharing options...
Probus Posted April 19, 2017 Share Posted April 19, 2017 Is it possible to have kOS do a pre-launch check of all your stages? During Pre-Launch it would do things like: check all your engines to verify they have (the right) fuel. check all your engines to verify that a 'stage' event will actually decouple and start the engine. do a cursory check of your staging to verify you don't decouple un-ignited engines. check your crewed vessels have parachutes. check for antennas. check for launch clamps... (RO) check your crew has supplies. check your vessel for adequate electricity and on and on... checking the items you are most likely to forget or mess up. Link to comment Share on other sites More sharing options...
TheRagingIrishman Posted April 19, 2017 Share Posted April 19, 2017 @Probus yes you just have to write it Link to comment Share on other sites More sharing options...
kcs123 Posted April 19, 2017 Share Posted April 19, 2017 12 minutes ago, Probus said: Is it possible to have kOS do a pre-launch check of all your stages? During Pre-Launch it would do things like: check all your engines to verify they have (the right) fuel. check all your engines to verify that a 'stage' event will actually decouple and start the engine. do a cursory check of your staging to verify you don't decouple un-ignited engines. check your crewed vessels have parachutes. check for antennas. check for launch clamps... (RO) check your crew has supplies. check your vessel for adequate electricity and on and on... checking the items you are most likely to forget or mess up. Some of things on list could be possible, for some I don't have a clue. For example, it is possible list all part suffixes and resorces with kOS. It should not be too hard to compare engine fuel needs with resources available. Even if you can't get proper fuel needs for engine, you can create fixed list with hand written resources per engine that can be used for comparison. To get possible info per stage when that stage is not happened yet I don't know. Someone with better knowlage of kOS would have to answer this. I don't have idea how that could be accomplished, but someone else might. Antennas and electricity can be checked, launch clamps too. Supplies, crew parachutes and other mod depended stuff can be checked if values that they use are visible trough right click part info in flight. It would be much easier to create script customized for each craft design, but then you would probably have already decently designed craft that will not need such script in first place. Compleately universal script that would cover all possible mods and craft designs ? I assume it will be very difficult to achieve with kOS. It might be easier to create custom plugin/dll that will be used inside VAB/SPH while you build craft. Similar to existing stock engineer info, just with extended information from mods. Link to comment Share on other sites More sharing options...
Probus Posted April 19, 2017 Share Posted April 19, 2017 (edited) 30 minutes ago, kcs123 said: Completely universal script that would cover all possible mods and craft designs ? I assume it will be very difficult to achieve with kOS. It might be easier to create custom plugin/dll that will be used inside VAB/SPH while you build craft. Similar to existing stock engineer info, just with extended information from mods. That's a good idea. Have complimentary mods for the VAB and kOS. Extensive Engineering Report would be a good start. Is there a way to have your kOS script start automatically when the ship loads? Edited April 19, 2017 by Probus Edit: boot.ks looks like it does the trick. Link to comment Share on other sites More sharing options...
danielboro Posted April 19, 2017 Share Posted April 19, 2017 19 minutes ago, Probus said: Is there a way to have your kOS script start automatically when the ship loads? yes boot script but you need to assign it in the VAB look at linuxgurugamer mods wernher checker EERC 25 minutes ago, Probus said: Edit: boot.ks looks like it does the trick. this was canceld Link to comment Share on other sites More sharing options...
Probus Posted April 19, 2017 Share Posted April 19, 2017 2 hours ago, danielboro said: yes boot script but you need to assign it in the VAB What exactly do you mean @danielboro? How do you assign it in the VAB? Do you have a link to the docs? Link to comment Share on other sites More sharing options...
Drew Kerman Posted April 20, 2017 Share Posted April 20, 2017 3 hours ago, Probus said: Do you have a link to the docs? Should be in the OP and ReadMe but here you go: http://ksp-kos.github.io/KOS_DOC/ Link to comment Share on other sites More sharing options...
sturdy-chainsaw Posted April 20, 2017 Share Posted April 20, 2017 where can i get a hold of kOS devs? Link to comment Share on other sites More sharing options...
Dunbaratu Posted April 20, 2017 Share Posted April 20, 2017 10 hours ago, sturdy-chainsaw said: where can i get a hold of kOS devs? Here? The github site for the project? /r/kos on reddit? There's a few ways. Why, what did you want to say? Link to comment Share on other sites More sharing options...
danielboro Posted April 21, 2017 Share Posted April 21, 2017 @Probus in the pic the line marked as "boot file" choos a file that is in boot dir in scrips dir /KSPDIR/ships/scrips/boot Link to comment Share on other sites More sharing options...
Probus Posted April 21, 2017 Share Posted April 21, 2017 Ah, you have to have a file in the boot directory before the line shows up. Link to comment Share on other sites More sharing options...
sturdy-chainsaw Posted April 21, 2017 Share Posted April 21, 2017 (edited) 17 hours ago, Steven Mading said: Here? The github site for the project? /r/kos on reddit? There's a few ways. Why, what did you want to say? i want to get a kRISC disassembler. i'll try on reddit, thanks for the suggestion. Edited April 21, 2017 by sturdy-chainsaw Link to comment Share on other sites More sharing options...
Drew Kerman Posted April 22, 2017 Share Posted April 22, 2017 14 hours ago, Probus said: Ah, you have to have a file in the boot directory before the line shows up. Did you not see my link to the docs?? Link to comment Share on other sites More sharing options...
Probus Posted April 22, 2017 Share Posted April 22, 2017 2 hours ago, Drew Kerman said: Did you not see my link to the docs?? Yeah. I dug through the docs and finally found it. Link to comment Share on other sites More sharing options...
kerboman25 Posted April 22, 2017 Share Posted April 22, 2017 hello fellow kerbonauts i'm having a bit of a strugle with a program that stabilises my dragon 2 derivate when landing (by using thrustlimiting). I cannot properly subtract the difference of the UP direction to the direction that im going in. i tried to do this by doing UP-FACING but that didn't work out well. Can you guys tell me the best way to keep the craft facing perfectly up (or retrograde for when i'm burning at higher altitude) by using differential throttling? thanks in advance Link to comment Share on other sites More sharing options...
ElWanderer Posted April 22, 2017 Share Posted April 22, 2017 (edited) 1 hour ago, kerboman25 said: hello fellow kerbonauts i'm having a bit of a strugle with a program that stabilises my dragon 2 derivate when landing (by using thrustlimiting). I cannot properly subtract the difference of the UP direction to the direction that im going in. i tried to do this by doing UP-FACING but that didn't work out well. Can you guys tell me the best way to keep the craft facing perfectly up (or retrograde for when i'm burning at higher altitude) by using differential throttling? thanks in advance UP and FACING are directions, the addition and subtraction of which is a bit of a mystery to me. It might work better if you take their vectors e.g. LOCK diff_vector TO UP:VECTOR - FACING:VECTOR. Edit: but this doesn't answer your question about differential throttling, sorry. Edited April 22, 2017 by ElWanderer didn't read the previous post properly :( Link to comment Share on other sites More sharing options...
kerboman25 Posted April 22, 2017 Share Posted April 22, 2017 Thank you for the reply i just tested it and it seems that its not working either so i'l have to try some other way or wait until someone has another idea to make it work Link to comment Share on other sites More sharing options...
ColKlonk2 Posted April 29, 2017 Share Posted April 29, 2017 On 4/21/2017 at 5:03 PM, sturdy-chainsaw said: i want to get a kRISC disassembler. i'll try on reddit, thanks for the suggestion. You'll be better off looking at Object code (OOP) and how to interface this to C-Sharp. IOW.. dynamically obtaining function addresses. Or just ask the KOS developers for their source code. Link to comment Share on other sites More sharing options...
xel'lotath Posted May 12, 2017 Share Posted May 12, 2017 I'm new to kOS and to programming and I'm finding the learning curve very steep. I've made a couple of simple scripts relating to launching to test myself, which don't work, and I don't understand why. The first one is designed to hold the ship to the launch tower until it has built up enough thrust to climb away. The terminal doesn't say anything but the second 'STAGE.' never gets executed and the rocket just sits on the launchpad burning all its fuel, even though the TWR goes as high as 4. SET g TO body:mu / (altitude + body:radius)^2. SET myEngine TO SHIP:PARTSTAGGED("Firststage")[0]. SET twr TO myEngine:THRUST / (g * ship:mass). STAGE. WAIT UNTIL twr > 1. STAGE. The second one (actually a pair of scripts - 'launch.ks' imports 'ascent.ks') is a modification of a launch script from CheersKevin's YouTube series (https://github.com/gisikw/ksprogramming/commit/380d9bbf3b19268da081aa17eb8ca3ff910ab1b6). The terminal says 'number of arguments passed in didn't match the number of DECLARE PARAMETERS. Called with not enough arguments', highlighting 'PARAMETER profile' and the corresponding variable 'ap'. I guess it doesn't recognize 'ap' as being the 'profile'? launch.ks: https://pastebin.com/VyxZGfR3 ascent.ks: https://pastebin.com/0kQh83we If anyone could help with either of these I'd be very grateful. I've spent a long time trying and failing to understand how these things work. Link to comment Share on other sites More sharing options...
Starman4308 Posted May 12, 2017 Share Posted May 12, 2017 (edited) You should, instead of setting twr once, use the LOCK command, which re-evaluates that expression repeatedly. Will make the post more detailed when I'm back at my desktop. EDIT TIME: So, while I'm not sure on how the second line is working (you can always try something like PRINT myEngine to make sure it's what you think it is), the bug is pretty obvious. At line 3, it sets the variable twr to the current value of myEngine:THRUST / (g * ship:mass). It then never updates itself. SET is a one-time thing. There are two solutions: #1, replace line 3 with "LOCK twr TO myEngine:THRUST / (g * ship:mass). You may then want to add an UNLOCK command after line 5 so that you don't waste CPU cycles continuing to compute that. The difference between SET and LOCK is that LOCK is evaluated at every tick. #2: Run the SET command in a loop, as so: SET g TO body:mu / (altitude + body:radius)^2. SET myEngine TO SHIP:PARTSTAGGED("Firststage")[0]. SET twr TO 0. // Give it a dummy initial value before running the loop. STAGE. UNTIL twr > 1 { SET twr TO myEngine:THRUST / (g * ship:mass). WAIT 0.1. // Wait 0.1 seconds in between runs through the loop. General good practice since kOS takes more electricity the more evaluations it does. } STAGE. As to why launch.ks fails... the first command is "RUN ascent.ks"... without any parameters, and the ascent.ks script expects three parameters. Edited May 12, 2017 by Starman4308 Clarification and expansion Link to comment Share on other sites More sharing options...
xel'lotath Posted May 13, 2017 Share Posted May 13, 2017 Wow, thanks for the quick response. The solution to the TWR issue worked great - I guess the lesson for me is to make sure sure I know exactly what terms like SET and LOCK mean before I use them. 56 minutes ago, Starman4308 said: the first command is "RUN ascent.ks"... without any parameters, and the ascent.ks script expects three parameters. I'm afraid I don't know what you mean - CheersKevin's script starts off with a RUN command too, without parameters. How do I add these parameters? Sorry if I'm being dense. Link to comment Share on other sites More sharing options...
Recommended Posts