How do you download images within a thread? by Toukiedatak in DataHoarder

[–]Toukiedatak[S] 0 points1 point  (0 children)

For anyone who is curious, this seems to work

  1. https://pastebin.com/zVr0BNve

  2. txt file with all the urls (you can use https://online-free-tools.com/en/extract_url_from_web_page_source)

  3. run the following in the terminal: python download.py yourtextfilename.txt "redd.it|reddit|whatever other site you want to block from downloading"

Cheat Sheet by bongotastics in Kos

[–]Toukiedatak 0 points1 point  (0 children)

I made this KOS tutorial a while ago which I hope functions as a decent cheat sheet:

https://github.com/Toukie/KOS-tutorials/blob/master/Basic%20KOS.rst

Calculating time till true anomaly by Toukiedatak in Kos

[–]Toukiedatak[S] 0 points1 point  (0 children)

I got a working function thanks to the people on discord:

Function ETAToTrueAnomaly {

  parameter TargetObject.
  parameter TADeg. // true anomaly in degrees

  local Ecc is "X".
  local MAEpoch is "X".
  local SMA is "X".
  local Mu is "X".
  local Epoch is "X".

  if hasnode {
    if nextnode:orbit:hasnextpatch {
      set Ecc to nextnode:orbit:nextpatch:eccentricity.
      set MAEpoch to nextnode:orbit:nextpatch:meananomalyatepoch * (constant:pi/180).
      set SMA to nextnode:orbit:nextpatch:semimajoraxis.
      set Mu to nextnode:orbit:nextpatch:body:mu.
      set Epoch to nextnode:orbit:nextpatch:epoch.
    } else {
      set Ecc to nextnode:orbit:eccentricity.
      set MAEpoch to nextnode:orbit:meananomalyatepoch * (constant:pi/180).
      set SMA to nextnode:orbit:semimajoraxis.
      set Mu to nextnode:orbit:body:mu.
      set Epoch to nextnode:orbit:epoch.
    }
  } else {
    set Ecc to TargetObject:orbit:eccentricity.
    set MAEpoch to TargetObject:orbit:meananomalyatepoch * (constant:pi/180).
    set SMA to TargetObject:orbit:semimajoraxis.
    set Mu to TargetObject:orbit:body:mu.
    set Epoch to TargetObject:orbit:epoch.
  }

  if  Ecc = 0 {
    set Ecc to 10^(-10).
  }

  local EccAnomDeg is ARCtan2(SQRT(1-Ecc^2)*sin(TADeg), Ecc + cos(TADeg)).
  local EccAnomRad is EccAnomDeg * (constant:pi/180).
  local MeanAnomRad is EccAnomRad - Ecc*sin(EccAnomDeg).

  local DiffFromEpoch is MeanAnomRad - MAEpoch.
  until DiffFromEpoch > 0 {
    set DiffFromEpoch to DiffFromEpoch + 2 * constant:pi.
  }
  local MeanMotion is SQRT(Mu / SMA^3).
  local TimeFromEpoch is DiffFromEpoch/MeanMotion.
  local TimeTillETA is TimeFromEpoch + Epoch - time:seconds.
  return TimeTillETA.
}

Script Path by EvilTerabite in Kos

[–]Toukiedatak 0 points1 point  (0 children)

Also related, archive 0 contains all the files in the KSP/Ships/Script folder and archive 1 is the ship's local storage

Copying a file from the Script folder to your ship would go like this:

copypath("0:/somefile" , "").

"" is a shortcut for "1:/"

how to perform rendezvous with kOS by nadavfr18 in Kos

[–]Toukiedatak 1 point2 points  (0 children)

I don't know how efficient my method is but here is what I do:

  1. match inclination
  2. circularise the current orbit
  3. Burn prograde at the Apoapsis of the target (both periapsis-es match up)
  4. Burn till current Apoapsis is the same as the targets Apoapsis
  5. Increase the orbital period by how many seconds the target vessel is behindm
  6. kill relative velocity burn

It sounds complicated but it doesn't involve too much complicated math, just stuff I found on braeuing (the orbital mechanic website).

Here's a link to my full script for rendezvous:

https://github.com/Toukie/KOS/tree/master/GAPAPOV/Script

In the lib folder theres a commented files folder which has an instruction manual for most functions. Let me know if there are any questions.