function jed_to_gps_test ( )

%*****************************************************************************80
%
%% JED_TO_GPS_TEST() tests JED_TO_GPS.
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    15 December 2017
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'JED_TO_GPS_TEST\n' );
  fprintf ( 1, '  JED_TO_GPS: JED -> GPS.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '   JED (in)       GPS                            JED (out)\n' );
  fprintf ( 1, '\n' );

  jed_epoch = epoch_to_jed_gps ( );

  i = 0;

  while ( true )

    i = i + 1;
    jed1 = jed_test ( i );

    if ( jed1 < 0.0 )
      break
    end

    if ( jed_epoch <= jed1 )

      [ c2, w2, sec2 ] = jed_to_gps ( jed1 );

      s2 = gps_to_s ( c2, w2, sec2 );

      jed3 = gps_to_jed ( c2, w2, sec2 );

      fprintf ( 1, '  %11.2f     %s  %11.2f\n', jed1, s2, jed3 );

    end

  end

  return
end
