Space Exploration,astronomy & Cosmology

Discussion in 'Taylor's Tittle-Tattle - General Banter' started by StuBoy, May 26, 2020.

  1. UEA_Hornet

    UEA_Hornet First Team Captain

    What sort of code do you write? As in on this rocket what would it do?
     
  2. SkylaRose

    SkylaRose Administrator Staff Member

    Ha ha no. Actually the software I use to compile to code is free of charge. What I did have to pay for was the IDE which was expensive. Also, as you can probably imagine, much of the codebase is designed to be used in more than one system. I'll show you a small example of what an error message handler looks like :).

    Code:
    --------------------------------------------------------
    -- check if protocol is sent - if not send an error
    -- Rose, Skyla
    -- Mar'23
    -- Compiles Under: GCC 3.0 GNAT 2023
    --------------------------------------------------------
    
    with Ada,Numerics.DescreteRandom;
    with Ada.Environment_Variables;
    with Ada.Assertions.Assertion_Error;
    with Ada.Text_IO;
    with Ada.Storage_IO;
    with Ada.Libs\""\;
    with Ada.Libs\""\;
    
    
    function Check_For_Pass(Message : String in out, Ada.IO_Exceptions.Mode_Error) return BOOLEAN is
       Fail_State : Constant Boolean := True;
    begin
       -- check for connection of ROM
       if not STATUS.DEPLOY = Fail_State then
          Ada.IO_Exceptions.Mode_Error("CONNECTION FOUND!");
          Ada.Environment_Variables.Set(Name => ORBIT_CODE, Value => null );
          return False;
      
       else
          Ada.Storage_IO.Write(Buffer => 1, Value => null);
       end if;
       return True;
        
    end Check_For_Pass;[\CODE]
     
  3. SkylaRose

    SkylaRose Administrator Staff Member

    In a nutshell, the code instructs the microchips within the landing hardware (which are soldered to the motherboards) how to communite with the team on the ground. Each instructuon (or button pressed if you will) sent by the ground team sends a signal via the computer which then reads the data on the chip (the code I write), which then sends back the result to the computer. It's pretty technical, but that's the gist of it. :p
     
  4. UEA_Hornet

    UEA_Hornet First Team Captain

    Interesting. And this needs writing afresh for each mission / rocket? Or is this some sort of upgrade?
     
  5. SkylaRose

    SkylaRose Administrator Staff Member

    There are different packages (code bases) that represent each model of spacecraft, satelite and shuttle. Update of legacy (very old) code is always something that needs to be done. If a new launch is issued, much of the older code base from the previous launch is invalid. For example, if the path of a said Satelite is set to launch NW of whatever degrees, that needs programming into the mirochip. One slight mistake can actually end in catastophic failure, hence why we write a lot of the newer code well before the launch date, so it can be tested time and time again, amended if need be.
     
    Smudger and UEA_Hornet like this.
  6. Sting

    Sting Squad Player

    Is it rocket science?
     
  7. WillisWasTheWorst

    WillisWasTheWorst Its making less grammar mistake's thats important

    No. It never is.
     
  8. Sting

    Sting Squad Player

    Brain surgery?
     
    hornmeister likes this.
  9. SkylaRose

    SkylaRose Administrator Staff Member

    Close, computer science. Rocket science is more the physics of how the rocket moves, accelerates, boosts etc. Computer science is writing the software that tells the rocket (it's interal micro processors) how to carry out each task.
     
    BigRossLittleRoss and Sting like this.
  10. SkylaRose

    SkylaRose Administrator Staff Member

    I would seriously consider contacting Microsoft if you saw this.

    [​IMG]
     
    K9 Hornet, Sting and Ilkley like this.
  11. StuBoy

    StuBoy Forum Cad and Bounder

    Sorry late to the party here @SkylaRose, so is some of the code you write for when the rocket takes over and manages the countdown, so normally last 30/40 seconds? For example if an abort occurs and it's in that window it will be the rocket calling that, not someone on a monitor at wherever they are controlling the launch?
     
    SkylaRose likes this.
  12. SkylaRose

    SkylaRose Administrator Staff Member

    It depends on the craft and the mission parameters. If an alert is flagged by the ground crew's mainframe system, it would then send arguments (data) to the function parameters which are hard coded into the microchips by the code I have written. This will either do a variety of things, based on the Alert Code sent by the mainframe. Parameters can either shut the engines down, send out an SOS, give the all clear and a lot of other things. A return code of either 1 or 0 (true or false) is then sent returned to the mainframe to indicate if the Alert Code was succesful or not. On your example about returning control to the shuttle/rocket, that is usually handled by a seperate code base that is out of my control. However, no matter what return code is sent to the Main Frame it will be designed to either call the landing/launch protocols, or in the state of emergency, the alert code that is designed to handle whatever the emergency is.
     
    StuBoy likes this.
  13. Sting

    Sting Squad Player

    When I was at school about a hundred years ago I really liked maths and science in general but I was recently given a book "Black Holes - the key to understanding the Universe" and I have certainly not got the key.
     
  14. Smudger

    Smudger Messi's Mad Coach Staff Member

     
    SkylaRose and StuBoy like this.
  15. K9 Hornet

    K9 Hornet Border Collie Dog

    I'm reading that at the moment! Brian Cox and Jeff Forshaw. I'm about half way through and reading about white holes and wormholes, and not understanding most of it, yet it's still highly readable if you can absorb some of the concepts if not the maths
     
  16. SkylaRose

    SkylaRose Administrator Staff Member

    Has it been proven that White Holes exist? I know Einstien believed so, and the concept of them makes sense. They do they opposite of a black hole, by returning time and matter to the universe. I am however not totally sold on them personally, as anything that enters a black hole, matter, material or otherwise, is broken down again and again and can never escape. Unless the white hole has some sort of counter-reaction force that goes against a black hole maybe then it's possible. Interesting concept either way.
     
  17. Smudger

    Smudger Messi's Mad Coach Staff Member

    Over immense time scales it is postulated that black holes shrink by the emitting of Hawking radiation. The immense gravity at the event horizon affects all sorts of quantum properties such that of the entropy going into the black hole some is emitted in the form of this radiation. At some point the black hole cannot absorb other holes or matter and 'evaporates' returning the entropy to the Universe thus not violating the Second Law.
     
    SkylaRose likes this.
  18. Sting

    Sting Squad Player

    I'm not so far through but also enjoying it despite not really following it all. I also just watched Brian Cox five programmes "The Universe" which was interesting
     
  19. K9 Hornet

    K9 Hornet Border Collie Dog

    Yes, watched those too recently, which is what prompted me to but the book. Also bought Cosmos by Carl Sagan which Brian Cox said was the book that triggered his interest in cosmology when he was a kid. I'm expecting that to be easier to follow :)
     
    Sting likes this.
  20. Sting

    Sting Squad Player

    :) - yes it is a much easier read - you inspired me to dig out my copy ( bought 40 years ago would you believe) with a lovely dust cover painting of "quasar inside a giant elliptical galaxy, dominating a rich cluster of galaxies" by Adolf Schaller
     
    Smudger and K9 Hornet like this.
  21. Keighley

    Keighley First Team

    Good TV series too.
     
    Smudger, Sting and K9 Hornet like this.
  22. SkylaRose

    SkylaRose Administrator Staff Member

    Not sure how true this is, but I heard a rumor that the hole in the Ozone Layer will be healed by 2050. 99% of the chemicals responsible for it are slowly being phased out.
     
    Moose and Smudger like this.
  23. StuBoy

    StuBoy Forum Cad and Bounder

    SpaceX Starship and Super Heavy orbital launch flight test looking possible for next Monday 17th at this stage. I suspect it will probably slip but they are close for sure now. Should get FAA (regulatory) approval this week, and seem to have dropped the option of another ground test to go straight to the test flight itself.

    It really should be some sight this, biggest rocket ever made.
     
  24. StuBoy

    StuBoy Forum Cad and Bounder

    SkylaRose likes this.
  25. BigRossLittleRoss

    BigRossLittleRoss First Team

    Skyla the code for Falcons landing rockets must be a piece of work ?
    “Left a bit, right a bit , left a bit more…oh sh1t I meant right a bit more. Sorry”
     
    SkylaRose likes this.
  26. SkylaRose

    SkylaRose Administrator Staff Member

    You could say the same for all space engines. That's part of the reason code is written for new flight paths or updating existing ones months in advance, so it can be tested over and over and when the launch date is confirmed (either by SpaceX or NASA) that;s what is known as a hard deadline. We miss that, it delay's the flight, which is very expensive. In some senarios, the landing software is either updated or written during the flight path, now that is deadline that absolutely must be hit. 99% of the time this happens, it's on a very long fight (Satelites that need an emergency call to return to earth for example).
     
    BigRossLittleRoss likes this.
  27. BigRossLittleRoss

    BigRossLittleRoss First Team

    Laika is still waiting for someone to write the code to bring her home :(
     
  28. SkylaRose

    SkylaRose Administrator Staff Member

    [​IMG]
    RIP xxx
     
    BigRossLittleRoss likes this.
  29. Bwood_Horn

    Bwood_Horn Squad Player


    10 REM BRING BACK DOG
    20 PRINT "HERE GIRL!";
    30 GOTO 10
     
    BigRossLittleRoss and SkylaRose like this.
  30. SkylaRose

    SkylaRose Administrator Staff Member

    That won't do what you think it does. ;) But my god do I miss BBC BASIC. Nice to see a fellow coder of the 1980's.

    REM is a Remark, or a comment, and compilers ignore them. it will print "HERE GIRL" once then when asked to jump back up, probably crash as line 10 contains no execuable code.

    I would of done this.

    Code:
    with Ada.Text_IO;
    
    -- ask Laika to come home...
    procedure Ask_Laika is
    
    begin
        Ada.Text_IO.New_Line;
    
        for COUNT in 1 .. 10 loop
            Ada.Text_IO.Put(Item => "HERE GIRL!");
            Ada.Text_IO.New_Line;
       end loop;
    end Ask_Laika;
    Not sure what version of BASIC you know, but I love the simplicity of how I do it now (above) to how BASIC does it here...

    Code:
    10 REM ask Laika to come home
    20 FOR N% = 1 TO 10
    30 PRINT "HERE GIRL";
    40 NEXT N%
    50 END
     
  31. StuBoy

    StuBoy Forum Cad and Bounder

    FAA launch license for Starship was approved yesterday. So looks like all go now for an attempt Monday. I think they are aiming for about 1pm our time. So clearing my work diary of meetings then…

    Chances are it will scrub a few times before getting off the ground.
     
    SkylaRose likes this.
  32. StuBoy

    StuBoy Forum Cad and Bounder

    Propellant load has begun, weather looks decent. Chances of a scrub are high, but here we go!!

     
    SkylaRose and Smudger like this.
  33. StuBoy

    StuBoy Forum Cad and Bounder

    SpaceX stream now up, T-minus 30 minutes now.

     
  34. StuBoy

    StuBoy Forum Cad and Bounder

    As anticipated, a scrub today. Issue in the first stage. Not a surprise at all.
     
  35. SkylaRose

    SkylaRose Administrator Staff Member

    For a rocket of that size, it was bound to have teething issues. Fingers crossed the next launch goes past the initital phase.
     

Share This Page