Jump to content

Unmanned flight


Recommended Posts

Newbie here.

I would like to start with a remote mission.  Unmanned.  Single simple rocket, one stage, one burn, no orbit.

Before the mission I hope to calculate the results of the shot.

Results:

  • Max Distance from surface (or center of planet), or max height (altitude) 

  • Distance from launch site to landing site.

  • Direction from launch site to landing site.

  • Position to deploy chute (and the time after launch to deploy chute).

During the mission I would like the chute to deploy remotely.  Either/and/or on a timer or under certain conditons.

After the mission I would like to be able to review the flight data.  Results above..

  1. Can anyone provide references for the math to predict the results?
  2. Can I deploy the chute remotely with vanilla KSP?  If not which mod will allow programed triggers?
  3. Does the vanilla KSP record the results listed above?  Or do I need a mod (mods).?

Thanks in advance to anyone who takes the time to respond.

Edited by Macjimm
spellimng and format
Link to comment
Share on other sites

1 hour ago, Macjimm said:

Can anyone provide references for the math to predict the results?

 

Major problem its drag. Lots of variables, very dependent of ship design.

Quote

Can I deploy the chute remotely with vanilla KSP?  If not which mod will allow programed triggers?

Quote

Does the vanilla KSP record the results listed above?  Or do I need a mod (mods).?

There is the fligth results, however I never paid much attention to exactly what its show. I think you need to hit F3 to it show up, someone please confirm.

Link to comment
Share on other sites

I like you named the launch a "shot". The math you asked for is the same used for computing ballistics, and easier done with artillery shots.

In ballistics, we need to know (with the greater possible accuracy) the following: speed at launch, angle of the launch (elevation, generally taken from horizontal plane), drag factor. The latest is by far the most difficult, as it depends from air density (therefore, how density changes because of temperature and humidity) and speed. Also (though not required in stock KSP) wind effects needs be computed.

If it wasn't for drag, ballistics would be real easy. Given the "shot" makes for a suborbital trajectory, its shape is elliptic (so, the trajectory is symmetric left or right of the major axis). Elliptic orbital math can be found here; in particular, equation 4.26 allows to compute Apoapsis from known values (speed, elevation, radius at launch) (solution to your first point). equation 4.28 provides true anomaly from periapsis to launch point, which makes it easy to compute true anomaly from Apoapsis to launch point (complement) and because the orbit is symmetric, doubling that gives the anomaly from launch to landing (of course, expressed as angle, but it's easy then to find the distance with the radius). For the direction of launch, you need to use 4.33, that puts in relation latitude, azimuth and inclination.

Believe you need a add-on to automatically deploy chutes at a specific time, though KSP allows to have them deploy at a given altitude or pressure. KOS would be the add-on of choice to make such things.

KSP provides some records for the current mission (hit F3 to see them), don't know if they cover all you wish.

Link to comment
Share on other sites

1. This sounds like a suborbital shot you are planning. The problem is that aerodynamics is an extremely complicated thing to calculate. Very non-linear. And the more time you spend in the air, the less accurate your results are going to be.

The faster you go, the more drag you are going to get (approximately as the square of the velocity). Atmospheric density is a non-linear function of altitude. IRL calculations for these sorts of things use numerical simulations -- not closed-form math solutions.

2. Depends on exactly what you mean. After they are activated, the parachutes only deploy (under default settings) when they will not be destroyed during deployment. So if you wait until you are going faster than 300 m/s, you can activate the parachutes and they will deploy later when they can. That sounds basically like what you want them to do.

3. A lot of flight results are saved, and can be accessed by hitting F3 at any point in your flight. You will have to look at that screen and see if it contains all the flight data that you want.

 

Link to comment
Share on other sites

Thanks for the responses.

diomedea:  Appreciate the orbital math link. Reviewing it now.

Spricigo:  The Smart Parts mod looks as though it may work for remote control.  Although perhaps kOS or MechJeb may also work.

Bewing:  It seems that the atmospheric effects really does complicate things.  Aerodynamics has me wondering about a lot of variables that I am not sure of.  You statement  "Atmospheric density is a non-linear function of altitude. IRL calculations for these sorts of things use numerical simulations -- not closed-form math solutions." makes me wonder if it is possible to predict these results pre-mission? Has anyone developed some data? Tables?  Could I gather enough data from test missions?  Would it yield constants that could be used for rough estimates?

Other questions that arise are?

  • Are there coefficients of friction available for Kerbal? Can the variability of the aerodynamics be predicted relative to the distance from the planet?  How will I determine the drag on specific ship designs?
  • Does KSP model rotation?  Will my preparations need to consider the coriolis effect and/or centrifugal forces?
  • Does gravitational acceleration vary depending on the distance from the planet?

Not posting this expecting anyone else to work it out for me.  But I do wonder if anyone else is curious about these considerations or how much they have been explored.

Link to comment
Share on other sites

3 hours ago, Macjimm said:

