From 2c135535cb3e32c8d54e65025b5b5757be0e8fdb Mon Sep 17 00:00:00 2001 From: Chris Piker Date: Wed, 30 Oct 2024 17:44:21 -0500 Subject: [PATCH] Bug fix direction mapping and CSV output --- das2/vector.c | 2 +- utilities/das3_csv.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/das2/vector.c b/das2/vector.c index 34b5042..22b2534 100644 --- a/das2/vector.c +++ b/das2/vector.c @@ -278,7 +278,7 @@ DasErrCode das_geovec_values(das_geovec* pThis, double* pValues) /* Remap based on dirs, sure wish I had room to save this away */ int dirs[3] = {0}; for(int i = 0; i < pThis->ncomp; ++i) - dirs[i] = (pThis->dirs << i*2)&0x3; + dirs[i] = (pThis->dirs >> i*2)&0x3; switch(pThis->et){ case vtByte: diff --git a/utilities/das3_csv.c b/utilities/das3_csv.c index 4288913..7b7394d 100644 --- a/utilities/das3_csv.c +++ b/utilities/das3_csv.c @@ -322,7 +322,8 @@ void _prnVecLblHdr(const DasDim* pDim, const DasVar* pVar) DasVar_vecMap(pVar, &uDirs, aDirs); char psLabels[3][32] = {'\0'}; - int nLabels = das_makeCompLabels(pVar, (char**) psLabels, 32); + char* ptrs[3] = {&(psLabels[0][0]), &(psLabels[1][0]), &(psLabels[2][0]) }; + int nLabels = das_makeCompLabels(pVar, (char**) ptrs, 32); for(int i = 0; i < uDirs; ++i){ if(i > 0)