Caerfinon Posted July 19, 2021 Share Posted July 19, 2021 10 minutes ago, phraggers said: Perfect! FYI - it's also working nicely in KSP 1.12.1 as well. Link to comment Share on other sites More sharing options...
linuxgurugamer Posted September 29, 2021 Author Share Posted September 29, 2021 New release, 0.4.0.1 Added AssemblyFileVersion Updated version file for 1.12 Link to comment Share on other sites More sharing options...
ss8913 Posted November 4, 2021 Share Posted November 4, 2021 I have some questions about PID tuning.. some of my craft seem to have a lot of low-speed pitch oscillation when on initial/final approach; I've been solving this by increasing the scalar value for the vertical speed PID but that doesn't always work; is there a smarter way to tune the PIDs? The craft in question all fly in a stable fashion when using fly-by-wire or pure manual control, so i don't think it's a design problem per se, but I'd like some advice on how to tune out the pitch oscillation better than just ramping the scalar up..? Also if there were a way to integrate with FAR such that I could specify approach speeds in KIAS instead of m/s ground speed, that'd also be good, since.. that's how approach speeds work in the real world Link to comment Share on other sites More sharing options...
610yesnolovely Posted November 19, 2021 Share Posted November 19, 2021 On 11/4/2021 at 12:09 PM, ss8913 said: I have some questions about PID tuning.. some of my craft seem to have a lot of low-speed pitch oscillation when on initial/final approach; I've been solving this by increasing the scalar value for the vertical speed PID but that doesn't always work; is there a smarter way to tune the PIDs? The craft in question all fly in a stable fashion when using fly-by-wire or pure manual control, so i don't think it's a design problem per se, but I'd like some advice on how to tune out the pitch oscillation better than just ramping the scalar up..? Also if there were a way to integrate with FAR such that I could specify approach speeds in KIAS instead of m/s ground speed, that'd also be good, since.. that's how approach speeds work in the real world I'm not an expert, but scalar is probably not want you want to fiddle with. There should be seperate Kp, Ki, and Kd values - each of these are set specific to the plane (I don't think Kramax Autopilot has auto-tuning which is where the PID controller learns quickly and settles on suitable values). They all combine and affect each other, but I believe Kp may be too large (if it overshoots too much), or more likely Kd not large enough (if it doesn't, but keeps oscillating). This dude knows more than I do, and has some advice. PID controllers are pretty much everywhere, so there's plenty of Youtube videos that describe how they work. Personally, I always use Atmosphere Autopilot, because it's magical in it's ability to make planes fly really smoothly. For "fixing" any plane under manual control you just turn it on with "P" and it magically works (after a few seconds of slight oscillations). It also does what's called "Moderation" which basically means your movements won't kill your Kerbal with high G maneauvers (you can turn that off if you need to do acrobatics or for drones). Under the hood it's more complex, because it's got PID auto-tuner swhich works for any aircraft in any situation (if it's possible to stabalize). It has similar autopilot features to Kramax: Link to comment Share on other sites More sharing options...
Bearfight Posted February 8, 2022 Share Posted February 8, 2022 (edited) On 11/19/2021 at 5:16 PM, 610yesnolovely said: I'm not an expert, but scalar is probably not want you want to fiddle with. Scalar is the first thing to fiddle with if an oscillation is occuring due to aggressive control inputs - think of it like moderation. I've been building various vehicles in Stormworks over the last couple years, which utilizes PIDs heavily in more advanced builds. I've gotten okay at fiddling with the values. Armed with this knowledge - I was delighted to find PIDs everywhere, including KSP! KRAMAX and Atmosphere Autopilot are the two prime examples I am familiar with. When I dig into the PID values in KRAMAX, some are a little aggressive by default. I tend to reduce the integral and differential on the outer loop down close to zero, if not zero, and it often tunes out pesky oscillations. I will agree that Atmosphere Autopilot is a much better program in terms of "set it and forget it" flying - in most cases it tunes itself - rather brilliantly. I almost never leave a runway before tapping "P". As a current keyboard pilot - its the best way to simulate a steady, analog stick rotation, so the plane leaves the runway poised and not flapping around from keyboard or SAS control. My current solution for ILS flights - use BOTH. When flying long airliner routes: I have AA Fly-By-Wire active, I use KRAMAX for ILS and most of the time I have warp set to 4x. AA seems to be able to moderate the KRAMAX inputs, in most cases. (For the autopilots to work well at warp, I use BetterTimeWarp to enable hyper warp and lossless physics warp - and set the CPU value to 1. Most modern gaming PCs can ignore the warning about CPU lag, it was written when even the best processors on the market would have choked. I am running an i9-10900K and have zero lag issues when using lossless physics warp, in or out of atmosphere.) I will say this... KRAMAX seems to have a tendency to oscillate along the pitch axis more so than yaw or roll. I have no logged data to back this up - its purely subjective right now. I planned on spending the day messing with my airliners (I'm on a Kerbinside GAP Remastered Kick ). Perhaps I'll do some logging and map the interactions between KRAMAX and AA FBW. I notice that a good PID setting for KRAMAX at 1x warp may become an oscillation at 4x warp too - I'll see if I can get any data on that as well. No promises but maybe I can shine a light somewhere helpful. Edited February 8, 2022 by Bearfight More Info/Correction Link to comment Share on other sites More sharing options...
Bearfight Posted February 20, 2022 Share Posted February 20, 2022 Quick update to my last post - I fired up git and vs - looked into the PID module's code and learned that I have much more to learn. No quick fixes coming from PID controller source code tweaks, of course. Now that I'm a bit more educated - just enough to be dangerous I think - I don't have much trouble tuning out an oscillation. Still, I wanted to know more so I looked into the Atmosphere Autopilot (AA) source & docs and learned about its modular "autopilots" concept. Fly-By-Wire, Cruise, Controller and Mouse Director are the three "autopilots" provided out of the box with AA but it's designed; intended I think actually- to take on additional modules. My ultimate goal would be to port Kramax's waypoint-based ILS functions into an Atmosphere Autopilot module. If I understand the concepts correctly, that should give us the best of all worlds. The realtime waypoint-based ILS nav data of Kramax being acted on by the variable, self-tuning, flight controller suite that underpins AA. No idea what that would take, logistically, just yet - more learning ahead. Having a clear goal makes learning things easier - or at least more fun, IMHO. Link to comment Share on other sites More sharing options...
ss8913 Posted April 25, 2022 Share Posted April 25, 2022 On 2/20/2022 at 9:14 AM, Bearfight said: Quick update to my last post - I fired up git and vs - looked into the PID module's code and learned that I have much more to learn. No quick fixes coming from PID controller source code tweaks, of course. Now that I'm a bit more educated - just enough to be dangerous I think - I don't have much trouble tuning out an oscillation. Still, I wanted to know more so I looked into the Atmosphere Autopilot (AA) source & docs and learned about its modular "autopilots" concept. Fly-By-Wire, Cruise, Controller and Mouse Director are the three "autopilots" provided out of the box with AA but it's designed; intended I think actually- to take on additional modules. My ultimate goal would be to port Kramax's waypoint-based ILS functions into an Atmosphere Autopilot module. If I understand the concepts correctly, that should give us the best of all worlds. The realtime waypoint-based ILS nav data of Kramax being acted on by the variable, self-tuning, flight controller suite that underpins AA. No idea what that would take, logistically, just yet - more learning ahead. Having a clear goal makes learning things easier - or at least more fun, IMHO. I too use both AA and KRAMAX but it seems like AA does nothing when Kramax is engaged.. I can't notice any difference between AA on/off when kramax is on, at least. I have lately been having a lot of trouble with pitch and sometimes yaw oscillations with kramax - it's gotten worse in the last 12-18 months it seems like - the only designs that are stable in kramax are twin tail (V tail) delta wing designs.. anything with separate wings and elevators seems to be very prone to oscillation, sometimes extreme inputs to the vertical speed PID's scalar value fixes it (like over 4.00) sometimes not. What I cannot find is any QR guide on what the PID tunable values actually do, ie what effect does scalar have (you mentioned it's like a damper, is that it?) what about Kd and Ki and the others? I'm not sure how to figure out what I need to tune and in which direction to stabilize flight. All of the designs in which the oscillations occur, if I turn off KRAMAX and use AA, they fly in a very stable fashion, so I don't think it's a problem with my designs per se, but rather that they require different PID values that I have yet to find. Can one see the AA PID values from anywhere in AA? does copying those PID values into kramax work, by any chance? Link to comment Share on other sites More sharing options...
tonimark Posted July 7, 2022 Share Posted July 7, 2022 (edited) kramax autopilot have a lot of problems controlling big aircraft which causes them to move up/down and it is caused by high expect response rate of autopilot which should be lowered for heavier aircraft Edited July 7, 2022 by tonimark Link to comment Share on other sites More sharing options...
Starcatcher2009 - Modder Posted August 29, 2022 Share Posted August 29, 2022 Anyone got a problem where the mod keeps telling that the plugin files are in the wrong place? RSS/RO/Principia with FAR. Link to comment Share on other sites More sharing options...
Ajam Posted November 2, 2022 Share Posted November 2, 2022 On 2/20/2022 at 11:14 AM, Bearfight said: Quick update to my last post - I fired up git and vs - looked into the PID module's code and learned that I have much more to learn. No quick fixes coming from PID controller source code tweaks, of course. Now that I'm a bit more educated - just enough to be dangerous I think - I don't have much trouble tuning out an oscillation. Still, I wanted to know more so I looked into the Atmosphere Autopilot (AA) source & docs and learned about its modular "autopilots" concept. Fly-By-Wire, Cruise, Controller and Mouse Director are the three "autopilots" provided out of the box with AA but it's designed; intended I think actually- to take on additional modules. My ultimate goal would be to port Kramax's waypoint-based ILS functions into an Atmosphere Autopilot module. If I understand the concepts correctly, that should give us the best of all worlds. The realtime waypoint-based ILS nav data of Kramax being acted on by the variable, self-tuning, flight controller suite that underpins AA. No idea what that would take, logistically, just yet - more learning ahead. Having a clear goal makes learning things easier - or at least more fun, IMHO. Did this ever go anywhere? Link to comment Share on other sites More sharing options...
AuddieD2015 Posted July 18, 2023 Share Posted July 18, 2023 (edited) @Caerfinon @ss8913 I realize that the last post was 2 years ago but I was hoping you could help me use the flight plan script properly. The environment is Modular RSS 1/4 sized real solar system. Earth is 600000 meters in diameter. python kramax.py -p="Earth" -g="3" -r="600000" --name="KSC27" --description="KSC Runway 27" --latitude="4.99730396296269" --longitude="-52.791191178751" --heading="270" --altitude="21" It returns waypoints with their respective altitudes at MAXKY, HIKEY, LOKEY, etc but they are all at the same coordinates as input via the command line. My results are not generating distance as they are in Caerfinon's posts. I am trying to plot a 3 degree glide slope from MAXKY to FLARE/STOP, assuming that STOP is the position I parked on the runway to gather the coordinates, if that helps. EDIT: DUH! I think I fixed it. Radius is in km and not m for one... There is distance, it's just 1000 times compressed. Using --debug returns distance. Without it, it's a vertical descent. Edited July 18, 2023 by AuddieD2015 USER ERROR Link to comment Share on other sites More sharing options...
Caerfinon Posted July 19, 2023 Share Posted July 19, 2023 11 hours ago, AuddieD2015 said: I think I fixed it. Radius is in km and not m for one This is the secret sauce for the script to work accurately. I always take my runway readings from the center of the runway ends just to get some extra landing room. Some argue that taking it from the target markers is better and more realistic, but its all personal preference. If you are coordinating the flight plans with the Nav Utilis mod it's important to take the runway measurements from the same location, other with the landing indicators are slightly off. Link to comment Share on other sites More sharing options...
AuddieD2015 Posted July 19, 2023 Share Posted July 19, 2023 17 minutes ago, Caerfinon said: If you are coordinating the flight plans with the Nav Utilis mod it's important to take the runway measurements from the same location, other with the landing indicators are slightly off. I am. I will make sure to keep that in mind. This is my first time playing Modular RSS and I have not opened any other bases yet so this info will come in handy! One thing is certain, I am glad I found this script because I was pulling my hair out trying to plot a glideslope like you would your algebra homework and it was not working. Link to comment Share on other sites More sharing options...
Caerfinon Posted July 19, 2023 Share Posted July 19, 2023 3 minutes ago, AuddieD2015 said: I am glad I found this script I was glad I found it too! Without it I never would have have written the Flight Contract mods for Kerbin Side Remastered. Best of luck on your project. Link to comment Share on other sites More sharing options...
UltraJohn Posted August 12, 2023 Share Posted August 12, 2023 I've noticed that the option for auto-throttle doesn't seem to work until you toggle on the PID option at the top left atleast once during flight. Otherwise it just throttles down your plane to 0% until you click it, no matter what velocity you try to set. Link to comment Share on other sites More sharing options...
falcon470 Posted October 19, 2023 Share Posted October 19, 2023 Rss main runway with canaveral hd/canavral pads 09/27 approcah might need some fine tuning from some one 09 came out better, 27s ok just lands on runway a little late, long as you dont need the whole runway to slow down other wise fine tune them a bit. P.s I dont know how to put hte file in the collaspeable feild so ill just post a new coment Link to comment Share on other sites More sharing options...
falcon470 Posted October 19, 2023 Share Posted October 19, 2023 (edited) KramaxAutoPilotPlans { } KramaxAutoPilotPlansDefault { Earth { FlightPlan { planet = Earth name = Ksc Runway description = SPACE COAST RGNL RNAV RWY 09 (NORTH) WayPoints } FlightPlan { planet = Earth name = R09 Cape Caneveral description = Cape Caneveral WayPoints { WayPoint { Vertical = true lat = 28.5535480819622 lon = -80.654483101065 alt = 100 name = R09 Dep } WayPoint { Vertical = true lat = 28.5536691681812 lon = -80.5597841504006 alt = 200 name = R09 Climb } WayPoint { Vertical = true lat = 28.5535480819622 lon = -80.2099399970557 alt = 1000 name = R09 Ascent } WayPoint { Vertical = true lat = 28.5839329412693 lon = -80.6867476554833 alt = 1000 name = R09 Localiser } WayPoint { Vertical = true lat = 28.5807426433006 lon = -80.8594632872108 alt = 900 name = R09 Donut } WayPoint { Vertical = true lat = 28.6447567144193 lon = -80.9328527470692 alt = 800 name = R09 Donut 2 } WayPoint { Vertical = true lat = 28.6590994802035 lon = -81.0771904479993 alt = 700 name = R09 Donut 3 } WayPoint { Vertical = true lat = 28.6143845392291 lon = -81.0912811686739 alt = 600 name = R09 Donut 4 } WayPoint { Vertical = true lat = 28.5535294223846 lon = -81.0462926516392 alt = 500 name = R09 Lineup } WayPoint { Vertical = true lat = 28.5535294223846 lon = -80.8674048007813 alt = 400 name = R09 Approach } WayPoint { Vertical = true IAF = true lat = 28.5535294223846 lon = -80.7633929030822 alt = 300 name = IAF } WayPoint { Vertical = true FAF = true lat = 28.5535294223846 lon = -80.7537525999965 alt = 200 name = FAF } WayPoint { Vertical = true RW = true lat = 28.5535294223846 lon = -80.707525999965 alt = 100 name = Flare rw } WayPoint { Vertical = true STOP = true lat = 28.5535294223846 lon = -80.6724494560567 alt = 21 name = Touchdown Stop } } } FlightPlan { planet = Earth name = R27 Cape Caneveral description = Cape Caneveral WayPoints { WayPoint { Vertical = true lat = 28.7918641659757 lon = -80.2273972401085 alt = 1000 name = R27 Intercept } WayPoint { Vertical = true lat = 28.8573429833046 lon = -80.0631285821229 alt = 800 name = R27 Donut 1 } WayPoint { Vertical = true lat = 28.8161351622206 lon = -80.0499096603379 alt = 700 name = R27 Donut 2 } WayPoint { Vertical = true lat = 28.8036173003367 lon = -80.0656174953415 alt = 600 name = R27 Donut 3 } WayPoint { Vertical = true lat = 28.7811261246653 lon = -80.1470518408905 alt = 500 name = R27 Donut 4 } WayPoint { Vertical = true lat = 28.6104194001694 lon = -80.4109857715712 alt = 450 name = R27 localizer } WayPoint { Vertical = true lat = 28.5535452361263 lon = -80.4586142154309 alt = 400 name = Approach 1 } WayPoint { Vertical = true lat = 28.5535452361263 lon = -80.5312463358264 alt = 300 name = Approach 2 } WayPoint { Vertical = true lat = 28.5535452361263 lon = -80.5536929033009 alt = 200 name = Approach 3 } WayPoint { Vertical = true lat = 28.5535452361263 lon = -80.594794931099 alt = 100 name = Approach 4 } WayPoint { Vertical = true lat = 28.5535452361263 lon = -80.6168308818209 alt = 81 name = Approach 5 } WayPoint { Vertical = true IAF = true lat = 28.5535452361263 lon = -80.6306580102335 alt = 61 name = IAF } WayPoint { Vertical = true FAF = true lat = 28.5535452361263 lon = -80.6403175194006 alt = 41 name = FAF } WayPoint { Vertical = true RW = true lat = 28.5535452361263 lon = -80.6503175194006 alt = 21 name = Flare rw } WayPoint { Vertical = true STOP = true lat = 28.5535452361263 lon = -80.6703175194006 alt = 21 name = Touchdown Stop } } } } Edited October 28, 2023 by falcon470 Runway 27 Works much better now, figured id share the refined flightplan Link to comment Share on other sites More sharing options...
Stormwalker Posted May 20, 2024 Share Posted May 20, 2024 (edited) On 8/12/2023 at 3:51 PM, UltraJohn said: I've noticed that the option for auto-throttle doesn't seem to work until you toggle on the PID option at the top left atleast once during flight. Otherwise it just throttles down your plane to 0% until you click it, no matter what velocity you try to set. I'm having a different problem - the auto-throttle doesn't do anything at all sometimes. It still sets its targets correctly, but it doesn't seem to be able to actually control the aircraft's throttle. It's very strange. And yet, sometimes it does work. Has anyone else seen this? And now, after posting that, I'm having an even stranger problem. Airplane flying along at 380 m/s. 2/3 throttle (it's a fast plane). I push the target speed up to 440 m/s... plane throttles up a little bit, starts accelerating, then throttles back and the acceleration falls back to 0.1 m/s^2... and stays there. Slooooooowly accelerating. Nowhere near max throttle. Acceleration target is shown at 10 m/s^2, and it's not even trying to do that. Even in the brief acceleration after i bumped it up it only accelerated at 2 or 3 m/s^. Again, plane is nowhere near max throttle. It is definitely capable of the target acceleration, it just isn't throttling up. If I set the speed DOWN, it will throttle all the way back to idle to slow down, though! I reset the PID tuning to defaults just to make sure I hadn't caused this somehow. Still the same behavior. I'm baffled. EDIT: Figured it out. It was another mod that had a setting which I knew existed but didn't realize was enabled. I must have accidentally turned it on at some point and forgotten about it. (If anyone else runs into this problem, make sure you don't have "Limit Q to [value]" enabled in MechJeb. I probably would have thought of that sooner, but I never use that setting so the idea that it could be turned on didn't occur to me). Edited May 20, 2024 by Stormwalker Link to comment Share on other sites More sharing options...
addffg Posted May 30, 2024 Share Posted May 30, 2024 Hi guys, does anybody know how to rescale the CDI? It looks too much bigger than the navball, I would love to have an option to make it tighter.. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now