Bewing:  It seems that the atmospheric effects really does complicate things.  Aerodynamics has me wondering about a lot of variables that I am not sure of.  You statement  "Atmospheric density is a non-linear function of altitude. IRL calculations for these sorts of things use numerical simulations -- not closed-form math solutions." makes me wonder if it is possible to predict these results pre-mission? Has anyone developed some data? Tables?  Could I gather enough data from test missions?  Would it yield constants that could be used for rough estimates?

I like your analytic approach, but I'm not sure the game will cooperate with you enough.

The question in my mind is "how the heck are you planning on steering this thing?" Because KSP is designed for teaching you seat-of-the-pants flying, not analytics. "Oh, this direction looks about right." "Yeah, I think I'm pointed about halfway between those two vectors." "Hmmm. A declination of about 35 degrees at about 10km altitude sounds pretty good -- not quite as much as what I was aiming for, but pretty good." "Woops, I gotta burn a bit north in a couple minutes! That'll get me pretty close!"

Now, if you use a mod like MechJeb, you will be able to steer to 1 degree accuracy. But if you are steering this by hand, then keeping the nose within 3 or 4 degrees of where you were aiming is quite good steering. And being a mere 3 or 4 degrees off is going to change your Ap by dozens of kms, and your impact point by hundreds of kms. The one thing that you can pretty much count on is launching straight up. That works to high accuracy as long as your ship is symmetrical and the boosters aren't too strong (strong boosters will tend to make your ship bend in the middle). The other thing you can do for high repeatability is use launch clamps to orient your ship at a particular angle before launch. The next question is timing -- but it's not too hard to watch the clock and get your timing within a second, if there are things you need to time. Judging timing by altitude also works fairly well.

Atmospheric drag is discussed here: http://wiki.kerbalspaceprogram.com/wiki/Atmosphere#Drag -- but there are no tables or data. Some folks have indeed created various tables and graphs of many different variables -- hopefully your search-fu is strong.

Depending on your design, your craft may experience either lift or body lift, if it is not always pointing exactly prograde. And lift can completely mess up a ballistics calculation.

Each part has its own unique "drag cube" -- which determines the "frontal area" of the part depending on its orientation. I think parts also have unique drag coefficients. Those are stored in the config files for each part.

However -- the way everybody else does it is by flying test missions. You can quicksave on the pad, and then run the same launch dozens of times to test various factors. You can "revert" flights after they are completed to accomplish the same thing.

Maybe your best friend for doing serious analysis of aerodynamics in KSP is going to be the debug menu (Alt F12). Enable the "Aero GUI", and enable "Aero data in action menus". Hopefully that will give you the information overload that you are looking for. Maybe some video capture software so you can gather the numbers after the mission when you're not busy flying.

Quote

Does KSP model rotation?  Will my preparations need to consider the coriolis effect and/or centrifugal forces?

Not quite sure what you mean? Orbital physics is all about coriolis effects. That's 99% of the game. That's what makes docking hard. Or rendezvous maneuvers. Or do you mean within a single vessel? Within a single vessel, the answer is no.

Quote
  • Does gravitational acceleration vary depending on the distance from the planet?

 

Certainly. 1 / r^2 just like Newton said. This game is all about teaching you orbital physics, and you can't do that without proper gravity modeling.

 

Edited by bewing
Link to comment
Share on other sites

1 hour ago, bewing said:

The question in my mind is "how the heck are you planning on steering this thing?" 

You are a step ahead of me.  Was hoping to start with the "shot" missions first.  Just up.  And then with an angle.  Should be fun and educational. Initially I don't intend to steer but rather aim so I can specify a vector.  Your input is helpful.

 

Link to comment
Share on other sites

6 hours ago, Macjimm said:

Spricigo:  The Smart Parts mod looks as though it may work for remote control.  Although perhaps kOS or MechJeb may also work.

For just the purpose you asked, automatically deploy parachute,  Smart Parts is perfect: just attach and setup a altimeter.  MJ and KOS are fully functional autopilots,  better suited if you want continuous control (they also have other features,  like info readouts). 

About the drag calculations : it certainly is possible to do.  Problem is that if you want reasonable accuracy numerical analysis will be necessary. This is the kind of calculation where dozens of factors are too few,  and we want a computer to handle it for us or just go with the empirical data.

For most of practical game purposes a rough idea of how much drag will effect a flight it's good enough.   In some challenges it may become more relevant,  then there is experimentation. 

 

Link to comment
Share on other sites

  • 2 weeks later...

The mod kOS is great. It gives you a programming language that you can use to program your probes to do pretty much whatever you want. If you haven't done any coding before it can be quite confusing at first. 

I for example have already written a script that can fly a ship to mun, land it and return to kerbin safely without any input from me. It was a fun exercise. And currently I'm trying to make a script that can precision land at given coordinates

Link to comment
Share on other sites

You can deploy chutes with Custom Action key at any time, regardless of stage. No need for a mod for this. You can also cut chutes with a Custom Action key. On a side note, a little known fact: an engineer can repack deployed chutes while EVA, just need to be close to the chute location.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...