Jump to content

[1.9-1.10] Throttle Controlled Avionics


allista

Recommended Posts

21 minutes ago, drhay53 said:

Working on the screenshots now, will post to imgur soon

interestingly as I was testing, I picked a target right along my equatorial orbit and clicked "land" and TCA set the burn for 172 days in the future o.O  I cancelled the landing and clicked it again and it worked fine.

I think I'll go hang myself :confused: This is so frustrating...

Link to comment
Share on other sites

Here's the imgur album. FWIW I've also tested 50km starting orbits with the same results.

Now I will try to test a more "traditional" craft and see what happens.

I should mention also that TCA doesn't even try to burn the engines after this. It just crashes into the planet without doing anything.

Edited by drhay53
Link to comment
Share on other sites

FWIW this mostly stock craft does the same thing. It does at least try to burn before crashing, but it still slams into the planet at 200 m/s. My last planned test is a fresh install on my mac, with just hyperedit and TCA installed.

 

Link to comment
Share on other sites

So, on my Mac this craft landed fine. I don't even know how to go about debugging something like this. The next thing I suppose will be to load this craft into my main save on windows and see if it still crashes into the mun. If it does, I don't know what the heck to do. Do you know of any mod interaction that could mess with TCA?

 

Link to comment
Share on other sites

This one landed fine on my windows save.

No clue how to predict whether a craft will land or not now :( Literally the only difference between this craft on the 2nd one that crashed above was fuel tanks.

Guess I'll strap a fueltanksplus fuel tank to this thing and see what happens!

edit: BTW, don't stress about the long warp time thing. That happens when you accidentally turn on the landing function before activating the engines, which I forget to do since I'm hyperediting the craft into place.

Edited by drhay53
Link to comment
Share on other sites

Have you tried with more steeper landing ?

I was messing with my own kOS script for Mun landing that is much, much more simpler than features TCA use. I didn't found significant difference with dV efficiency if you kill ground speed first, so you land completely vertical on Mun, against having significant ground velocity on low altitudes.

Of course, killing ground velocity at low altitude helps, as you will not gain lot of vertical velocity from gravity on the fall down to surface that you need to compensate.

IIRC, highest mountain on mun is around 6km or even less. Try to set Pe just above landing spot, set maneuver to kill almost all ground speed, so you fall near landing site almost vertical and after that allow TCA to do automatic landing.

Link to comment
Share on other sites

3 minutes ago, kcs123 said:

Have you tried with more steeper landing ?

I was messing with my own kOS script for Mun landing that is much, much more simpler than features TCA use. I didn't found significant difference with dV efficiency if you kill ground speed first, so you land completely vertical on Mun, against having significant ground velocity on low altitudes.

Of course, killing ground velocity at low altitude helps, as you will not gain lot of vertical velocity from gravity on the fall down to surface that you need to compensate.

IIRC, highest mountain on mun is around 6km or even less. Try to set Pe just above landing spot, set maneuver to kill almost all ground speed, so you fall near landing site almost vertical and after that allow TCA to do automatic landing.

I used to land like that, yes, but that defeats the purpose of having a TCA module that is supposed to handle landing from orbit. I'm sure @allista will want to know what's happening here.

Yep, so, literally, I added FuelTanksPlus tanks to the craft that just worked, and now it crashes.

 

Link to comment
Share on other sites

Tried testing a different FTP tank, and it seems to work ok. Lands fine.

My hunch here is that it has something to do with TWR and the fact that TCA is coming in generally too fast, waiting a bit too long to decelerate.

Not sure why it claims there's not enough fuel, on the test that included the monoprop engines. Does it check specifically for LFO?

In all of the tests, the PID controller is still overshooting by a lot.

Link to comment
Share on other sites

On 6/30/2016 at 6:27 PM, drhay53 said:

Here's a link to the craft:

https://www.dropbox.com/s/cqz0s60qu04ozsi/CrazyCopter.craft?dl=0

It requires KAX.

Thinking about the craft, it probably doesn't have enough yaw control authority, but since it flew without any oscillation at all in the previous version, I just wanted to see if there is something else going on.

Here's an image; it has several helicopter rotors for most of the lifting, then several jump jets to help with stabilization, and several horizontal engines that lets it get up to ~130 m/s.

http://imgur.com/ycsaH8K

Found and fixed this. I have been incorrectly estimating angular drag factor, but in manifested itself only with the rotors, which have huge surface area (as they are actually full circles).

Link to comment
Share on other sites

Well, unfortunately I don't have time to test anymore, but I will say this; using the exact same craft and landing in slightly different locations seems to cause a crash as well. Basically, I can't find a surefire reason why it crashes. 

I have a couple of thoughts on possible reasons:

1) terrain is not properly being accounted for. i.e. TCA doesn't really know exactly how long it has until it hits the ground near the landing site

