Forums » Air Combat & Civil Aviation » IL-2: Cliffs of Dover » Is it possible to make airspeed and altitude appear on-screen HUD style? Active Topics You are not logged in. [Log In] [Register User]
Page 2 of 4 < 1 2 3 4 >
Topic Options
Rate This Topic
Hop to:
#3346383 - 07/20/11 09:20 AM Re: Is it possible to make airspeed and altitude appear on-screen HUD style? [Re: Ajay]
Para_Bellum Offline
Oberkriegkaboomführer
Hotshot

Registered: 01/18/01
Posts: 6437
Loc: Germany
Originally Posted By: Ajay
Open the cockpit , roll to the left a bit and look down across the wing, if the trees are moving from the front to the rear of the aircraft and there is no noticable shuddering the speed is ok.If the trees are moving from the rear to the front of the aircraft check first to see if you are sitting facing forward before panicking.If the trees are stationary and you could not roll the plane on any axis you are more than likely still stationary on the ground.In this case do not panic, either alight from the aircraft or takeoff and perform the checks as above.

The same basics goes for height , roll and look down over the wing,if the trees look like baby brocoli below, your height is ok.If you can count individual leaves and identify the different patterns in the bark you are too low or you may still be stationary,check the same roll axis step as mentioned above to to confirm if you are stationary.

The common element with both of the above is too remember, you can never have too much of either.If you think you have enough,you don't.The guy above and behind you will prove that wink




Great!

biggrin
_________________________
"...late afternoon the Air Tasking Order came in [and] we found the A-10 part and we said, "We are going where!? We are doing what!?"

Capt. Todd Sheehy, Hog pilot, on receiving orders during Operation Desert Storm



Top
#3347807 - 07/21/11 06:55 PM Re: Is it possible to make airspeed and altitude appear on-screen HUD style? [Re: KRT_Bong]
KRT_Bong Offline
It's KRT not Kurt
Senior Member

Registered: 11/05/07
Posts: 2500
Loc: Gulf Coast of Florida
Originally Posted By: KRT_Bong
I know by experimentation that you can get a window with percentage of throttle and mixture but it still has a visible box around it even when you make the borders invisible stil don't see a way to put the compass heading on it and once I made the engine controls icons disappear I can't figure out how to restore them, I'm sure someone will have it all figured out and make instructions or something we can copy and past into the config rolleyes

Ahh the physical representation is Analog and the text is Digital, duh!
_________________________
Windows 7 32 SP1
Gigabyte GA770 probably obsolete already
AMD Phenom II X4 3.1Ghz really an X3 unlocked and overclocked
ATI HD 5830 1Gb 256 bit it was cheap
4 x 1Gb GSkill 1333Mhz looks pretty on the MB
X-Fi Xtreme Creative Soundcard - cheap pair of headphones

"She put carbolic in my coffee, turpentine in my tea, Strychnine in my biscuits, Lord but she didn't hurt me." Furry Lewis / Big Chief Blues

Top

#3347881 - 07/21/11 09:16 PM Re: Is it possible to make airspeed and altitude appear on-screen HUD style? [Re: letterboy1]
FearlessFrog Online   content
Senior Member

Registered: 01/08/09
Posts: 4325
Loc: Vancouver, BC
It's a funny one that there isn't a speed/altitude bar.

As Mrs Frog is watching TV and I'm back from work (those tadpoles don't feed themselves you know - wow, I regret this metaphor already, as I think that's wrong about tadpoles and I'm only in the second sentence - right, carry on, I don't think they noticed).

This bit of script is a start. I present a really bad speedbar!



Here's the wee script




using System;
using maddox.game;
using maddox.game.world;
using maddox.GP;
using System.Collections.Generic;


