Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 3 [4]   Go Down

Author Topic: Help required  (Read 13099 times)

0 Members and 1 Guest are viewing this topic.

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1532
Re: Help required
« Reply #36 on: September 03, 2020, 09:17:15 AM »

I am finalising animation for cockpits and there are a few functions I would like someone to explain to me.

The ones I am puzzled by are .....

Code: [Select]
float getball(float limit)
This seems to get acceleration values and convert them into an angle which is then limited to +- limit. What does it represent?

Code: [Select]
fm.getW()
W is not really enough of a description for me to work out what it is

Code: [Select]
fm.Or.getKren()
Kren..... never heard of Kren.... I think he drinks in my local though

Code: [Select]
fm.Or.getTangage()
Tangage ..... Is this French for Pitch?

Cheers guys


Logged

sniperton

  • member
  • Offline Offline
  • Posts: 1226
Re: Help required
« Reply #37 on: September 03, 2020, 09:57:24 AM »

Logged

Pursuivant

  • member
  • Offline Offline
  • Posts: 711
Re: Help required
« Reply #38 on: September 03, 2020, 07:41:34 PM »


Code: [Select]
float getball(float limit)
This seems to get acceleration values and convert them into an angle which is then limited to +- limit. What does it represent?

My first guess is that it's the data for an old-style bank indicator where you've got an inverted crescent-shaped spirit level. As you bank the aircraft the angle of the bubble changes from the vertical. IIRC, the I-16 has such an indicator and I believe that similar items were used in WW1-era aircraft.

If it just takes acceleration data, then there might be similar instruments which just measure momentary acceleration along a particular axis.
Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1532
Re: Help required
« Reply #39 on: September 05, 2020, 01:23:21 AM »

Code: [Select]
protected float getBall(double paramDouble)
  {
    double d1 = 0.0D;
    long l1 = Time.current();
    long l2 = l1 - this.oldBallTime;
    this.oldBallTime = l1;
    if (l2 > 200L) l2 = 200L;
    double d2 = 0.00038D * l2;
    if (-this.fm.getBallAccel().z > 0.001D) {
      d1 = Math.toDegrees(Math.atan2(this.fm.getBallAccel().y, -this.fm.getBallAccel().z));
      if (d1 > 20.0D) d1 = 20.0D;
      else if (d1 < -20.0D) d1 = -20.0D;
      this.pictBall = ((1.0D - d2) * this.pictBall + d2 * d1);
    } else {
      if (this.pictBall > 0.0D) d1 = 20.0D; else
        d1 = -20.0D;
      this.pictBall = ((1.0D - d2) * this.pictBall + d2 * d1);
    }
    if (this.pictBall > paramDouble) this.pictBall = paramDouble;
    else if (this.pictBall < -paramDouble) this.pictBall = (-paramDouble);
    return (float)this.pictBall;
  }

Okay so the code calls into this.fm.getBallAccel()

Code: [Select]
public Vector3d getBallAccel() {
    TmpV.set(this.LocalAccel);
    if (this.Vwld.lengthSquared() < 10.0D) {
      double d = this.Vwld.lengthSquared() - 5.0D;
      if (d < 0.0D) d = 0.0D;
      TmpV.scale(0.2D * d);
    }

    TmpA.set(0.0D, 0.0D, -Atmosphere.g());
    this.Or.transformInv(TmpA);

    TmpA.sub(TmpV);
    return TmpA;
  }

Which looks like it tries to convert local acceleration into a scaled impulse???

Code: [Select]
d1 = Math.toDegrees(Math.atan2(this.fm.getBallAccel().y, -this.fm.getBallAccel().z));
So the angle is formed from the forward impulse and the up impulse. so its some kind of up impulse.


 
Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1532
Re: Help required
« Reply #40 on: September 05, 2020, 01:33:51 AM »

So it is slip indicator .....  ;)
Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1532
Re: Help required
« Reply #41 on: September 19, 2020, 05:58:42 AM »

I have added an OxygenSuppplyComponent

This only has two parameters

CapacityIn litres
AutomaticBoolean

This is linked to the hypoxia system so if you fly too high for two long you will blackout and eventually die if luck does not take you below 15000 feet.

The problem is I can only find limited data.

I am using an approximation that the pilot requires 1 litre of oxygen per second for each ten thousand feet above 15000 feet.

However the only data I can find for the Spitfire quotes 750 litres of O2 , which seems bloody little to me.

It only gives you some 10 minutes of flight above 15000 feet, can't be correct.

Anyone got any other data?


Logged

Michkov

  • member
  • Offline Offline
  • Posts: 18
Re: Help required
« Reply #42 on: September 19, 2020, 04:22:25 PM »

I am using an approximation that the pilot requires 1 litre of oxygen per second for each ten thousand feet above 15000 feet.

Is that a typo? I did a quick search and everything is in the liters per minute range. This mentions 1l/min/10000ft as a good rule of thumb.
Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1532
Re: Help required
« Reply #43 on: September 20, 2020, 02:31:56 AM »

Okay that was my mistake.

A pilot needs 1 litre of AIR  per second per 10,000 feet.

The oxygen required is much less than that and the approximation 1 litre of OXYGEN per minute per 10,000 feet seems much more sensible.

Thanks Michkov
Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1532
Re: Help required
« Reply #44 on: December 12, 2020, 09:49:57 AM »

So I have upgraded my object tester to allow me to check animation ranges on game objects.

And it looks like I have mesh issues.



You can clearly see the barrel of the gun moves through the head of the gun.

Can anyone tell me if this is normal ?

Or is the flak 88 bugged?

Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1532
Re: Help required
« Reply #45 on: December 13, 2020, 02:57:55 PM »

I realised I needed a second animation type where the head is animated as well as the gun



Flak 88 still looks bugged
Logged

Pursuivant

  • member
  • Offline Offline
  • Posts: 711
Re: Help required
« Reply #46 on: December 15, 2020, 08:33:21 PM »

It's not you, the animation is screwed. Only the barrel/breech and recoil recovery mechanism recoils not the entire gun carriage. Also, the recoil speed is wrong and the travel distance looks to be excessive.

If you want to be a real stickler for accuracy, there's also no recoil effect on the gun stand given the relative angle of fire. It should pitch up slightly on the side closest to the gun barrel when the gun is fired. Add dust effects as necessary for effects of muzzle blast and the gun platform slamming back into position.

Assuming that the model is actually a Flak 36-37 88mm the model is also wrong, the legs of the gun stand should be thinner and the gun carriage/elevation mechanism should be thinner and shaped differently.

There are plenty of videos out there, both contemporary and modern, showing the Flak 36 in action. No excuse to get the animation and model so badly wrong.
Logged
Pages: 1 2 3 [4]   Go Up
 

Page created in 0.072 seconds with 24 queries.