2) TCA is not properly calculating the burn time needed for deceleration.

3) TCA is coming in too flat, and has no margin for error

If you know the time to impact, the delta-v needed, and the burn time, you should always be able to stop in time. You should be able to come in this close to the surface and still get it landed. Unfortunately, it seems my success rate with even a very simple craft is pretty low.

Link to comment
Share on other sites

This mod is insane. So wonderful. I spent three hours last night making insane stupid VTOL designs and watching your program go what over them. It got all of them into a stable vertical takeoff though which was amazing. My six a-symmetric twin boar design had problems reaching waypoints though lol.

Super impressive mod dude I was shocked by the results. the era of VTOLS has begun.

Link to comment
Share on other sites

Thanks for a quick reply! I uninstalled the mod but its still happening. Mod is awesome btw! I'm trying to land a booster but my throttle locks in the off position on decent. They still gimbal around and I have control over RCS and SAS still. :/ I'm using 9 scaled down Vector engines, if anyone can help PM me!

Link to comment
Share on other sites

8 hours ago, drhay53 said:

Well, unfortunately I don't have time to test anymore, but I will say this; using the exact same craft and landing in slightly different locations seems to cause a crash as well. Basically, I can't find a surefire reason why it crashes. 

I have a couple of thoughts on possible reasons:

1) terrain is not properly being accounted for. i.e. TCA doesn't really know exactly how long it has until it hits the ground near the landing site

2) TCA is not properly calculating the burn time needed for deceleration.

3) TCA is coming in too flat, and has no margin for error

If you know the time to impact, the delta-v needed, and the burn time, you should always be able to stop in time. You should be able to come in this close to the surface and still get it landed. Unfortunately, it seems my success rate with even a very simple craft is pretty low.

1) No, terrain is always accaunted for.

2) That is partially the case: TCA calculates theoretically correct value; in practice, however, many factors change actual braking time constantly. I replaced this calculation with the calculation of total burn time which is almost two times bigger, and in my tests it works better with the last craft that you provided on the screenshot. The price is the early braking => more fuel required overall.

3) That is also true: I noticed that you were landing from a very low orbit (14k); presently, deorbiting trajectory is defined by periapsis. Curvature of such trajectory if, obviously, is not invariant with respect to starting orbit height. I now have replaced this with the deorbiting trajectory of constant eccentricity; thus ensuring much more constant landing curve. But when your target is far out of the orbit's plane, descend necessarily becomes more and more shallow. Only one way to avoid this: change the plane prior to descend. But then again, it is less fuel-effective.

I'll made a short video to demonstrate the current state...

30 minutes ago, RandyRawgust said:

Thanks for a quick reply! I uninstalled the mod but its still happening. Mod is awesome btw! I'm trying to land a booster but my throttle locks in the off position on decent. They still gimbal around and I have control over RCS and SAS still. :/ I'm using 9 scaled down Vector engines, if anyone can help PM me!

What d'you mean by "uninstalled the mod but it's still happening"? Have you uninstalled TCA?

