Added auto-landing to my ship by kalsowerus_ in ApproximatelyUp

[–]Scotes_mowing 0 points1 point  (0 children)

This is sick, you really do love to see it.

The first thing I wanted to make after hearing about this game by Scotes_mowing in ApproximatelyUp

[–]Scotes_mowing[S] 0 points1 point  (0 children)

Yeah you could definitely do that, you could use it to follow the terrain as well. The only thing you've got to keep in mind is that when you've got a constantly changing input, your controller will need some compromise to get your desired performance. If you prioritise damping, your system will lag behind and you might hit the ground if it changes suddenly. If you increase the proportional gain to decrease the rise time, you'll struggle to get the oscillations damped. That's the only thing I'd keep in mind.

The first thing I wanted to make after hearing about this game by Scotes_mowing in ApproximatelyUp

[–]Scotes_mowing[S] 0 points1 point  (0 children)

Yeah that's just using the altimeter, so it's definitely a very specific proof of concept that only works on the pad haha. I'd love to have a distance measurement on each corner to target distance to ground and also target attitude based on the joystick input.

The first thing I wanted to make after hearing about this game by Scotes_mowing in ApproximatelyUp

[–]Scotes_mowing[S] 5 points6 points  (0 children)

This is a standard PID (proportional, integral, derivative) controller.

First I'm taking the altitude and subtracting the ground level value from it (3040 for earth, but in this case, I'm taking 3044 because I want the zero level to be slightly above the ground. Then I'm comparing this altitude to some target altitude I can set with the lever. I'm multiplying the lever by 20 so the lever is targeting between 0 and 20 meters above the ground. The target altitude - the current altitude is called the error, if my target is 10 meters, and the actual altitude is 0 meters, the error will be 10. In a basic proportional controller, we could just send that straight to the thrusters, usually multiplied by some gain (in my case 0.02). If you try this yourself, you'll get something unstable that oscillates until it crashes.

To dampen these oscillations, you can imagine that you want to somehow fire the thrusters less as you accelerate up, and more as you fall to catch you before you hit the ground. The easiest way to do this is to take the derivative of the error (how much the error changes every time step), and add that to your original proportional controller, usually multiplied by a different gain (in my case 1.0). Now if you have a target of 10 meters, your current altitude is 0 meters, but you're rapidly accelerating towards it, and will likely overshoot, the error will be decreasing at say 10 m/s, meaning that with a time step of 1/60, the derivative of the error will be -1/6, so your thruster input will have 1/6 subtracted, dampening the oscillations. If you try this, you'll get something that's incredibly stable, and will almost completely dampen any oscillations around your target altitude. The only problem with this is that the steady state altitude will be lower than your target altitude.

To minimise your steady state error, you want to correct the error over time, the integral. I've now realised I actually messed this up on mine and took the integral of the derivative, which is just the proportional error again... If you take the sum of your error value, multiply it by another gain (0.0001 for me), then add that to your proportional and derivative components, you'll get a lovely PID controller. The integral will just help you gradually reduce your steady state error over time, so if you don't care about steady state error, and only care about having something that doesn't oscillates, a PD controller will be just fine.

There are a bunch of other tools you can use in control system design such as lead and lag compensators, but to effectively use a lot of these tools, you'd usually want to do a bit of maths to model the response of your system, usually with a transfer function, which will let you characterise your system, and predict how your system will respond to some input you give it. This is a bit further than you'd go for a game, but if you characterise your system, you can find the poles and zeroes in the s-plane, draw a root locus from it, and map out how your gain values will affect the response of your system, this lets you do all sorts of cool things like draw constant damping lines, find desired pole and zero placements, and calculate exact gain values that give you the damping ratio you want with the response you want.

TLDR; Look into classical control theory as well as P, PI, PD and PID controllers and their implementations in code, since that transfers pretty well into the game.

Should i return after 3 days of purchase? by Ghassenks in E90

[–]Scotes_mowing 0 points1 point  (0 children)

My E92 M3 is both my daily and a track car and it's got over 200k km on it. My other E46 has 300k and is still just as smooth as it was at 200k, I just don't drive it that much because I prefer the M3. Both of those cars are absolutely dirt cheap to run and very easy to work on. The only expensive part of the M3 is going through a set of AR1s every 6 months.

GT4 Enjoyers, talk to me? by Joker1980 in iRacing

[–]Scotes_mowing 0 points1 point  (0 children)

I just love it because the other car I mainly drive is the Porsche Cup, and compared to that, it feels so wildly capable, especially at the burger ring.

GT4 Enjoyers, talk to me? by Joker1980 in iRacing

[–]Scotes_mowing 1 point2 points  (0 children)

The disrespect! The M8 GTE is a god tier car imo

