Feature #1152

Add dat shortcut flag to mgd77list -F

Added by Mike 2 months ago. Updated about 1 month ago.

Status:ResolvedStart date:2017-09-18
Priority:LowDue date:
Assignee:Paul% Done:


Target version:-


In mgd77list, the -F option can currently output mgd77, mgd77t, geo, all, allt, and lots of others combinations of fields. It would be useful to add dat as another shortcut flag. For the purpose of building archive files, I think the dat format (aka, plain table format in mgd77convert's manpage) is most convenient.

15010076.mgd77 - test mgd77 file (201 KB) Mike, 2017-10-16 16:41

Associated revisions

Revision 19061
Added by Paul about 1 month ago

Address issue #1152


#1 Updated by Paul about 1 month ago

Perhaps you can remind me what those fields might be? We just need to set a statement like below (this is for all) and a few lines of code:

#define MGD77T_ALL "id,time,lat,lon,ptc,nqc,twt,depth,bcc,btc,bqc,mtf1,mtf2,mag,msens,diur,msd,mqc,gobs,eot,faa,gqc,sln,sspn" 

#2 Updated by Mike about 1 month ago

Here's the header row from a dat file:

#rec TZ year month day hour min.xxx lat lon ptc twt depth bcc btc mtf1 mtf2 mag msens diur msd gobs eot faa nqc id sln sspn

It seems to be all 27 mgd77 fields but tab delimited and with room for more decimal places than mgd77.

#3 Updated by Mike about 1 month ago

rec is data record type and should be 5 according to the mgd77 specification.

DATA RECORD TYPE Set to "5" (data record.)

#4 Updated by Paul about 1 month ago

  • Status changed from New to Resolved

Implemented in the testing pw branch which eventually will be reintegrated to trunk.

#5 Updated by Paul about 1 month ago

  • Assignee set to Paul
  • % Done changed from 0 to 100

Now reintegrated into GMT 6 trunk.

#6 Updated by Mike about 1 month ago

mgd77list is now crashing. I can make a new bug report if you want...

% mgd77list 15010076
ERROR: Caught signal number 11 (Segmentation fault) at
0 libgmt.6.dylib 0x00000001005a9f1c gmtlib_write_textrecord + 28
1 ? 0x0000000000000000 0x0 + 0
Stack backtrace:
0 libgmt.6.dylib 0x0000000100541a49 sig_handler + 569
1 libsystem_platform.dylib 0x00007fff65b4bf5a _sigtramp + 26
2 ?
0x0000000103abc292 0x0 + 4356555410
3 libgmt.6.dylib 0x000000010057077c api_put_record_fp + 300
4 supplements.so 0x0000000106471350 GMT_mgd77list + 26032
5 libgmt.6.dylib 0x000000010055ad17 GMT_Call_Module + 567
6 mgd77list 0x0000000100537fb9 main + 1017
7 libdyld.dylib 0x00007fff658cb145 start + 1

#7 Updated by Mike about 1 month ago

% mgd77list --version

Also available in: Atom PDF