Link to comment
Share on other sites

Thanks @allista. I use the orbit at 14km because of the community delta v chart and because sometimes I make landers in the Apollo style that rendezvous with their command module. 

Anyway like I said, I also tested with a 50km orbit and it seemed like it still came in really fast at low altitude. 

is the shape of the descent configurable in tca.glob?

anyway it sounds like your changes should be positive. I want to be able to trust that TCA will land reliably. 

 

Edit: also, I would never do a plane change at 14km, that's way inefficient. Usually if I wanted to land in some random high latitude I would get into a polar orbit during my transfer and then wait for the location to come around. In practice I usually land from more like 20-30km than 14km. 

Edited by drhay53
Link to comment
Share on other sites

21 minutes ago, drhay53 said:

Thanks @allista. I use the orbit at 14km because of the community delta v chart and because sometimes I make landers in the Apollo style that rendezvous with their command module. 

Anyway like I said, I also tested with a 50km orbit and it seemed like it still came in really fast at low altitude. 

is the shape of the descent configurable in tca.glob?

anyway it sounds like your changes should be positive. I want to be able to trust that TCA will land reliably. 

 

Edit: also, I would never do a plane change at 14km, that's way inefficient. Usually if I wanted to land in some random high latitude I would get into a polar orbit during my transfer and then wait for the location to come around. In practice I usually land from more like 20-30km than 14km. 

Oh, how I want TCA to be reliable... :blush:

In TCA.glob under DEO node there's the StartPeR option that sets the initial periapsis in parts of celestial body radius. The less this value, the more sharp trajectories are searched at first. If none of them fits, the desired periapsis is increased.

Link to comment
Share on other sites

1 hour ago, allista said:

What d'you mean by "uninstalled the mod but it's still happening"? Have you uninstalled TCA?

Sorry, let me clarify. I uninstalled TCA yes, although my issue persists. I've never had a problem with manual landing burns before. So I figured it was TCA because that was all I had changed. TCA worked fine when my throttle wasn't stuck off. I mean at least if it was stuck at 100% the TCA slider would sufficient. I woke up one day, started KSP and they updated to 1.1.3 and basically broke all my launch vehicles and all my crafts. :/

Also have to say I'm really impressed with this mod. 

Link to comment
Share on other sites

@drhay53, could you, please, test the landing with your crafts and scenarios using this fixed version? I'm afraid the decision tree of the algorithm is still very overfitted and in many cases may fail; do try to brake it! :D

Anyone else who wish to join in testing, by all means, please do!

TCA-3.2.0.1 with fixes to Landing (both orbital and normal), Attitude and Bearing controls. 

Oh, another thing: the new version is compiled against my utility library which is included and required.

Also, as this library, among other things, automates plugin configuration, the Globals and User configuration files are now named as a corresponding plugin; in that case they are ThrottleControlledAvionics.glob and ThrottleControlledAvionics.user

If you had some customizations made, don't forget to rename the User file; and, if you haven't done so yet, to move there all the changes from the Globals.

Link to comment
Share on other sites

@allista things are looking much better! ok after some quick testing (with the USI MKS lander from my imgur album):

1) The KAX helicopter flies flawlessly now

2) The landing module seems much more reliable, but I still had some crashes. From what I can tell, here's what happened

   a) The first test I got the "not enough fuel to land properly. will decelerate as much as possible before impact". However it never tried to decelerate. This actually happened to me before this update as well. It never burns the engines, it just crashes. It had something like 700 delta-v left so it should have been able to burn enough to 'land wherever', without searching for a landing site properly and all of that. From as user's perspective crashing your ship when it seems to have enough delta-v is a pretty tough learning experience :) Adding more fuel makes that message not come up, but it's a tough way to learn that lesson. However, using the 'jump to' module for testing, I saw this message and it actually did the burn and landed safely.

   b) I'm taking care of my 3 month old son at home and so on one test I started the landing procedure without remembering to turn RCS on, and walked away for a few minutes. When I came back, the craft was a few thousand meters from the landing site and kind of tumbling around trying to do some burns. Probably trying to get lined up with the landing site, I guess. Anyway it slammed into the ground at a few hundred m/s :) I'm guessing it was a control authority issue.

