1
0
Fork 0

Do a santity check in case net->course_deviation_deg is bogus.

This commit is contained in:
curt 2003-07-25 20:10:09 +00:00
parent c5110a3650
commit ae1470d3d1
2 changed files with 7 additions and 1 deletions

View file

@ -169,6 +169,12 @@ void FGProps2NetGUI( FGNetGUI *net ) {
net->course_deviation_deg
= current_radiostack->get_navcom1()->get_nav_reciprocal_radial()
- current_radiostack->get_navcom1()->get_nav_target_radial();
if ( net->course_deviation_deg < -1000.0
|| net->course_deviation_deg > 1000.0 )
{
// Sanity check ...
net->course_deviation_deg = 0.0;
}
while ( net->course_deviation_deg > 180.0 ) {
net->course_deviation_deg -= 360.0;
}

View file

@ -112,7 +112,7 @@ public:
// Environment
time_t cur_time; // current unix time
long int warp; // offset in seconds to unix time
float visibility; // visibility in meters (for env. effects)
float visibility; // visibility in meters (for env. effects)
// Control surface positions (normalized values)
float elevator;