Jump to content

OxalysResourceConsortium

Members
  • Posts

    45
  • Joined

  • Last visited

Everything posted by OxalysResourceConsortium

  1. I'm going to have to read this post at least 20 times before I understand what parts about it are what I don't understand. Thanks anyways, I'll get back to you when I know what it is I want to ask.
  2. been searching trough this 285 page thread to see if I could find a straight answer to this but I couldn't so I figured I'd just ask. How is kOS integration coming along?
  3. Is there a way to run the following part of a script I'm working on UNTIL ALTITUDE > AltRng{ //Diagnostic PRINT statements begin SET DelTlv TO "at rest.". PRINT DelTlv AT (16,1). PRINT AltRng AT (0,0). PRINT TrmVel AT (14,0). //End of diagnostic PRINT statements IF VERTICALSPEED > TrmVel AND Tlv > 0 { UNTIL VERTICALSPEED = TrmVel OR VERTICALSPEED < TrmVel { SET Tlv TO Tlv-0.01. WAIT 0.2. //Diagnostic PRINT statements begin SET DelTlv TO "decreasing.". PRINT DelTlv AT (16,1). PRINT Tlv AT (5,2). //End of diagnostic PRINT statements }. }. IF VERTICALSPEED < TrmVel AND Tlv < 1 { UNTIL VERTICALSPEED = TrmVel OR VERTICALSPEED > TrmVel-5 { SET Tlv TO Tlv+0.01. WAIT 0.2. //Diagnostic PRINT statements begin SET DelTlv TO "increasing.". PRINT DelTlv AT (16,1). PRINT Tlv AT (5,2). //End of diagnostic PRINT statements }. }. }. multiple times with different values for the AltRng, TrmVel and Tlv variables each time without having to repeat the code multiple times in the same script. I've tried running it as a separate program called TrmVel-Tlv-Control-Uns (Uns = unstripped code) and then declare the three variables as parameters like so... DECLARE PARAMATER AltRng, TrmVel, Tlv. UNTIL ALTITUDE > AltRng { //Diagnostic PRINT statements begin SET DelTlv TO "at rest.". PRINT DelTlv AT (16,1). PRINT AltRng AT (0,0). PRINT TrmVel AT (14,0). .......(code continues) that way each time I need to run that code instead of copypasting it onto my script which would make it inelegant and really long (take up way too much space) I could just insert this code into the main script. SET AltRng TO [new value]. SET TrmVel TO [new value]. RUN TrmVel-Tlv-Control-Uns(AltRng, TrmVel, Tlv). Unfortunately this doesn't seem to work and it just seems to skip to the end of my main script (made visible by the quickly flashing diagnostic PRINT statements. The last part of my code locks the throttle (Tlv) to 100% and has a PRINT statement so that I know it has reached near the end of my main script //temporary code placeholder. CLEARSCREEN. PRINT "Throttling up to 100%". LOCK Tlv TO 1. //end placeholder //This is just to keep the program running for //testing purposes. WAIT UNTIL SHIP:LIQUIDFUEL = 0 AND SHIP:OXIDIZER = 0. Again I appreciate everyone's massive amount of patience for a complete noob:P. All the help and support is appreciated. I've got a long way to hopefully I'll get my commsat network up sometime this month.
  4. FPC compiler? So what did you have to do? Use a new compiler? EDIT: Just tested it, works fine so far. Thanks for the quick fix, appreciate the hard work. Keep it up.
  5. Don't know if this has been suggested before, but I did a quick search and couldn't find anything, so I thought I would nominate pizzaoverhead's Atmospheric Sound Enhancement mod to the RO modlist.
  6. The KSP folder is on my Desktop as /home/*USERNAME*/Desktop/KSP/KSP_0.23/KSP_0 .23_linux (4 kOS debug)/Plugins/PluginData/Archive Yes, I quadruple checked every folder and subfolder in both the KSP and Saturn directory and they are both set to the most permissive read and write settings. Problem is, even when I try to go to the settings menu on Saturn I get this little message.
  7. Everytime I try to open a file from my Archive I get a message saying "Access Violation."
  8. Thanks a Kerb-load bro, I was just about to start reading the documentation in notepad++ on how to define a language. Got as far as the comments which are easy enough.
  9. THIS!! I've been looking everywhere for this or at least instructions on how to make one myself as it would save a lot of time and make things easier. There already exists a kOS IDE but that's only for Windows. And by creating this we wouldn't need to have and entire dev effort to create a text editor just for this one language when there already exists a perfectly well-functioning OPEN-SOURCE platform we can use and easily keep up-to-date with the latest version of kOS. I would do it myself but I'm nowhere near familiar enough with KerboScript to take on this project. The user-defined language file could even be included with the download for the mod.
  10. The reason I put the WAITs inside the IFs is that without them, during testing (before I put the part that would throttle the craft up if it was going to slow) the throttle would be decreased too fast and the craft would slow down way too much. This way the throttle would be taken down a notch and then the script would wait a half second (originally tested it with 'WAIT 0.5.', but it was too slow so I changed it to 'WAIT 0.2.', and it worked pretty well) to let the vertical velocity change before checking it again and throttling down if necessary. Given your suggestions though it would probably be a better idea to nest the UNTIL's inside the IF's like so... IF VERTICALSPEED > 125 AND Tlvl > 0 { UNTIL VERTICALSPEED <= 125 { SET Tlvl TO Tlvl-0.02. WAIT 0.2. }. }. I'm not sure if the equals to or less than operator is recognized in KerboScript so if it isn't then I guess UNTIL VERTICALSPEED <= 125 would have to be replaced with UNTIL VERTICALSPEED = 125 OR VERTICALSPEED < 125
  11. Having trouble with this little bit of code meant to control throttle on the stock Kerbal X to keep it from going faster than terminal velocity. //1000-2800m Terminal vel. of 125 m/s PRINT "2800m ascent/125 m/s MAX.". UNTIL ALTITUDE > 2800 { IF VERTICALSPEED < 124 { SET Tlvl TO Tlvl+0.02. WAIT 0.2. }. IF VERTICALSPEED > 125 { SET Tlvl TO Tlvl-0.01. WAIT 0.2. }. }. print "next.". The vertical speed goes well beyond 130 m/s and the throttle doesn't respond at all. When I comment out the first part that is meant to keep the craft from going too slow by slowly throttling up the craft the second part that throttles down the craft works just fine. Here is what that code looks like. //1000-2800m Terminal vel. of 125 m/s PRINT "2800m ascent/125 m/s MAX.". UNTIL ALTITUDE > 2800 { // IF VERTICALSPEED < 124 // { // SET Tlvl TO Tlvl+0.02. // WAIT 0.2. // }. IF VERTICALSPEED > 125 { SET Tlvl TO Tlvl-0.01. WAIT 0.2. }. }. print "next.". So what am I not getting here. Here's the entire code
  12. Thanks, I probably won't need to keep that loop in there since I was just writing the code one piece at a time and testing it as I went. In the final version it should work without the loop then?
  13. this is a pretty old thread but if anyone has any info on this it'd be pretty useful. There are plenty of posts I've made that I'd like to get notifications if I get any responses to without having to get a notification for every other person that posts on that same thread.
  14. Wilco. Sorry about that. EDIT: Here's the post your referring to. However, wouldn't it be more convenient for everyone involved if links to previous versions were made readily apparent on the OP?
  15. Was just about to post this in the wrong thread, someone should lock that thread and put up a link at the top directing everyone to this one. So two questions, first one should be easy, second one takes a little explaining. Question 1: If I run remotetech and am in program mode, as soon as that program starts running, does it need contact with KSC to continue running? Question 2(What I was originally going to post in the 0.9 thread): Hey, so I was writing a program for Launch and Ascent Guidance of the stock Kerbal X (with the exception of one kOS module in between the command module and the parachute and a communitron on the side of the command module and the staging setup so the launch clamps release with the first "STAGE." command. craft file here) on my practice save (a separate copy of KSP 0.23.0 I run with no other mods installed so I can use it for debugging purposes) using kOS v0.11.0. I want to be able to get a comm network ready so I can have a probe ready for my Moho launch window in 5 Kerbal days so I'm using this to learn how to code in kOS. But every time I ran my code the launch clamps would release but the throttle wouldn't respond, so the Kerbal X craft would just end up crashing down on the launch pad. The following is the code I used: CLEARSCREEN. //Begin Countdown SET X TO 10. UNTIL X = 0 { PRINT "Launch in T -" + X. WAIT 1. SET X TO X-1. CLEARSCREEN. } PRINT "LAUNCH!". //Ascent LOCK STEERING TO UP. LOCK THROTTLE TO 1. STAGE. I was able to hunt down the problem in my code down to the "LOCK THROTTLE TO 1." command by commenting out everything else like so and running the program again: //CLEARSCREEN. //Begin Countdown //SET X TO 10. //UNTIL X = 0 //{ // PRINT "Launch in T -" + X. // WAIT 1. // SET X TO X-1. // CLEARSCREEN. // } //PRINT "LAUNCH!". //Ascent //LOCK STEERING TO UP. LOCK THROTTLE TO 1. //STAGE. When I ran that, the throttle did not respond (i.e. it stayed at 0%). So I figured I must have been typing the command wrong so I issued the same command in immediate mode LOCK THROTTLE TO 1. Surprisingly, the throttle immediately responded and went to 100%. So I tried the opposite. LOCK THROTTLE TO 0. And once again the throttle responded by going back down to 0% At this point I thought there might have been something wrong with my original program, so that the rest of the code, even though it was commented out, was causing the parser some kind of trouble. So I wrote a program called 'THROTTLEUP' to test this hypothesis. LOCK THROTTLE TO 1. Guess what? The throttle didn't respond at all. Soo... here's my KSP log, if it helps at all. I don't know what's wrong, so any help would be appreciated:confused:.
  16. So I found out this is the wrong thread, Everyone should head over to http://forum.kerbalspaceprogram.com/threads/68089-0-23-kOS-Scriptable-Autopilot-System-v0-11-2-13. This should be right on top of the OP and this thread should be locked so people don't wast their time posting in a dead thread.
  17. If I run remotetech and am in program mode, as soon as that program starts running, does it need contact with KSC to continue running?
  18. Tried using search functions on this thread but couldn't find the answer. What is immediate mode?
  19. Wow, I guess I didn't think that one trough, what about reentry though. Or am I just as boneheaded as I think I am?
  20. Thing is with stock aerodynamics there all sorts of neat tools and charts and guides and delta-V maps available for my disposal. Given the challenge I'm setting myself up for I have enough to deal with as it is without adding in more workload, though I may change my mind later on if I feel that I'm not being challenged enough.
  21. Disclaimer: I apologize if I posted this in the wrong section mods, if you could, please move it to the correct one. I'm looking to use kOS to write scripts to automate my craft. I'm an engineer not a pilot Jim! I love designing rockets and whatnot but hate actually piloting them, and feel like using MechJeb is kinda boring, especially given that this could be a chance for me to learn useful skills to help me further my education while having fun doing it. I flunked out of Calculus III so I'll need to brush up on my maths but I feel like if there is anything I need to learn maths-wise I can just watch KhanAcademy videos or something similar and teach myself. I still have some old Calculus textbooks with practice problems I can work with. What I want to learn to do first is how to calculate the ideal ascent profile by hand. I'm sort of debating with myself whether I should install F.A.R. or not but I'm thinking not as it would just eat up more of my RAM than I'm comfortable with. Right now I'm not going for a 100% realistic career. Once I feel more comfortable that I know what I'm doing and that I'm up to the challenge I might go for the realism overhaul, but not yet. I know that using kOS I can probably guesstimate the best ascent profile by trying out different ascent profiles for every new rocket design, but I just don't have that kind of time. Plus, I figure I probably have the smarts to learn the physics and math needed. This is probably a good way to motivate myself to finish the education I initially completely wasted being a lazy college student so any help would be appreciated .
×
×
  • Create New...