#include <math.h>
+#include <errno.h>
#include <Include/fg_constants.h>
#include <Math/fg_geodesy.hxx>
r_alpha = x_alpha/cos(lat_geoc);
l_point = radius - r_alpha;
*alt = l_point*cos(delt_lambda);
+
+ // check for domain error
+ if ( errno == EDOM ) {
+ cout << "Domain ERROR in fgGeocToGeod!!!!\n";
+ *alt = 0.0;
+ }
+
denom = sqrt(1-EPS*EPS*sin_mu_a*sin_mu_a);
rho_alpha = EQUATORIAL_RADIUS_M*(1-EPS)/
(denom*denom*denom);
sin_lambda_sl = sin( lambda_sl );
*sea_level_r =
sqrt(RESQ_M / (1 + ((1/(E*E))-1)*sin_lambda_sl*sin_lambda_sl));
+
+ // check for domain error
+ if ( errno == EDOM ) {
+ cout << "Domain ERROR in fgGeocToGeod!!!!\n";
+ *sea_level_r = 0.0;
+ }
}
+
}
$Header$
$Log$
+Revision 1.3 1998/11/11 00:18:36 curt
+Check for domain error in fgGeoctoGeod()
+
Revision 1.2 1998/10/16 23:36:36 curt
c++-ifying.
// $Log$
+// Revision 1.3 1998/11/11 00:18:36 curt
+// Check for domain error in fgGeoctoGeod()
+//
// Revision 1.2 1998/10/16 23:36:36 curt
// c++-ifying.
//
inline ostream&
operator<< ( ostream& out, const Point3D& p )
{
- return out << p.n[PX] << ',' << p.n[PY] << ',' << p.n[PZ];
+ return out << p.n[PX] << ", " << p.n[PY] << ", " << p.n[PZ];
}
///////////////////////////
// $Log$
+// Revision 1.4 1998/11/11 00:18:38 curt
+// Check for domain error in fgGeoctoGeod()
+//
// Revision 1.3 1998/10/20 18:21:49 curt
// Tweaks from Bernie Bright.
//