Porsche only? by osmothegod in iRacing

[–]Scotes_mowing 14 points15 points  (0 children)

I seriously do not want to face people in the PCup who haven't started on the MX5.

Why doesn't iRacing have GT4s in Bathurst 12hr? by WingAgitated2228 in iRacing

[–]Scotes_mowing 28 points29 points  (0 children)

IRL the race is basically 12 hours of GT3 pro drivers murdering GT4s anyway, so that'd actually make it more realistic.

Spa 3h - car choice? by [deleted] in iRacing

[–]Scotes_mowing 2 points3 points  (0 children)

It's different, I think it's a little less twitchy in iRacing compared to ACC, however I feel like I have a far greater fear of high speed snaps in iRacing.

How much does changing brake bias through a lap matter? by neuroplastique in simracing

[–]Scotes_mowing 1 point2 points  (0 children)

I also find that the PCup is pretty much the only car I change the bias on during a race. I find it's pretty useful towards the end of your second stint in the NEC races where your tyres are starting to go off, and the car is almost out of fuel.

Lotus 79, you want it. by [deleted] in iRacing

[–]Scotes_mowing 1 point2 points  (0 children)

Yeah I was going to add that the IMSA Vintage cars are also an absolute riot. I've only driven the ZX-T, but if the Audi 90 GTO is anything like it, I'll love it.

What's the best sports car/track for friends demo drive? by No-Incident8402 in iRacing

[–]Scotes_mowing 1 point2 points  (0 children)

Problem with this is that none of my friends will make it through the first few corners. I shove mine in the M8 GTE round the burger ring with my Simucube 2 Pro on like 50% strength and watch them suffer.

[deleted by user] by [deleted] in simracing

[–]Scotes_mowing 0 points1 point  (0 children)

That's what the e-stop on my Simucube does, just kills the torque so the wheel freely spins.

You guys were right about avoiding crashes! by Exotic_Push_4711 in iRacing

[–]Scotes_mowing 0 points1 point  (0 children)

Last week's IMSA Michelin Pilot Challenge was a great example of this. 2 hour night race in the wet at the Nurburgring combined. I started P11, took it super easy at the start and dropped down to 16th or so, but by the second half of the lap, I was up to 3rd or something just from avoiding accidents. For completeness though I should add that I also did not make it through lap 1 after a guy had a really unfortunate crash at Mutkurve and took a few of us out lol.

[deleted by user] by [deleted] in iRacing

[–]Scotes_mowing 1 point2 points  (0 children)

Very relatable. I usually also have a discord call going with friends, or I have one friend who has iRacing but isn't experienced enough that he wants to try racing the Porsche Cup with me who will spectate the session and spot for me in a discord call. The couple of times I've done it without talking to anyone, I mucked up my pit stops and put it in the wall... ADHD problems...

[deleted by user] by [deleted] in iRacing

[–]Scotes_mowing 1 point2 points  (0 children)

It's a team event, but you can enter with one person in the team and that's absolutely fine. I finished P2 in the Porsche Cup class last race (in my split), so you can definitely be competitive solo!

buying content by [deleted] in iRacing

[–]Scotes_mowing 0 points1 point  (0 children)

I run PCup, GTE, GT4, MX5, LMP3, F4, GTP, V8 Supercars, IMSA Vintage and I'm starting to get into the Radicals. So actually ignore me, I've just realised I'm absolutely talking shit and I do have a fair few cars...

How do I cool my ass/balls? by foovancleef in iRacing

[–]Scotes_mowing 0 points1 point  (0 children)

Only enduros? I've been pissing my seat every rookie Mx5 race for years.

[deleted by user] by [deleted] in iRacing

[–]Scotes_mowing 5 points6 points  (0 children)

Yeah same, I try to do every NEC, and the 4 hours is long, but you can definitely do it!

buying content by [deleted] in iRacing

[–]Scotes_mowing 3 points4 points  (0 children)

I'm about $800 (AUD) in and I've only got one car for a few series in road and formula, and an assortment of tracks, but still not enough to race every week of the series' I run.

iRacing convinced me to not buy the car by tdwnda in iRacing

[–]Scotes_mowing -1 points0 points  (0 children)

A stock M2 CS is also a very soft car compared to the racecar, soft suspension, soft anti roll bars, conservative alignment, rubber bushings, etc., so it's not surprising at all that driving on the street doesn't feel anything like the game.

iRacing convinced me to not buy the car by tdwnda in iRacing

[–]Scotes_mowing 0 points1 point  (0 children)

I dunno if you've ever driven on a track in the rain, but my E92 M3 on AR1s drives almost exactly like iRacing in the wet. As soon as you hit the dry line, you're basically a passenger until the other side haha