Code Monkey home page Code Monkey logo

Comments (3)

Noiredd avatar Noiredd commented on August 24, 2024

Yes, this is interesting. If this is something that will make it possible to launch a fully automatic ascent with first stage landing and second stage insertion - go for it. I think the way of doing it which you proposed is okay; I'd only ask you to try and keep as much code as possible in pegas_util.ks and only put the most important things in pegas.ks - it's very easy to clutter the main file if one's not paying attention ;)

Before you start however, can we think of other situations where a cross-CPU communication would be useful? Would be nice to do this in a more general way if it allows more features in the future.

from pegas.

Patrykz94 avatar Patrykz94 commented on August 24, 2024

I made a very simple version of it for testing a few days ago which mostly works, although I just noticed that while the "Initiating UPFG!" message appears straight away, the thrust is not actually cut until a few seconds later. May be because I'm trying to do it without any advance. Will need to read over PEGAS code again to better understand how it's actually dealing with staging and initiating UPGF (probably tomorrow).

I also got PEGAS to send a message with it's liftoff time once it's calculated (needed that in landing script), and I'm sure there could be other things that could be done with this. Let me know if you have any ideas for that.

Here's a quick and dirty version of what I added so far. And yeah... it's all in pegas.ks at the moment, I'll try to minimize the use of that file.

from pegas.

Noiredd avatar Noiredd commented on August 24, 2024

Delay between the message and actual UPFG activation is on purpose - read this bit in particular.

Your "quick and dirty" version looks okay. What I would do differently would be to make it a function in pegas_utils.ks and just have it called once. setComms(), maybe?

In the future, the body of a WHEN could be relocated into a separate function, much like my current event execution system, which works like this:

  • an event handling mechanism is initialized (setUserEvents) by setting a trigger,
  • trigger body sets a flag (userEventFlag) informing that an event has happened,
  • main loop encounters a flag and calls an event handling routing (userEventHandler).

I can imagine something like this for a more flexible communication system. But maybe let's not go that far just yet since we don't know what else would it be supposed to do - the current implementation is okay ;)

from pegas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.