1
0
Fork 0

New updates from Charlie Hotchkiss.

This commit is contained in:
curt 1998-05-16 13:04:13 +00:00
parent c57071acfd
commit 1bfa13e003
3 changed files with 75 additions and 14 deletions

View file

@ -61,6 +61,53 @@ static pCockpit ac_cockpit;
// They should eventually be member functions of the aircraft.
//
double get_latitude( void )
{
fgFLIGHT *f;
f = current_aircraft.flight;
// return( toDM(FG_Latitude * RAD_TO_DEG) );
return((double)((int)( FG_Latitude * RAD_TO_DEG)) );
}
double get_lat_min( void )
{
fgFLIGHT *f;
double a, d;
f = current_aircraft.flight;
a = FG_Latitude * RAD_TO_DEG;
if (a < 0.0) {
a = -a;
}
d = (double) ( (int) a);
return( (a - d) * 60.0);
}
double get_longitude( void )
{
fgFLIGHT *f;
f = current_aircraft.flight;
// return( toDM(FG_Longitude * RAD_TO_DEG) );
return((double)((int) (FG_Longitude * RAD_TO_DEG)) );
}
double get_long_min( void )
{
fgFLIGHT *f;
double a, d;
f = current_aircraft.flight;
a = FG_Longitude * RAD_TO_DEG;
if (a < 0.0) {
a = -a;
}
d = (double) ( (int) a);
return( (a - d) * 60.0);
}
double get_throttleval( void )
{
fgCONTROLS *pcontrols;
@ -217,9 +264,12 @@ void fgCockpitUpdate( void )
}
/* $Log$
/* Revision 1.6 1998/05/13 18:27:53 curt
/* Added an fov to hud display.
/* Revision 1.7 1998/05/16 13:04:13 curt
/* New updates from Charlie Hotchkiss.
/*
* Revision 1.6 1998/05/13 18:27:53 curt
* Added an fov to hud display.
*
* Revision 1.5 1998/05/11 18:13:10 curt
* Complete C++ rewrite of all cockpit code by Charlie Hotchkiss.
*

View file

@ -1301,8 +1301,8 @@ void HudLadder :: draw( void )
roll_value = current_ch2();
pitch_value = current_ch1() * RAD_TO_DEG;
vmin = (int)pitch_value - (double)width_units/2.0;
vmax = (int)pitch_value + (double)width_units/2.0;
vmin = (int)(pitch_value - (double)width_units/2.0);
vmax = (int)(pitch_value + (double)width_units/2.0);
scr_min = box.bottom; // centroid.y - ((box.top - box.bottom) >> 1);
// scr_max = box.top; // scr_min + (box.top - box.bottom);
@ -1689,7 +1689,7 @@ int fgHUDInit( fgAIRCRAFT * /* current_aircraft */ )
HIptr = (instr_item *) new instr_label ( loc,
get_sideslip,
"%5.2f",
"Sideslip",
"Sideslip ",
NULL,
ReadTOP,
RIGHT_JUST,
@ -1702,10 +1702,10 @@ int fgHUDInit( fgAIRCRAFT * /* current_aircraft */ )
loc.left = 440;
loc.top = 90; // Ignore
loc.right = 440; // Ignore
loc.bottom = 100;
loc.bottom = 90;
HIptr = (instr_item *) new instr_label( loc, get_throttleval,
"%5.2f",
"Throttle",
"%.2f",
"Throttle ",
NULL,
ReadTOP,
RIGHT_JUST,
@ -1718,7 +1718,7 @@ int fgHUDInit( fgAIRCRAFT * /* current_aircraft */ )
loc.left = 440;
loc.top = 70; // Ignore
loc.right = 500; // Ignore
loc.bottom = 85;
loc.bottom = 75;
HIptr = (instr_item *) new instr_label( loc, get_elevatorval,
"%5.2f",
"Elevator",
@ -1899,9 +1899,12 @@ void fgUpdateHUD( void ) {
}
/* $Log$
/* Revision 1.8 1998/05/13 18:27:54 curt
/* Added an fov to hud display.
/* Revision 1.9 1998/05/16 13:04:14 curt
/* New updates from Charlie Hotchkiss.
/*
* Revision 1.8 1998/05/13 18:27:54 curt
* Added an fov to hud display.
*
* Revision 1.7 1998/05/11 18:13:11 curt
* Complete C++ rewrite of all cockpit code by Charlie Hotchkiss.
*

View file

@ -144,6 +144,10 @@ extern double get_heading ( void );
extern double get_altitude ( void );
extern double get_sideslip ( void );
extern double get_frame_rate ( void );
extern double get_latitude ( void );
extern double get_lat_min ( void );
extern double get_longitude ( void );
extern double get_long_min ( void );
extern double get_fov ( void );
enum hudinstype{ HUDno_instr,
@ -205,7 +209,8 @@ class instr_item { // An Abstract Base Class (ABC)
};
typedef instr_item *HIptr;
extern deque< instr_item *> HUD_deque;
extern deque< instr_item * > HUD_deque;
// instr_item This class has no other purpose than to maintain
// a linked list of instrument and derived class
@ -440,9 +445,12 @@ void fgHUDSetTimeMode( Hptr hud, int time_of_day );
#endif // _HUD_H
/* $Log$
/* Revision 1.3 1998/05/13 18:27:55 curt
/* Added an fov to hud display.
/* Revision 1.4 1998/05/16 13:04:15 curt
/* New updates from Charlie Hotchkiss.
/*
* Revision 1.3 1998/05/13 18:27:55 curt
* Added an fov to hud display.
*
* Revision 1.2 1998/05/11 18:13:12 curt
* Complete C++ rewrite of all cockpit code by Charlie Hotchkiss.
*