fix another crash at the poles
This commit is contained in:
parent
6cadc2cf40
commit
7e8ee5a3a8
1 changed files with 5 additions and 6 deletions
|
@ -68,8 +68,7 @@ TACAN::~TACAN ()
|
|||
void
|
||||
TACAN::init ()
|
||||
{
|
||||
string branch;
|
||||
branch = "/instrumentation/" + _name;
|
||||
string branch = "/instrumentation/" + _name;
|
||||
|
||||
SGPropertyNode *node = fgGetNode(branch.c_str(), _num, true );
|
||||
|
||||
|
@ -159,10 +158,10 @@ TACAN::update (double delta_time_sec)
|
|||
double az2 = 0;
|
||||
double bearing = 0;
|
||||
double distance = 0;
|
||||
|
||||
geo_inverse_wgs_84(pos, _transmitter_pos,
|
||||
&bearing, &az2, &distance);
|
||||
|
||||
if (_transmitter_valid) {
|
||||
geo_inverse_wgs_84(pos, _transmitter_pos,
|
||||
&bearing, &az2, &distance);
|
||||
}
|
||||
|
||||
//select the nearer
|
||||
if ( mobile_distance <= distance && _mobile_valid) {
|
||||
|
|
Loading…
Add table
Reference in a new issue