New updates from Charlie Hotchkiss.
This commit is contained in:
parent
c57071acfd
commit
1bfa13e003
3 changed files with 75 additions and 14 deletions
|
@ -61,6 +61,53 @@ static pCockpit ac_cockpit;
|
||||||
// They should eventually be member functions of the aircraft.
|
// 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 )
|
double get_throttleval( void )
|
||||||
{
|
{
|
||||||
fgCONTROLS *pcontrols;
|
fgCONTROLS *pcontrols;
|
||||||
|
@ -217,9 +264,12 @@ void fgCockpitUpdate( void )
|
||||||
}
|
}
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.6 1998/05/13 18:27:53 curt
|
/* Revision 1.7 1998/05/16 13:04:13 curt
|
||||||
/* Added an fov to hud display.
|
/* 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
|
* Revision 1.5 1998/05/11 18:13:10 curt
|
||||||
* Complete C++ rewrite of all cockpit code by Charlie Hotchkiss.
|
* Complete C++ rewrite of all cockpit code by Charlie Hotchkiss.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1301,8 +1301,8 @@ void HudLadder :: draw( void )
|
||||||
roll_value = current_ch2();
|
roll_value = current_ch2();
|
||||||
pitch_value = current_ch1() * RAD_TO_DEG;
|
pitch_value = current_ch1() * RAD_TO_DEG;
|
||||||
|
|
||||||
vmin = (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;
|
vmax = (int)(pitch_value + (double)width_units/2.0);
|
||||||
|
|
||||||
scr_min = box.bottom; // centroid.y - ((box.top - box.bottom) >> 1);
|
scr_min = box.bottom; // centroid.y - ((box.top - box.bottom) >> 1);
|
||||||
// scr_max = box.top; // scr_min + (box.top - box.bottom);
|
// scr_max = box.top; // scr_min + (box.top - box.bottom);
|
||||||
|
@ -1702,9 +1702,9 @@ int fgHUDInit( fgAIRCRAFT * /* current_aircraft */ )
|
||||||
loc.left = 440;
|
loc.left = 440;
|
||||||
loc.top = 90; // Ignore
|
loc.top = 90; // Ignore
|
||||||
loc.right = 440; // Ignore
|
loc.right = 440; // Ignore
|
||||||
loc.bottom = 100;
|
loc.bottom = 90;
|
||||||
HIptr = (instr_item *) new instr_label( loc, get_throttleval,
|
HIptr = (instr_item *) new instr_label( loc, get_throttleval,
|
||||||
"%5.2f",
|
"%.2f",
|
||||||
"Throttle ",
|
"Throttle ",
|
||||||
NULL,
|
NULL,
|
||||||
ReadTOP,
|
ReadTOP,
|
||||||
|
@ -1718,7 +1718,7 @@ int fgHUDInit( fgAIRCRAFT * /* current_aircraft */ )
|
||||||
loc.left = 440;
|
loc.left = 440;
|
||||||
loc.top = 70; // Ignore
|
loc.top = 70; // Ignore
|
||||||
loc.right = 500; // Ignore
|
loc.right = 500; // Ignore
|
||||||
loc.bottom = 85;
|
loc.bottom = 75;
|
||||||
HIptr = (instr_item *) new instr_label( loc, get_elevatorval,
|
HIptr = (instr_item *) new instr_label( loc, get_elevatorval,
|
||||||
"%5.2f",
|
"%5.2f",
|
||||||
"Elevator",
|
"Elevator",
|
||||||
|
@ -1899,9 +1899,12 @@ void fgUpdateHUD( void ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.8 1998/05/13 18:27:54 curt
|
/* Revision 1.9 1998/05/16 13:04:14 curt
|
||||||
/* Added an fov to hud display.
|
/* 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
|
* Revision 1.7 1998/05/11 18:13:11 curt
|
||||||
* Complete C++ rewrite of all cockpit code by Charlie Hotchkiss.
|
* Complete C++ rewrite of all cockpit code by Charlie Hotchkiss.
|
||||||
*
|
*
|
||||||
|
|
|
@ -144,6 +144,10 @@ extern double get_heading ( void );
|
||||||
extern double get_altitude ( void );
|
extern double get_altitude ( void );
|
||||||
extern double get_sideslip ( void );
|
extern double get_sideslip ( void );
|
||||||
extern double get_frame_rate ( 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 );
|
extern double get_fov ( void );
|
||||||
|
|
||||||
enum hudinstype{ HUDno_instr,
|
enum hudinstype{ HUDno_instr,
|
||||||
|
@ -205,6 +209,7 @@ class instr_item { // An Abstract Base Class (ABC)
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef instr_item *HIptr;
|
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
|
// instr_item This class has no other purpose than to maintain
|
||||||
|
@ -440,9 +445,12 @@ void fgHUDSetTimeMode( Hptr hud, int time_of_day );
|
||||||
#endif // _HUD_H
|
#endif // _HUD_H
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.3 1998/05/13 18:27:55 curt
|
/* Revision 1.4 1998/05/16 13:04:15 curt
|
||||||
/* Added an fov to hud display.
|
/* 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
|
* Revision 1.2 1998/05/11 18:13:12 curt
|
||||||
* Complete C++ rewrite of all cockpit code by Charlie Hotchkiss.
|
* Complete C++ rewrite of all cockpit code by Charlie Hotchkiss.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue