PDA

View Full Version : Add APU in gauges written on Microsoft visual C++



Lynne
08-09-2010, 06:20 AM
Hi all

I am new to the forum and I think my approach is a little unusual, but I need your help. I do pilot not on Flight Simulator or else indeed. But my husband Yes. For this reason that I am interested and I help him in certain cases such as configuration, installation....

I want him to do a little surprise. I found in opensource software that unites gauges them ND, PFD and LearJet 45 default written in Microsoft Visual C++ EICAS. They are well. I would like to make changes to be more functional. I already have embezzled to add avionics as "PARKING BRAKE ON / OFF" and other messages.

My problem lies in the APU.
I said in "short"
I took the APURpm offset: 0x0B58
my line is the following: FSUIPC_Read (0x0B58, 4, & APURpm & dwResult);

FSUIPC_Process(&dwResult) APURpm must be a percentage and value max 100. I can't find how to formulate.
The APU is included in the EICAS like this:
glPushMatrix();
glTranslated(.75,-.75,0);
glScaled(.0012,.002,1);
glColor3d(0,1,0);
if(APURpm == -1)
sprintf(Text, "OFF");
else
sprintf(Text,"%.d",APUTemp);
glTranslated(-glutStrokeLength(GLUT_STROKE_MONO_ROMAN, (const unsigned char *)Text),0,0);
glutStrokeString(GLUT_STROKE_MONO_ROMAN, (const unsigned char *)Text);
glPopMatrix();

if(APURpm != -1)
{
glPushMatrix();
glTranslated(0,-.75,0);
glScaled(.0012,.002,1);
glColor3d(1,1,1);
glutStrokeString(GLUT_STROKE_MONO_ROMAN, (const unsigned char *)"%");
glEnd();
glPopMatrix();

glPushMatrix();
glTranslated(-.05,-.75,0);
glScaled(.0012,.002,1);
if(APURpm > 90)
glColor3d(1,1,0);
else
glColor3d(0,1,0);
sprintf(Text,"%.d",APURpm);
glTranslated(-glutStrokeLength(GLUT_STROKE_MONO_ROMAN, (const unsigned char *)Text),0,0);
glutStrokeString(GLUT_STROKE_MONO_ROMAN, (const unsigned char *)Text);
glPopMatrix();

glPushMatrix();
glTranslated(.8,-.75,0);
glScaled(.0012,.002,1);
glColor3d(1,1,1);
glutStrokeString(GLUT_STROKE_MONO_ROMAN, (const unsigned char *)" C");
glLineWidth(1);
glBegin(GL_LINE_LOOP);
Math.DrawArc(-160,100,30,0,360);
glEnd();
glLineWidth(2);
glPopMatrix();
}

I am using FS9 and FSX

I really need help.
Sorry for my english

Lyne

caKus
08-09-2010, 06:44 AM
Hello Lyne,

According to my doc, APU RMP offset is 0B54 (not B58 !). Perhaps it is the cause of your problem.

Cordialement.

Patrick.

Lynne
08-09-2010, 07:18 AM
Hello Patrick

Thanks for your answers. You're right the good offset in "...54".
But for using it, I am lost. The description is percent , 100=max. How can you write this indication ?

Tank you

Lynne

Adino
08-09-2010, 07:53 AM
Im not sure I understand what is being asked here but the simplest will be to convert whatever is coming from the offset for APURPM to percentage as the decription is saying, (something like * 100, if the value is a floating nr needed to be converted to %, or *.01 if the value is a percentage to be converted to a floating one)...but again I dont fully understand so excuse my two cent comment :)

Lynne
08-09-2010, 09:00 AM
I saw my error.
APURpm must be define in float and not in short. In Result :
FSUIPC_Process(&dwResult) => DataSource.Aircraft.APURpm = APURpm;

It's working now, but it's stay at 99 % at the end instead of 100 %.

Thanks

Lyne

Lynne
08-09-2010, 09:11 AM
4133 4134

Here are the EICAS.

It's working only with FSX

Lyne

Lynne
08-09-2010, 10:37 AM
I get it available free of charge as soon as I finish it

Adino
08-09-2010, 03:10 PM
Great, nice to know it worked out after all!

pdpo
08-09-2010, 04:12 PM
Hi Lyne,

are these Fs gauges or this is a standalone program?

es ce que ce sont des Fs gauges or c'est un programme seule.

Thanks , Merci
Peter Depoortere

Lynne
08-09-2010, 04:45 PM
Hi,

It's a standalone program. I hope I will finish as soon as possible.

Lyne

Lynne
08-09-2010, 04:48 PM
I just say that the software that I've checked out was abandoned in 2008. I will finish it with FMC, weather radar etc.... This is the same principle VAS but I'll do more complete with PFD, ND, EICAS and all that in standone (complete avionic system) and I will put at disposal free of charge within a few months.

Lyne

Lynne
08-10-2010, 04:35 AM
here is the EICAS with messages

Adino
08-10-2010, 08:14 AM
wow great progress so far, thx for sharing

twisted8
08-10-2010, 08:24 AM
looking great! your husband must be proud!

Lynne
08-14-2010, 04:10 AM
Thanks. Yes, he is.
I will post as soon as possible the new EICAS and ND.