Point3D aircraft = sgGeodToCart( Point3D(lon, lat, elev) );
Point3D station;
double d2;
- for ( unsigned int i = 1; i < stations.size(); ++i ) {
+ for ( unsigned int i = 0; i < stations.size(); ++i ) {
// cout << " testing " << current->get_locident() << endl;
station = Point3D(stations[i]->get_x(),
stations[i]->get_y(),
&reciprocal_bearing, &dummy, &dummy );
angle_to_beam_deg = fabs(reciprocal_bearing - s_ils_deg);
if ( angle_to_beam_deg <= best_angle ) {
- *ils = *stations[i];
+ ils = stations[i];
best_angle = angle_to_beam_deg;
}
}