Initialize the timer countdown value since this could conceivably start as
any randomly large number (thus preventing the first station seach from happening at least for a very long time.)
This commit is contained in:
parent
0da1cc6de0
commit
e2875babad
2 changed files with 6 additions and 2 deletions
|
@ -46,7 +46,8 @@ FGMarkerBeacon::FGMarkerBeacon(SGPropertyNode *node) :
|
|||
middle_blink(false),
|
||||
inner_blink(false),
|
||||
name("marker-beacon"),
|
||||
num(0)
|
||||
num(0),
|
||||
_time_before_search_sec(0.0)
|
||||
{
|
||||
SGPath path( globals->get_fg_root() );
|
||||
SGPath term = path;
|
||||
|
|
|
@ -68,7 +68,8 @@ FGNavRadio::FGNavRadio(SGPropertyNode *node) :
|
|||
horiz_vel(0.0),
|
||||
last_x(0.0),
|
||||
name("nav"),
|
||||
num(0)
|
||||
num(0),
|
||||
_time_before_search_sec(0.0)
|
||||
{
|
||||
SGPath path( globals->get_fg_root() );
|
||||
SGPath term = path;
|
||||
|
@ -364,6 +365,8 @@ FGNavRadio::update(double dt)
|
|||
{
|
||||
station = Point3D( nav_x, nav_y, nav_z );
|
||||
nav_loc_dist = aircraft.distance3D( station );
|
||||
// cout << "station = " << station << " dist = " << nav_loc_dist
|
||||
// << endl;
|
||||
|
||||
if ( nav_has_gs ) {
|
||||
// find closest distance to the gs base line
|
||||
|
|
Loading…
Add table
Reference in a new issue