Jump to content

marianoapp

Members
  • Posts

    77
  • Joined

  • Last visited

Reputation

5 Neutral

Profile Information

  • About me
    Rocketry Enthusiast
  1. I made a missile a while ago with 0.625 parts and FAR installed but used kOS to guide it
  2. @the_bT - Running a program with parameters in another core is not yet supported, but I have it in my TODO list. - There's another feature in the works to add multi threading to the cores, so you can have several programs running at once on the same core (although I haven't work on that for a while). - Using variables as file/volume names is not yet supported but it will be eventually.
  3. It's written in .NET so it should work in linux, although I haven't try it.
  4. @Dr_Goddard: Please post the problem you're having in the kOS thread so we can take a look at it.
  5. MechJeb used to have a way to select a landing point just by clicking the planet while in map view, and I think that it also showed the coordinates of the selected point.
  6. Use "list engines to engineList" and then a FOR loop to iterate over the list. Each item of the list is one engine with the properties you need. Lists wiki
  7. @people with errors - If you're using ModuleManager then try deleting the config file from the kOS folder. - If the problem persist then take the "output_log.txt" file (it's inside KSP_Data), upload it somewhere and post the link.
  8. @MrOnak: I used the Skillful plugin (just the dll) that automatically expand the loading range of the vessels, that way you can switch between the plane and the launcher and have scripts running in different vessels at the same time.
  9. Nice! (although I kept waiting for the SAM to appear behind a hill and blow the plane to pieces )
  10. @MrOnak: Nice to see my missile inspired someone There's no simple way to convert a direction to heading and elevation, but can be done with some vector math: // this only change when you move on the surface set targetVector to targetVessel:direction:vector:normalized. set upVector to ship:up:vector:normalized. set shipFacing to ship:facing. set sinYawF to sin(shipFacing:yaw). set cosYawF to cos(shipFacing:yaw). set sinPitchF to sin(shipFacing:pitch). set cosPitchF to cos(shipFacing:pitch). set facingVector to V(sinYawF*cosPitchF, -sinPitchF, cosYawF*cosPitchF). set diffVector to facingVector - targetVector. // this returns a value where 0 is the horizon and 1 is looking directly up // can be multiplied by 90 to get degrees from the horizon set diffUp to vdot(diffVector, upVector) @Entropius: ModuleManager support is broken, but we accidentally left the patch in the download. We're working to fix it.
  11. All the directions when on the surface/low altitude use a frame of reference that can be considered to be at the center of the planet, and the components of it are rotations around the axes. We know that that is completely unintuitive so we're working in adding some features to convert between the different reference frames.
  12. Simple hover script with a PID controller clearscreen. set newThrottle to 0. lock throttle to newThrottle. set targetSpeed to 0. set speedStep to 0.5. on ag1 { set targetSpeed to targetSpeed - speedStep. preserve. } on ag2 { set targetSpeed to 0. preserve. } on ag3 { set targetSpeed to targetSpeed + speedStep. preserve. } // controller coefficients set kpT to 0.1. set kiT to 0.02. // controller accumulated error set errSumT to 0. until false { // speed error set deltams to targetSpeed - ship:verticalspeed. // predicted throttle for a TWR of 1 set predictedThrottle to ((ship:mass*9.82) / ship:maxthrust). // ----------------------------------------------- // PID (PI actually) controller code set tempThrottle to predictedThrottle + (kpT * deltams) + (kiT * errSumT). set errSumT to errSumT + deltams. // ----------------------------------------------- set newThrottle to tempThrottle. print targetSpeed + " " at (0, 0). wait 0.1. }. Uses action groups 1, 2 and 3 to decrease, set to zero and increase the speed, respectively.
  13. You should make a fork of the github repo, commit your changes there and then create a pull request (how to create a pull request). BTW I like this change
  14. "out of sync" is the Mono error for when a collection is modified while being iterated, so it's probably some kind of race condition. We would need the log files to track this problem down, so the next time it happens to someone, please, send them over
  15. I wouldn't add it to the docs just yet, it still is very experimental and has its limitations (like not being able to pass parameters).
×
×
  • Create New...