3) This is something that I've seen for a long time but never really reported. Sometimes the landing module gets stuck on 'checking landing site....' and will just hover there until it runs out of fuel. This can usually be fixed by simply turning the landing module off and back on. On one test, it actually did something even weirder. It got down to a few hundred meters and killed all velocity, and switched to 'checking landing site...'. Then the vertical velocity module kept oscillating between +10 and -10 m/s. The craft was overall gaining altitude at around 6 m/s and it did this for a few hundred delta-v and a couple thousand meters. I killed the land from orbit module and started up the standard 'land' module and it broke the cycle and started actually looking for a place to land.

The standard 'stuck in checking landing site...' mode though seems to be to just hover there until it runs out of fuel or you cycle the module.

The good stuff: I think I can figure out how to design craft in such a way that I will get very high success rates out of the landing from orbit module; but you should probably look into the 'not actually decelerating' issue as that will definitely cause some ships that will easily have enough delta-v to land with mechjeb to crash with TCA. Also if you can find where the landing module is getting stuck that would greatly improve the confidence in hitting 'land' and walking away for a few minutes.... for those of us with little babies, or who want to make a sandwich, or whatever else :)

Edited by drhay53
Link to comment
Share on other sites

@drhay53, cool, thanks for the testing! I have a 3-month old dog now, which is somewhat comparable in this case :confused:

So the USI somehow prevents correct determination of remaining fuel. Stock lander with only monopropellant thrust there's no such issues: I've tested it specifically, for fill tank and normal landing and for almost empty tank and emergency landing: the last-minute suicidal burn works fine on Mun, Kerbin and Duna.

Could you post the craft file of your lander? Is something except MKS required?

Edited by allista
Link to comment
Share on other sites

@allistait requires SpaceY for the monoprop engines, and USI Modular Kolonization Systems for the tanks (those may be USI core?) and the lander.

https://www.dropbox.com/s/3vsczx36us5l4h8/TCA_MKS_tester.craft?dl=0

Removing one of the two tanks on top should give the 'not enough fuel' message. With both tanks, it works fine. This was from 50km around the mun.

Edited by drhay53
Link to comment
Share on other sites

4 hours ago, drhay53 said:

@allistait requires SpaceY for the monoprop engines, and USI Modular Kolonization Systems for the tanks (those may be USI core?) and the lander.

https://www.dropbox.com/s/3vsczx36us5l4h8/TCA_MKS_tester.craft?dl=0

Removing one of the two tanks on top should give the 'not enough fuel' message. With both tanks, it works fine. This was from 50km around the mun.

Alas, can't load it either. Installed SpaceY lifters and MKS Light. Will try full MKS and Y-expansion. By since i'm on 32bit system, my part capacity is very low:

Could not allocate memory: System out of memory!
Trying to allocate: 1134080B with 16 alignment. MemoryLabel: TempJobAlloc

 

Link to comment
Share on other sites

18 minutes ago, allista said:

Alas, can't load it either. Installed SpaceY lifters and MKS Light. Will try full MKS and Y-expansion. By since i'm on 32bit system, my part capacity is very low:


Could not allocate memory: System out of memory!
Trying to allocate: 1134080B with 16 alignment. MemoryLabel: TempJobAlloc

 

:( sorry. I don't think the monoprop engines are in the expanded spaceY, I think it's probably either the tanks or the big module itself that you're missing.

Try this: using the SpaceY engines, make a lander that has ~1000 delta-v and try landing it. See if that triggers the message and the crash.

I will try in a little bit but I can't at the moment.

 

edit: i think 1500 dv is about the right starting point for the one that crashed

Edited by drhay53
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...