Sarbian changed the topic of #kspmodding to: Welcome to #kspmodding - the channel for discussing, and learning about, modding Kerbal Space Program. Code of Conduct: https://git.io/vSQh6 | Always provide logs. | *** PSA: https://kerbalspaceprogram.com/api/index.htm | Someone is writting a Phd dissertation on KSP modding please fill out this survey https://goo.gl/forms/1vrkPYH4az8l32sb2 - I have met him and it s legit
<taniwha> N70: orphan it
<taniwha> (and -NC is generally incompatible, especially with the GPL (dunno about Unlicense))
Technicalfool has joined #kspmodding
<taniwha> N70: though, really, why do you want to destroy a PartResource?
<N70> ... for some reason, JDiminishingRPG was doing it
<N70> RTG*
<N70> and i was porting it to 1.4.1
<taniwha> ah, from pre-1.2
<taniwha> prior to 1.2, PartResource was a MonoBehaviour
<taniwha> that was "fixed" for 1.2
<taniwha> so, yeah, just pull it from the list of resources and drop it
<N70> also, where could i get some antenna modules
<N70> i need some low gain antennas for kerbalism... due to a lack of a method for having long-range relays due to a lack of low-gain long range antennas
<taniwha> low-gain long range is an oxymoron
<N70> low-gain means omnidirectional, no?
<taniwha> gain = range
<N70> "Antenna gain is often quoted with respect to a hypothetical antenna that radiates equally in all directions" -wikipedia
<N70> "The larger the collecting area of an HGA, the higher the gain, and the higher the rate of data transfer it will support. However, the higher the gain, the more highly directional it is. When using an HGA, it must be pointed to within a fraction of a degree of Earth for communications to work. Once this is achieved, communications may take place at a high rate over the highly focused radio signal.
<N70> "
<taniwha> omnidirectional means low gain, not the other way
<N70> yees
<N70> But how tf would people be able to get a relay to reach even the freaking Mun in kerbalism
<taniwha> well, first, you could consider that kerbalism might be wrong
<taniwha> (not stating that it is)
<N70> if it is, how could I fix that?
<taniwha> by adjusting the antenna ranges
<taniwha> and remembering that effective range = sqrt(range1*range2)
<N70> The best low-gain in Kerbalism has a distance of 5e6
<taniwha> (for two antennas)
<N70> 5e6m
<N70> or 5 Mm
<taniwha> 5000km
Ezriilc has quit [Quit: Going offline, see ya! (www.Kerbaltek.com)]
<taniwha> sounds stock to me
<N70> Kerbalism, however
<N70> from what i saw
<N70> it assumes the strong antenna]
<N70> What would a more realistic range be
<N70> or would that be realistic
<taniwha> 5000km might well be realistic
<N70> it only transfers 16 kilobits/s anyways
<N70> and 5000 km can't even reach the mun
<taniwha> only?
<N70> yeah
<taniwha> NASA would have loved 16kbit/s on their probes :P
<N70> that's at close range
<N70> like, super-low orbit
<N70> even in kerbalism, transfer speeds slow to the bps (don't say baud, that's WRONGGGG) as you get further and further
<taniwha> anyway, bps and snr are a trade-off
<taniwha> snr comes from gain (=range)
<taniwha> actually baud is not wrong
<taniwha> more likely, the bps is wrong :)
<N70> also i think i may trust that old torn apart copy of PCs for Dummies from 1999 on the bps-baud issue, thank you very much
<N70> dan gookin is a good author
<taniwha> he's talking about the serial port
<taniwha> modems use baud, because they don't transmit individual bits
<taniwha> serial ports /do/ transmit individual bits
* N70 stares at the UART interface on an old, ripped open amlogic tablet
<taniwha> I'm talking about over the phone line (for modems)
<taniwha> your UART uses bps, your modem uses baud (on the analog side)
<taniwha> looking at it
<N70> err
<N70> woops
<N70> even with like, a 100 Gm high gain antenna
<N70> i couldn't reach the 5000 km low gain relay from mun orbit
<taniwha> N70: btw, if you want a better understanding of the confusion between bps and baud, look up QPSK
<N70> thanks
<taniwha> UARTs don't use QPSK, modems do
<taniwha> and it's QPSK that gives the cool modem sound :)
<taniwha> anyway, iirc, your 56kbps modem was still running at 2400baud
<taniwha> they just packed more bits into each symbol
<taniwha> (so, yes, bps != baud, no argument there:)
<xShadowx> ........arent 56k modems illegal now......something something human rights...something....inhumane torture...something
<taniwha> xShadowx: haha, if only
<xShadowx> taniwha: and CRT TVs ;p
* taniwha misses his CRT monitor
* xShadowx lights taniwha on fire
<taniwha> well, ok, until the glue on the coils died
<xShadowx> no desktop particle accelerator for you ;p
<xShadowx> so months later after new eula, ksp still kickin?
* xShadowx should play ksp again
<N70> yes
<N70> making history is good
<taniwha> N70: depends on the audience
<N70> is anything wrong with indirect_rate? it frustrates me that it KEEPS. BEING. ZERO. ON MY 100 GM ANTENNA.
<taniwha> calculate_rate looks very bogus
<N70> i didn't write it, i forked the mod after the author disappeared
<taniwha> like I said above abound being certain kerbalism is correct :)
<N70> what would be a better way to do calculate_rate
<taniwha> calculate_rate actually /increases/ the rate as you get further away
<taniwha> dunno if it's the right curve, but 1-Math.Exp(-dist/d)
<taniwha> er, no
<taniwha> not 1-
<taniwha> just Math.Exp(-dist/d)
<N70> "return Math.Exp(-dist/d);"?
<N70> k thx
<taniwha> maybe exp * rate
<taniwha> (since that's there, too)
<N70> Math.Exp(-dist / d) * rate.ok
<taniwha> though k=Math.Min(1.0, (d/dist)) and k*k*rate would make sense, too
<taniwha> (that gives inverse square)
<taniwha> with a cap at 1
<N70> yeah since the original one wasn't working
<N70> a 900 Gm ground station couldn't connect to a 150 Gm antenna in low orbit
<taniwha> bet it could near jool :)
<N70> ok new one works
<N70> it works!
<N70> thanks
<taniwha> you might need to tweak the "curve", but at least now you've got things going
<N70> you were right
<N70> i got relayed signal at jool
<N70> for a bit
<N70> taniwha, there's a problem
<N70> i'm getting like, 140 bps in LKO
<N70> and my antenna which should be getting 100 kilobit/s in LKO
<N70> is getting 1 at max
<taniwha> tweak the curve
<taniwha> particularly the dist/d
<taniwha> (so you probably need to tweak d)
<taniwha> Exp(-1) = 0.368
<taniwha> and (d/dist)^2 capped at 1 works nicely, too: d effectively shifts where the falloff starts happening
<taniwha> if using Exp, d determines where you get 37% of max rate, inverse square d determines when you no longer get max rate
<N70> i'm using Math.Min(1.0, (d / dist));
<taniwha> and k*k?
<N70> ye
<taniwha> that's inverse square
<N70> should i try adding the ^2
<taniwha> no, you already have it
<taniwha> so anyway, choose an appropriate d
<N70> a guy on discord is saying you're wrong? https://i.imgur.com/osUnJcQ.png
<taniwha> (1-d/dist) gives 0 when dist==d, and 1 when dist >> d
<taniwha> and negative rates when dist < d
<N70> taniwha, i restored the old math
<taniwha> I never claimed the equations I suggested were /right/, just better
<N70> and the transfer rates in LKO are high as they should be
<taniwha> the old math is dead wrong
<taniwha> you get increasing rate with increasing distance
<taniwha> try it at 2km instead of 200km :P
<taniwha> or even 1km
<N70> yeah but it should be transmitting 100 kbps at 200 km
<N70> not 1 kbps
<taniwha> so tell Haully to look at the derivative of his rate wrt distance :P
<N70> it's 1 kbps with your equation
<taniwha> N70: I stated up front you will need to tweak things
<taniwha> ESPECIALLY d
<taniwha> (it's really the only knob you have except for the equation itself)
<N70> taniwha, rate is 400 bps from like 5 km up
Orum has quit [Read error: Connection reset by peer]
<N70> taniwha, d appears to be dist
<taniwha> d is the "cutoff" distance
<taniwha> for exponential curves, it's where you get 37%
<N70> "rate = antenna.indirect_rate(dist, wi.antenna);"
<taniwha> r += Antenna.calculate_rate(d, dist[i], rate[i]);
<taniwha> called by indirect_rate :P
<N70> yes
<N70> how would i tweak that, though
<taniwha> well, I guess the first thing to do would be to go through the code giving better names than "d" and "dist"
<N70> change "d" to cutoff?
<taniwha> dunno, where does it come from? I thought dist was the distance between antennas
<N70> it is
<taniwha> so what supplies d in the first place?
<N70> rate = antenna.indirect_rate(dist, wi.antenna);
<N70> which leads to r += Antenna.calculate_rate(d, dist[i], rate[i]);
<N70> and indirect_r += Antenna.calculate_rate(d, relay_antenna.dist[i], relay_antenna.rate[i]);
<N70> so dist ends up being d
<taniwha> see the problem yet?
<N70> no
<taniwha> by the time you get to calculate_rate, you have no idea what d is or what dist is, because the roles changed somewhere
<taniwha> ie, the naming is inconsistent
<taniwha> so it's not possible to have a sensible argument about what the math should look like
<N70> what should d be changed ot, then
<taniwha> I don't know, I don't know the code and I don't feel like studying it further
<N70> i don't know all the code, either
<taniwha> you're the one porting it :)
<N70> and the only person who does has disappeared from existence
<taniwha> so I guess you get to study it
<N70> taniwha, also, Haully has more things to say: https://i.imgur.com/gPjHXLo.png
<taniwha> oh, and I wouldn't trust the guy, since he left it in a mess in the first place :)
<N70> i barely used his code
<N70> besides Cryofuels code
<N70> background simulation code*
<taniwha> as for haully, "doing the math" was impossible due to bad coding
<taniwha> anyway, you want rate to decrease with distance. if you want smooth falloff from maxrate at 0 range, use maxrate * Exp(-distance/cutoff_distance)
<N70> guessing d is cutoff_distance
<taniwha> if you want maxrate out to a certain range and then inverse-square falloff, maxrate * Math.Min(1.0, (cutoff_distance/distance)*(cutoff_distance/distance))
<taniwha> N70: that was my guess in the first place, yes
<N70> ok
<taniwha> of course, there are other similarly behaved equations you can use that give slightly different properties at around distancefactor = 1
<taniwha> (distancefactor = distance/cutoff_distance)
<N70> even with that equation though
<N70> i'm getting 372 bps at kerbin, and 3 kbps at jool
<taniwha> see, it's increasing with distance
<taniwha> hardly right
<taniwha> anyway, you will probably have to go through the code with a fine-toothed comb
<taniwha> it sucks, but if you want it working properly, your only other option is to throw out the code and start afresh
<N70> im getting tired
<N70> i'll handle this 2morrow
N70 is now known as N70|zzz
VanDisaster has quit [Quit: Miranda NG! Smaller, Faster, Easier. http://miranda-ng.org/]
VanDisaster has joined #kspmodding
Olympic1 has quit [Ping timeout: 186 seconds]
blowfish has joined #kspmodding
Lyneira has joined #kspmodding
blowfish has quit [Quit: Leaving]
Sarbian has quit [Quit: ZNC - http://znc.in]
Sarbian has joined #kspmodding
Olympic1 has joined #kspmodding
Lyneira has quit [Ping timeout: 383 seconds]
Olympic1 has quit [Ping timeout: 186 seconds]
ferram4 has joined #kspmodding
ferram4_ has quit [Read error: -0x1: UNKNOWN ERROR CODE (0001)]
Lyneira has joined #kspmodding
Valerian has joined #kspmodding
Lyneira has quit [Ping timeout: 383 seconds]
N70|zzz is now known as N70
<N70> hey taniwha
N70 is now known as N70|Away
Lyneira has joined #kspmodding
N70|Away is now known as N70
<N70> hi taniwha, how r u
Ezriilc has joined #kspmodding
Daz has quit [Read error: Connection reset by peer]
Daz has joined #kspmodding
Ezriilc has quit [Quit: Going offline, see ya! (www.Kerbaltek.com)]
Lyneira has quit [Quit: Bye]
Valerian_ has joined #kspmodding
Valerian has quit [Ping timeout: 198 seconds]
Valerian has joined #kspmodding
Valerian_ has quit [Ping timeout: 190 seconds]
Valerian has quit [Ping timeout: 190 seconds]