diff --git a/src/FDM/groundcache.cxx b/src/FDM/groundcache.cxx index 683bb27d1..c6f5cf869 100644 --- a/src/FDM/groundcache.cxx +++ b/src/FDM/groundcache.cxx @@ -37,6 +37,22 @@ #include "flight.hxx" #include "groundcache.hxx" +FGGroundCache::FGGroundCache() +{ + sgdSetVec3(cache_center, 0.0, 0.0, 0.0); + ground_radius = 0.0; + cache_ref_time = 0.0; + wire_id = 0; + sgdSetVec3(reference_wgs84_point, 0.0, 0.0, 0.0); + reference_vehicle_radius = 0.0; + found_ground = false; +} + +FGGroundCache::~FGGroundCache() +{ + cache_root.removeAllKids(); +} + FGGroundCache::GroundProperty* FGGroundCache::extractGroundProperty( ssgLeaf* l ) { diff --git a/src/FDM/groundcache.hxx b/src/FDM/groundcache.hxx index be4293db5..9568129b4 100644 --- a/src/FDM/groundcache.hxx +++ b/src/FDM/groundcache.hxx @@ -30,6 +30,9 @@ class FGGroundCache { public: + FGGroundCache(); + ~FGGroundCache(); + ////////////////////////////////////////////////////////////////////////// // Ground handling routines //////////////////////////////////////////////////////////////////////////