

Delay
Members-
Posts
1,246 -
Joined
-
Last visited
Content Type
Profiles
Forums
Developer Articles
KSP2 Release Notes
Everything posted by Delay
-
@Shadowmage out of curiosity: Is there anything noteworthy that happened to the atmospheric scattering since you last mentioned it?
-
I'd say we should start counting from the moment when SpaceX called their landings "Stage 1 Landing" on the timeline, rather than "Experimental Landing".
-
Out of likes, sorry.
-
Sure, but keep in mind that, as of now, SpaceX is the only company to even try and land their first stages back on the ground. For that, and the fact that they developed this technology from the ground up, a non-0% success rate is even more remarkable. Yes. 84.21% is probably not good enough for human rating. But it is not terrible, especially as it is a first in the space industry.
-
What about the engine not shutting down after an otherwise successful landing?
-
What? Might be confirmation bias, but I'm pretty sure that SpaceX had more successful landings than failed ones. By far. What I'm more worried about right now is the media & their reaction. If CNN found it newsworthy enough to make an article about a "million dollar nose cone" not being retrieved, what is the reaction going to be here? "Multimillion dollar rocket crashed into water"?
-
Well, look on the bright side: One more successful test of the safety protocols.
-
I doubt they'll reuse this one. Maybe keep it for investigation, but that will probably be it for this booster.
-
Was it a 1-3-1 landing burn?
-
Now I'm interested. Why did the landing burn not start / falcon "land" in the water?
-
I'd encounter a similar problem; index * 2 would always be 0 unless it's a dash. The first signal has to be treated differently to the rest of the tree. After those are done it works as I expect it to. It's just these first two that don't. Edit: I might have solved this already. I move the space used for word_terminate to index 0 and start with "E" at index 1 (still counting from 0). Then the sequences for dot/dash would be 2n+1/2n+2. The problem was that I started the numbers not at the beginning of the tree, but at the first "short" branch. Now I start counting at the beginning of the tree as index 0 (not index -1) with " ".
-
Here's a concept for decoding. I'm basically using a tree with each of the two branches representing either "short" or "long". char Decode[] = ""; char CharacterTree[] = "etianmsurwdkgohvf-l-pjbxcyzq-- "; int index = 0; char MorseDecoder(signal){ switch(signal){ case 'dot': index = 2 * index + 2; break; case 'dash': index = 2 * index + 3; break; case 'space': //Signal matches "space", character at that index is added and index is reset to 0 Decode = Decode + CharacterTree[index]; index = 0; break; case 'word_terminate': Decode = Decode + CharacterTree[30]; //Character 30 is a space index = 0; break; } } void loop(){ //does arithmetic to figure out if it's a dot, a dash, space or a word termination MorseDecoder(transmitted) //part of the arithmetic function above, "transmitted" being dot, dash,... for use in the switch } it's a quick thing I put together in 20 minutes. I use a tree because it's very easy to do arithmetic in it.
-
Would it be possible for a movie to have an exciting narrative while still obeying all laws of physics and with current technology? I'm talking about a genre of movies that would usually disregard both or one of these things in order to make room for a narrative.
-
Hi Eve. Hi Gilly. Bye actually-way-too-overpowered-because-it-still-has-895m/s-of-dV transfer stage. (the decoupler survived it, though) Okay, I landed on Gilly, took as much science as I can and went back into orbit. Now about those temperature contracts I accepted. How long is it going to take? Ugh... 1 hour, or 15 minutes at x4. I'll be sitting here for a while. In the meantime, look and appreciate the trajectory that took me to Eve, from Gilly's ground reference frame:
-
It took almost the entire lesson to write the complete switch-statement - for now it's just all letters - but the script works as expected. Though I did forget some chars and ints and I typed "Text = ... ", rather than "Text[] = ...", but these got kindly pointed out to me and now I have a fully functional encoder that can turn on an LED to send a signal. I just have to be more paranoid about type declarations. Missed some semicolons and breaks too, but at least I caught all of those. Except for one ; . Now... about this decoder... I'd guess that unlike encoding, where you can directly go from text to transmission, for decoding you need a step in between to store the results in a format you can easily work with.
-
Why is there no "int" in front of "limit" to declare this as an integer? Is that already done by strlen()?
-
For the function in my previous post, that would be 'index'. So I guess a "complete" (rather: more complete, since send_dit/dah/space aren't defined anywhere) script would look like this: String = "Example text" char MorseEncoder(index){ //in the complete version this would assign all characters in the alphabet (maybe even numbers, who knows) switch (String[index]){ case 'A': case 'a': send_dit(); send_dah(); send_space(); break; } case 'B': case 'b': sent_dah(); sent_dit(); sent_dit(); sent_dit(); sent_space(); break; //and so on } for (int i = 0; i = strlen(String) - 1; i++){ MorseEncoder(i); //Call the function. That should take care of literally everything else. }
-
That would probably be either... for (i = 0; i = strlen(String) - 1; i++){ //I expect C to work similar to Python in that indices range from 0 to "string length" - 1 } ...or... int i = 0; while(i <= strlen(String) - 1){ i = i++; } , right?
-
It goes to an LED to be interpreted by another machine. I thought of Converting the text to Morse code and then read that Morse code to turn on the LED. Well, as kindly pointed out by both @razark and @Aperture Science, this first step of string -> Morse code is redundant and I can jump to LED signals immediately. And that's all the sending portion needs to do. I'll see about the receiving end. I have some own ideas, but they all have the dreaded "LKKL"-style Morse encoding in them. Encoding is simple (in comparison), decoding is hard. I'm sure that's universally applicable. And while I already have razark tagged, let me quickly as for reassurance that I understood this aspect of a switch-statement correctly. /*Some more questions / expected behaviours, just to make sure I understood switches, function calls and how they work*/ String = "Example text" char MorseEncoder(index){ switch (String[index]){ //Expected: switch-statement uses 'index' provided by the function to get the corresponding letter to test with case 'A': //('index' gets incremented by 1 after each iteration) case 'a': send_dit(); //Morse sequence to transmit if character is A or a (I want this to handle both upper and lower case) send_dah(); send_space(); break; } } Would this work the way I expect it to? In this limited example I would expect it to finally send something after reaching String[2], which is 'a'. But even if the entire string was in capslock, String[2] should still produce the Morse code for 'a'. Hey, I'm also struggling here and I'm afraid these poor guys will need some psychotherapy once I finally understood all vital functions of C.
-
That may be true. I suspect I was too stubborn to see this option. @razark Are switch statements also called or must they be part of the loop I use them in? (Human) Accessibility is the main reason I'm asking: Being able to put it out front - or so I think - would make things easier to understand as you didn't have to search for it in the loop.
-
Sure, but can add a new character with just 2 lines; the if-condition and what the character equals. Rather than writing the individual instructions for turning the lamp on and off every single time. Unless of course there is another way to implement "reusable" that gets called when needed, but is operating independently from the actual letter and I didn't think of it. That way it would still just be three functions.
-
I don't think so. You'd have to write the same thing over and over again for every letter. Mine transmits based on just 3 possible signals (long, short, space) being reused all the time. Additionally it's so much easier to edit. If you want to add the digits 0-9 all you have to do is add 10 more combinations.
-
I'd say ifs and else ifs are better here. After all it's not supposed to be a highly complex and convoluted script (relative to the fact that it's the first major exposure to a "real" programming language). It should be very easy to read and understand, and ifs seem to be the best way to accomplish that.
-
I am aware of the fact that I'm basically using this thread as a dump for C questions now, but I can guarantee you that with a non-0% chance, this is the last question. Tomorrow I have CS, so it's my last day of asking and this question is kinda important. I looked around a bit on (guess what) the internet and found out that what I thought of as a simple task may not be so simple after all: Add a sequence of letters to a string based on the character of another. If other people are to be trusted, then a simple return-statement doesn't do what I intend it to do. Here's the idea I had: //please ignore my strange indentation of brackets and code. Don't know how C code is usually indented. char MorseCode(index){ //this is effectively a big table with all Morse codes and their letters, Imagine this going from A to Z if (String[index] == (A | a)){ //is the letter in question A or a? return "KL "; } if (String[index] == (B | b)){ //is the letter B or b? return "LKKK "; } if (String[index] == (C | c)){ //is the letter C or c? return "LKLK "; } } This would be called by either a for or while loop (probably while, though) during every iteration. Probably with a line like "MString = MString + MorseCode(number_of_index)", where number_of_index in incremented by 1 at the end of each loop and as long as this new index is still valid. The expected result is that I end up with the same list as in the beginning, but with one new encoded letter added to the end of the list.