Comments (3)
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.
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.
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)
- Use PEGAS in landing HOT 3
- Setting postlaunch task HOT 3
- PEGAS with Asparagus Staging HOT 2
- PEGAS porting HOT 1
- TestFlight/TestLite support HOT 4
- Add-ons? HOT 2
- Use PEGAS in orbital maneuvers HOT 1
- In game UI still says v1.1 HOT 2
- UI: Event timeline HOT 3
- Custom steering vector transform HOT 14
- Proposal: total overhaul of the event system
- How do I call a delegate? HOT 5
- Support for hotstaging HOT 4
- Certain configurations of the flight plan cause a crash HOT 5
- Atmospheric guidance switches from pitch-program to min-AoA during UPFG preconvergence
- gLim disengages HOT 10
- Custom engine spool-up config HOT 1
- PEGAS uses variables that conflict with built-in functions, breaking the script on newer versions of kOS HOT 4
- Failure to MECO on time in certain circumstances
- gLim causes an engine shutdown when reaching 0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pegas.