Jump to content

Trewor007

Members
  • Posts

    86
  • Joined

  • Last visited

Everything posted by Trewor007

  1. I think there might be problem with setting IPU thou the App Control Panel, when i wanted to rise it I managed to delete the number but i can't type in a new value it stays on 50 and its grey every time i click on it. changing it with the console works.
  2. but my error or KOS? i also noticed it not always complaining about that despite the fact 90% of my code is build that way(disk space saving)
  3. i see that the new KOS does not like when I put no space between commands like this: set x to 0.set y to 0.wait 1. It says something about a unexpected token. that's a bug or something intentional?
  4. if I read the steddyj problem right... The debris You are targeting will be the closes on, so its model has to be loaded. knowing that I would set my "targeting" criteria to "name of the ship" and if the ship in mind is :LOADED . This will narrow the search to about 2,5km.
  5. Steven Mading Thanks Man as always You are saving my day. The "ship:body:position:vec:normalized" is a relict copied from my old code I've never bothered to change that. Gaiiden I've seen Your code this morning, and I was very impress by it, but when i tried that code it wasn't working properly probably due the orientation of the control part.
  6. Hi. Im looking for some equations for Areocapture and Areobraking, i know there are on-line calculators for that stuff, but this is for my KOS driven craft. Can anyone point me to some page where i can find this kind of stuff? Thanks!
  7. ouch I'm trying to write a code that will check the slope angle of the current rover position. I've managed to make an accurate measurement witch the code below . But it works only if the slope is right in front (or back) of the rover, when the slope is on the side (left wheels higher/lover than the right ones) the program does not "see" the slope because of how ship:facing:vector works. set line0 to ship:body:position:vec:normalized. set line1 to ship:facing:vector:normalized. set katprzod to 90-vang(line0,line1). print katprzod at(0,24). that why Im interested in measuring rotation around a vector. I thing that can help me check the side slope angle
  8. Hi is there, a way to check in KOS, the rotation of my rover around, a axis made of a vector?
  9. there is one thing that's buging me about this bug. all the drawn vectors are pointing in a good directions, and they are precise on target. So that means they "know" where Enmy Kerman is, also they know where ate the other rovers. So i suspect the problem is somewhere else. Maybe the controlled rover has a unnecessary "round()" somewhere in its positioning code. But that's just a theory.
  10. set line0 to duna:position:vec.set line1 to ship:facing:vector. set katprzod to 90-vang(line0,line1).print katprzod at(0,24). With the code above i can now check the slope angle in front and behind my rover. what im looking for is a way to build a vector sticking out from the side of my rover and responding to the rovers roll (Q E).
  11. Thank Cairan this is something i can start working with. Now when You mention it... there is a high chance the code needs to wait a bit longer. Edit: I dont know it is a bug, but everytime i use vecdrawargs() my ram usage constantly goes slowly up to 100% and crashes the game.
  12. Hi. My problem is a little bit to complicated for my English level so I'll explain it with a simple example: My program runs in a infinite loop. at time1 i want to check my latitude. I set my latitude from time1 to "x". some time passes at time2 i want to check my latitude. (again) I set my latitude from time2 to "y". i check the difference in my latitude(x-y). i get a number from it.(lets call it z) I dont know if its because of the infinite loop or something different but my "z" is always 0. For this simple example i know how to make the code run exactly once. I just use, a additional variable and a IF. but in my real problem (not the example) i want to store latitude, longitude, angle of slope and (after 0.15 update) Karbonite abundance. and not just check them once or twice but a little bit more, and that is: A) to much code for a IF method. B)not flexible C) just insane. I hope the thing i said have some sense. So my question is: How i can store large amount of data, using as less code as plausible.
  13. My newest problem is, a very shy planet. For some reason KOS does not see Duna and because of that my probe doesn't know when to stop accelerating. Encounter command and :patches suffix bought have this issue.
  14. HI! I was creating, a part of the code checking current Angle to prograde. Because my 3 point for checking the angle (prograde, kerbin, ship) are 3 different thing they don't share all the necessary suffixes. So i needed to get creative. So now im with a perfectly working code except one thing. the calculation is "rotated" by 90° so 0° instead on being on prograde and retrograde is on the fairest and closest point from the sun. And i have no idea why. set svx to ship:PROGRADE:YAW -sun:position:x. set svy to ship:PROGRADE:PITCH -sun:position:y. set svz to ship:PROGRADE:ROLL -sun:position:z. set line3 to v(svx,svy,svz). set line4 to v((-1)*kerbin:position:x,(-1)*kerbin:position:y,(-1)*kerbin:position:z). set kat2 to vang(line3,line4). if sun:DISTANCE < kerbinx:altitude+sun:radius {set kat21 to 360-kat2.} else {set kat21 to kat.}. print kat21 at (6,4). print kat2 at (6,5). EDIT: Problem eliminated. set vpp to V(0,-100,0). set svx to ship:PROGRADE:yaw -z:position:x. set svy to ship:PROGRADE:pitch -z:position:y. set svz to ship:PROGRADE:roll -z:position:z. set line3 to v(svx,svy,svz). set line4 to v(x:position:x, x:position:y, x:position:z). set line6 to VCRS(line3, vpp). set kat2 to vang(line4,line6). if z:DISTANCE < kal {set kat21 to 360-kat2.} else {set kat21 to kat2.}. print kat21 at (6,4).
  15. Steven Mading Thanks. Now the codes is 100%. NoPanShabuShabu That method gives sometimes very strange readings like 518. BTW: is there a suffix for :Body with will give mi the radius of SOI of currently orbiting body? Something like Ship:Body:RadSOI? if not where can I propose that to the mod creator?
  16. set velKerbinFromSun to (kerbin:velocity:orbit - sun:velocity:orbit). KOS is still rejecting this line. I get " Object reference not set to an instance of an object" message all the time ;/
  17. SnappingTurtle Ive remember seeing on youtube docking with KOS. So You can try. a ternary operator? Nope ( but not 100% sure). Steven Mading I donk know why but my KOS is protesting at this line;/ set velKerbinFromSun to (kerbin:velocity:orbit - sun:velocity:orbit). Its probably a glitch on my ksp side (I've used :velocity:orbit literally yesterday). I've done it, a little bit different ( read as: its more code, and its a mess.), in relation to sun position the plane is divided in 4 squares and im checking in witch one is kerbin and duna at one time. that's a lot of combinations but its working for now.
  18. Yes there is. that depends. Good question, not very specific but good. If U R using a loop just use "break." if not use REBOOT or SHUTDOWN. if it comes just to the facing of the part: http://ksp-kos.github.io/KOS_DOC/structure/part/index.html but if U want its position in the ship than probably no. (i have no idea really). kos has hard coded names of the planets so its kinda see the difference between planet and a ship. however difference between a rover and a probe is, a no no.
  19. Steven Mading thanks! that was way more easy than my method, now my code is 50% time correct (and that's 49% increasement in accuracy). now I just need to figure out, a condition to tell apart when duna is behind and when in front of me. Who needs functions when we have vectors
  20. How can i check the current phase angle? There is tons of info how to calculate it for a transfer, but nothing about my current kerbin-duna phase angle.
  21. Is there a way to set multiple things to one number? so i don't have to write it like so: set a to 0. set b to 0. set c to 0. but something like this: set a, b, c, to 0
  22. falcoiii Without the source code we cant tell You very much. my guess is that after lunching Your 1 code executed properly and went back to the main program. and then the mail program look up some condition for choosing the next program. And the problem is or in that condition or the main program is looking for 2 sub program in a wrong volume. but that's all just speculation.
  23. Hi. I need some advice for my code. The circularizing part of the code doesn't work like I intended. the main problem is the code doesn't know when the ship its way beyond its apoapsis. I will be wery grateful for any tip regarding this issue. wait 8. toggle ag10. LOCK THROTTLE TO 1.0. set k to 0. set wys to 0. set l to 0. set gie to 0. set b to 0. set f to 0. set p to 0. //declare parameter orbita. clearscreen. print "Welcome Commander.". print "Setting flight parameters.". print "Flight target: Kerbin orbit..". print "Altitude: " + orbita + "M.". wait 3. clearscreen. stage. until l = 1 { set salt to ship:altitude. set twr to ship:MAXTHRUST/ship:mass. set wys to kerbin:radius + salt. set gie to kerbin:mu. if k = 0 {lock steering to up + R(0,0,180).}. print "Altitude: " + round(salt) + "m " at (0,0). print k at (0,8). print "Program:" at (0,2). print "Eccentricity: " + round(ship:obt:ECCENTRICITY,4) at (0,1). if salt < 10000 {print "Going up " at (10,2).}. print "TWR: " + round(twr,2) at (0,6). print "ISP: " + b at (0,7). LIST ENGINES IN myVariable. FOR eng IN myVariable {set b to eng:ISP. }. if stage:solidfuel < 1 and k = 0 {stage. set k to 1.}. if salt > 10000 and k < 2 { print "gravite turn" at (10,2). lock steering to up + R(0,-45,180).}. if throttle = 0 {print "waiting for circulisation" at (10,2).}. when ship:apoapsis >= orbita + (orbita * 0.005) and k < 2 then {lock throttle to 0. }. if eta:apoapsis < 55 and salt > 40000 and k < 2 {lock steering to up +R(0,-90,180).}. if eta:apoapsis < 50 and salt > 40000 and k < 2 {lock throttle to 1. print "circilizing " at (10,2). set k to 4.}. if ship:apoapsis > orbita + (orbita * 0.008) and k = 4 { Print "1down" at (10,8). lock steering to up +R(0,-95,180).}. if ship:apoapsis < orbita and k = 4 { print "1up " at (10,8). lock steering to up +R(0,-75,180).}. if eta:apoapsis < 2 and k=4 {set k to 5.}. if eta:apoapsis > 51 and k=5 and VERTICALSPEED > 0 {set k to 4.}. if eta:apoapsis > 100 and k=4 and VERTICALSPEED < -100 {set k to 5.}. if ship:apoapsis > orbita and k = 5 and eta:apoapsis < 30 { Print "2down" at (10,8). lock steering to up +R(0,-70,180).}. if ship:apoapsis < orbita + (orbita * 0.005) and k = 5 { print "2up " at (10,8). lock steering to up +R(0,-90,180).}. when ship:obt:ECCENTRICITY < 0.028 then {set l to 1. lock throttle to 0.}. wait 0.001. }. lock throttle to 0. clearscreen. print "orbit acheived". stage. wait 2. toggle panels. stage. sas on. set orbita to 100000.
  24. Does anybody know if the next KOS update will have, a SET method for the :STAGE prefix on some parts?
  25. DomDiaemus if You want just to see Your pitch: print SHIP:CONTROL:PITCH. or set x to SHIP:CONTROL:PITCH. print x at (0,0). more info is here: http://ksp-kos.github.io/KOS_DOC/structure/control/index.html GabeTeuton Im assuming that "lock steering to..." is not what You want SET SHIP:CONTROL:PITCH to 0.2. more info is in the ling above or here under RAW control: http://ksp-kos.github.io/KOS_DOC/summary_topics/ship_control/index.html
×
×
  • Create New...