16     Utility::set_digits();
 
   17     const char* filenames[] = {
"wgs84.egm.cof", 
"grs80.egm.cof"};
 
   18     const char* ids[] = {
"WGS1984A", 
"GRS1980A"};
 
   19     for (
int grs80 = 0; grs80 < 2; ++grs80) {
 
   20       ofstream 
file(filenames[grs80], ios::binary);
 
   21       Utility::writearray<char, char, false>(
file, ids[grs80], 8);
 
   22       const int N = 20, 
M = 0,
 
   23         cnum = (
M + 1) * (2 * 
N - 
M + 2) / 2; 
 
   25       num[0] = 
N; num[1] = 
M;
 
   26       Utility::writearray<int, int, false>(
file, num);
 
   27       vector<Math::real> 
c(cnum, 0);
 
   29                                  NormalGravity::WGS84());
 
   30       for (
int n = 2; 
n <= 
N; 
n += 2)
 
   32       Utility::writearray<double, Math::real, false>(
file, 
c);
 
   34       Utility::writearray<int, int, false>(
file, num);
 
   37   catch (
const exception& 
e) {
 
   38     cerr << 
"Caught exception: " << 
e.what() << 
"\n";
 
   42     cerr << 
"Caught unknown exception\n";