Jump to content

Desdinova

Members
  • Posts

    8
  • Joined

  • Last visited

Everything posted by Desdinova

  1. I'm working on my own PEG implementation in KOS as a side project. I've got it sort of working, I'm having issues with the delta v - it's off by a factor of about 5. It starts decreasing towards zero, then around 30 seconds before cutoff, jumps randomly by huge amounts, changing sign. As far as I can tell I've implemented the algorithm just as described in the NASA paper / orbiter notes. If I comment out the derivative terms it basically works. Anyone here want to take a peek at my script and see if anything jumps out? function GuidanceLoop { SetOldTime(GetTimer()). SetTimer(time:seconds()). local T is GetT(). local r_v is -ship:body:position. local r is r_v:mag. //solve for guidance parameters A and B local b0 is -ve() * ln(1 - min(0.9999, T / GetTau())). local b1 is b0 * GetTau() - ve() * t. local c0 is b0 * t - b1. local c1 is c0 * GetTau() - ve() * t^2 / 2. local M_B_0 is r_d_t - verticalspeed. local M_B_1 is r_t - r - verticalspeed * T. //update steering parameters if T > 10 { SetB(((M_B_1 / c0) - (M_B_0 / b0)) / ((c1 / c0) - (b1 / b0))). SetA((M_B_0 / b0) - GetB() * b1 / b0). SetOldA(GetA() + delta_t * GetB()). SetOldB(GetB()). } SetOldT(T - delta_t). //update state vectors local h_v is vcrs(r_v, ship:velocity:orbit). local theta_unit is vcrs(h_v:normalized, r_v:normalized). local delta_h is h_t - h_v:mag. local r_mean is (r_t + r) / 2. //performance local omega is vdot(ship:velocity:orbit, theta_unit) / r. local C_t is C(r_t, omega_t, GetOldT(), GetTau()). SetTau(tau()). if T > 10 { SetC(C(r, omega, 0, GetTau())). } //calculate delta v local f_r is GetOldA() + GetC(). local f_r_d is GetOldB() + (C_t - f_r) / GetOldT(). local f_theta is 1 - f_r^2 / 2. local f_theta_d is -f_r * f_r_d. local f_theta_d2 is - f_theta_d^2 / 2. //local delta_v is (delta_h / r_mean) + ve()* T * (f_theta_d + f_theta_d2) * GetTau() + (f_theta_d2 * ve() * T^2 / 2 ). //set delta_v to delta_v / (f_theta + f_theta_d * GetTau() + f_theta_d2 * GetTau()^2). local delta_v is (delta_h / r_mean) / f_theta. SetT(GetTau() * (1 - constant:e^(-delta_v / ve()))). }
  2. I just started a RO/RP1 game on 1.3.1 after not playing since 1.2. I want to build more than one rocket at once but there's no option to increase build rate 2. Why?
  3. So I'm trying 10x with RP-0 and after upgrading the runway to level 2 I now explode about a quarter of the way down no matter what I do, the log says "collided with runway". Terrain detail level is on maximum. Trying to steer off the runway causes the same result. Edit: also, my inland space center is partially clipping under the grass. like I said, terrain detail is at max.
  4. All of the Minmus contracts in the spacetux pack have a messed up declaration in one of the requirements, with "part = " blank causing an exception. Also the interpreter doesn't parse whitespace very well, if you have an extra space i.e. "part = thing" and "part = thing " or a tab instead of space it'll cause an error I fixed all the contracts myself and haven't seen any errors since then
  5. I opened the alt+F10 debug window and saw a bunch of the spacetux contracts were messed up Screenshot Deleting the spacetux contracts and restarting seems to have cleared up the issue.
  6. I'm having a weird problem. I have the SETI contracts installed (among others) and noticed that when attempting the "kerbin powered landing" mission that the requirement for reaching 500m altitude never gets set no matter how long I hover over 500m. I tried a couple part test type missions from the launch pad and they are never marked as completed, and I never get a contract complete announcement, but when I go to mission control they show up in the archives as completed. Doing a "transmit science data from x orbit" type mission shows up as green in the contract window, but again, no announcement.
×
×
  • Create New...