public class Mission : AMission
{
private double nextMsgTime = 0;

public override void OnTickGame()
{
{
base.OnTickGame();

if (Time.current() > nextMsgTime)
{
nextMsgTime = Time.current() + 10.0; // 10 seconds to next message

// Leave this in if you want to test a timer
//GamePlay.gpHUDLogCenter("Time elapsed (in seconds) = " + Time.current() +
// ", next message will be at " + nextMsgTime);

if (GamePlay.gpPlayer() != null) // check if we have a player.
{
if (GamePlay.gpPlayer().Place() != null)
{
Player me = GamePlay.gpPlayer();
AiActor where = me.Place();
Point3d pos = me.Place().Pos();
GamePlay.gpHUDLogCenter("Where? x:" +
((int)pos.x).ToString() +
" y: " +
((int)pos.y).ToString() +
" z: " +
((int)pos.z).ToString()
);
}
}
}

}
}

}


Next step will be to convert the virtual units into a real altitude and then perhaps remember coordinates to calculate speed. I've no idea if that'll work, but hey, it's all free so far right?

A really (really) quick way to use a script like this:

1. Read my point (5) as it's important, but then come back here.

2. Make test mission, called it 'whatever-you-like.mis'.

3. Make a text file and copy this text into it, but call it 'whatever-you-like.cs', i.e. the c and s bit stand for c ('see) sharp (or sometimes googled as c#). Save that file next to where the mission file loads from.

4. Play the mission and this text will appear both annoying centered and largely inaccurate. It updates every 10 seconds.

5. Scripts in CoD can do *anything*, so if you download them from places you don't trust then it's worth being careful - think of it like a program you download from the internet. It's up to you, but I thought it worth mentioning.

Also, anyone is very welcome to take this ball and run with it, as I'm off out soon but I thought I could kick things off.

Top
#3347887 - 07/21/11 09:33 PM Re: Is it possible to make airspeed and altitude appear on-screen HUD style? [Re: letterboy1]
Ajay Offline
Reverse engineered CloD simmer
Veteran

Registered: 12/18/02
Posts: 14790
Loc: Brisbane OZ
Nice start Frog smile not bad for a polliwog aficionado.
_________________________
My il2 page
Seelowe Campaign
Cliffs of Dover page
CloD

My character somehow got all twisted up. I was playing the mission where you have to infiltrate the Golden Glow Estate and do multiple things. When I was out burning beehives and fighting I just eventually ran away to view my success from a distance. I first noticed it when I squated down on a tree trunk. Coot..the squatter../simHQ/2011

Top
#3347922 - 07/21/11 10:25 PM Re: Is it possible to make airspeed and altitude appear on-screen HUD style? [Re: Ajay]
FearlessFrog Online   content
Senior Member

Registered: 01/08/09
Posts: 4325
Loc: Vancouver, BC
Originally Posted By: Ajay
Nice start Frog smile not bad for a polliwog aficionado.


I even did a jpg just for you Ajay smile

Right, this is where it gets even less fun - negative fun, so to speak.

I need to convert the z coordinate in 3d space to something like meters or feet. With pencil firmly clipped behind ear I make a quick flight with the 'Frog-o-bar' showing and note some Z values at known heights, i.e.

1000 ft, 240 z (ish, this Spitfire is bouncy)
2000 ft, 560 z
3000 ft, 850 z
4000 ft, 1165 z

Hmm, that slope of line looks a bit odd. A quick foray into linear regression shows that if you plot those values on a graph you end up with:

y = 306.5x - 62.5

so, a quick fiddle to the script to add the line (they'll be an algebra test at the end, wake up at the back!):


double height = ((pos.z + 62.5) / 306.5) * 1000;

..

((int)pos.z).ToString() +
" ft: " +
height.ToString("0.0")


Means we get an altitude bar, even without a cockpit and in external view.



Next up Indicated Air Speed and the x,y velocities, plus a way to add a proper 'bar' at the bottom but it depends on when the TV show ends..

Top
#3347949 - 07/21/11 11:09 PM Re: Is it possible to make airspeed and altitude appear on-screen HUD style? [Re: letterboy1]
Happy Birthday letterboy1 Offline
(Heterosexual)Tchaikovsky Ballet Fan
Lifer

Registered: 12/30/00
Posts: 20004
Loc: Columbus, GA USA
Wow, and all this on a Sinclair ZX81. smile
_________________________
The trick, William Potter, is not minding that it hurts. The trick, William Potter, is not minding that it hurts. The trick, William Potter, is not minding that it hurts. etc . . .

Top
#3347962 - 07/21/11 11:51 PM Re: Is it possible to make airspeed and altitude appear on-screen HUD style? [Re: letterboy1]
FearlessFrog Online   content
Senior Member

Registered: 01/08/09
Posts: 4325
Loc: Vancouver, BC
I know letterboy, so much stuff you can do with 1024 numbers in the right order on a ZX81! smile

Ok, getting shouted out now by Mrs Frog. 'Criminal Home Improvement Has Got Talent' has now finished so have to rush the last bit before heading out.

I've been calculating the height, which shows I'm an idiot. A quick poke around shows it's quite easy to grab what you see in the instruments programmatically (I bet that would be useful for all sorts of external projects in the future).

A quick 'tell me my aircraft' call and we're in, i.e:



AiAircraft aircraft = (GamePlay.gpPlayer().Place() as AiAircraft);

// A smörgåsbord of parts you can pilfer from.
double ias = aircraft.getParameter(part.ParameterTypes.I_VelocityIAS, 0);
double altitude = aircraft.getParameter(part.ParameterTypes.I_Altitude, 0);
double mag_compass = aircraft.getParameter(part.ParameterTypes.I_MagneticCompass, 0);
double rep_compass = aircraft.getParameter(part.ParameterTypes.I_RepeaterCompass, 0);

double z_altitude = aircraft.getParameter(part.ParameterTypes.Z_AltitudeMSL, 0);
double z_ias = aircraft.getParameter(part.ParameterTypes.Z_VelocityTAS, 0);
double z_orientation = aircraft.getParameter(part.ParameterTypes.Z_Coordinates, 0);


..with the new output looking like this:


GamePlay.gpHUDLogCenter("Frogbar v0.1: Bearing: " +
mag_compass.ToString("0") +
" Calc'd ft: " +
height.ToString("0.0") +
" Instr IAS: " +
ias.ToString("0.0")
);


Voila, a speed bar.



It's also easy to disable instruments and break off bits of my own plane, but that's getting more complicated and self-harm like.

Tomorrow I'll have a quick peek to make it into a wee window/instrument of its own and styled like the IL2 one rather than slap-bang in your face all the time.

Top
#3347965 - 07/21/11 11:57 PM Re: Is it possible to make airspeed and altitude appear on-screen HUD style? [Re: letterboy1]
Ajay Offline
Reverse engineered CloD simmer
Veteran

Registered: 12/18/02
Posts: 14790
Loc: Brisbane OZ
Champion effort Frog.
_________________________
My il2 page
Seelowe Campaign
Cliffs of Dover page
CloD

My character somehow got all twisted up. I was playing the mission where you have to infiltrate the Golden Glow Estate and do multiple things. When I was out burning beehives and fighting I just eventually ran away to view my success from a distance. I first noticed it when I squated down on a tree trunk. Coot..the squatter../simHQ/2011

Top
#3347966 - 07/21/11 11:57 PM Re: Is it possible to make airspeed and altitude appear on-screen HUD style? [Re: letterboy1]
Freycinet Offline
Veteran

Registered: 04/15/02
Posts: 13361
Yeah, I thought it would be better to capture data from the instruments than calculating 3D spatial movement... wink

Well done!
_________________________
My Il-2 CoD movie web site: www.flightsimvids.com

Top
#3347971 - 07/22/11 12:14 AM Re: Is it possible to make airspeed and altitude appear on-screen HUD style? [Re: FearlessFrog]
Freycinet Offline
Veteran

Registered: 04/15/02
Posts: 13361
Originally Posted By: FearlessFrog

It's also easy to disable instruments and break off bits of my own plane, but that's getting more complicated and self-harm like.


Nonetheless very interesting: would be great to include in missions... stirthepot

Do you think such events can be triggered by others? - Like: passing through 1000 altitude, coolant temp indicator drops out.
_________________________
My Il-2 CoD movie web site: www.flightsimvids.com

Top
Page 2 of 4 < 1 2 3 4 >
Topic Options
Rate This Topic
Hop to:

Moderator:  RacerGT 
 

Forum Use Agreement | Privacy Statement
Copyright 1997-2013, SimHQ Inc. All Rights Reserved.