Code Monkey home page Code Monkey logo

Comments (8)

TheGrover avatar TheGrover commented on August 24, 2024

This could come in handy, I personally think the more elegant solution could be necessary if the first stage or two have simple symmetric TV and an upper stage doesn't.

However, does the script actually account for thrust vectors being offset like the SSMEs or shuttle OMS? I can't see any controls available in the references to specify that, and I assume that the program assumes that all thrust acts in the direction of the navball. This can be allowed for by "controlling from here" on the engines, so KSP will tell the script which direction the engine is facing, but this wouldn't work for an arrangement like the shuttles where the engines don't all thrust the same way (the shuttles topmost engine was angles further down to account for being higher on the body of the orbiter)

However, the simple implementation is still handy for spaceplane with symmetric TV that want their wings lever to avoid their lift fouling the ascent course

from pegas.

Noiredd avatar Noiredd commented on August 24, 2024

@TheGrover Vehicles with offset thrust are handled on the kOS level. When PEGAS sends an attitude command, kOS automatically locates CoM and attempts to align thrust so that the vehicle is stable. It is using every means it has access to: TVC, RCS, reaction wheels, wings - so the spaceplane scenario is also covered (in the sense that aero control surfaces will automatically tilt so that the course isn't fouled).

Please explain though, how would you use the feature in the case when 1st stage has symmetric TVC and the upper stage doesn't?

from pegas.

TheGrover avatar TheGrover commented on August 24, 2024

I meant use it as you described, setting the roll program to engage later in the flight, rather than straight off the pad. Bonus points for having two distinct roll programs for different phases of flight (shuttle orbiter rolled "heads down" before jettisoning the fuel tank)

from pegas.

Patrykz94 avatar Patrykz94 commented on August 24, 2024

There would definitely be situations where this is useful.
One thing, could you make it possible for user to decide how fast the roll should be executed? This is mostly a cosmetic thing, it just doesn't look good to me if the rocket does a 180 degree roll within a second or two. Alternatively, maybe just make the roll speed a reasonable value?

from pegas.

Noiredd avatar Noiredd commented on August 24, 2024

@Patrykz94 Roll (or pitch or yaw for that matter) speed is not directly controllable as far as I know. I fiddled around with that as even in my demo video the Atlas pitches over ridiculously fast which looks weird. The solution is to use SteeringManager. Initially I fiddled around with PIDLoop entries (PITCHPID, YAWPID, ROLLPID) but manually tuning the constants is too much hassle. An easier solution is to change MAXSTOPPINGTIME - the lower the setting, the slower the vehicle turns.

You are warned however, that decreasing that value had some weird negative consequences on UPFG: it often failed to converge or even find entirely wrong solutions. I didn't investigate this too deeply so I don't know the exact failure mode, but I found it to be a culprit to many problems.
For this reason I decided to not implement any turning speed controls, leaving them at default max - it causes more problems (many) than it solves (none). However, an user is free to begin their vehicle script with a call to SteeringManager and set the rates to their liking.

from pegas.

gsarducci avatar gsarducci commented on August 24, 2024

Is it possible to introduce a spin on a stage? I'm thinking something like Thor-Able launching something like Transit. Prior to the solid fuel 3rd stage the 2nd would spin up to stabilize the payload.

Of course, if I recall Transit had a coast period, which I think is something else you were considering for the next iteration of this. :)

from pegas.

Patrykz94 avatar Patrykz94 commented on August 24, 2024

@Noiredd are you working on this at the moment, I needed roll control for my script so I made a very simple one that uses sequence, you can see the changes here.
If you want, I could improve on that, test it on a space shuttle launch and send a PR?

from pegas.

Noiredd avatar Noiredd commented on August 24, 2024

@Patrykz94 I was in the process of polishing the feature when you commented. Commit ca1d982 introduces roll control in a general way: both via controls setting (roll occurs together with the initial pitchover maneuver) and sequence event. In order to preserve compatibility with your ad-hoc solution, the event type is called roll and roll angle key is angle - your vehicles should work fine.

@gsarducci I can't really see how would that be possible. AFAIK, spin-stabilization only makes sense when you want to aim at one constant vector and never deviate from it, while the whole point of PEGAS is continuously changing the steering vector.
Feel free to open up a new issue if you can explain how would it be useful, and we can discuss this.

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.