vtsuperdarn / VTRST3.5

Radar Software Toolkit enhanced
0 stars 6 forks source link

Bugfix fitstat #14

Closed ksterne closed 8 years ago

ksterne commented 8 years ago

Noticed that the fitstat function was not working and would either seg fault or execute without giving the printout of the stats that it promises.

Here you'll see changes to 3 files, fitstat.c and two others. Most of the changes are removing unnecessary spaces. However, I also modified the rprm.c file to give a different return value if the prm pointer is null within RadarParmDecode(). This gives a little bit better of an error check as to which one is null.

In fitstat, the main problem is that the prm, fit pointers are initialized, but not "built" or filled in with objects. However adding: prm=RadarParmMake(); and fit=FitMake(); clears up the seg fault issue and things run normally. In this file, I also added an error output if the bmcnt isn't greater than zero. Before it would just exit.

The expected output is (and some test code):

~/$ fitstat -new 20160515.0402.00.bks.fitacf
20160515.0402.00.bks.fitacf:2016 05 15 04 02 00:2016 05 15 06 01 44 [33] (2220)

~/$ fitstat 2005101110g.fit
2005101110g.fit:2005 10 11 10 02 00:2005 10 11 12 01 47 [01] (960)

This will not work on the current code in the develop branch.

ksterne commented 8 years ago

@pasha-ponomarenko, @kkotyk,

I meant to go over this at some point during the workshop, but are either of you, or someone else out there able to go over this? It's fairly minor, but does get a function working correctly.

kkotyk commented 8 years ago

Hey Kevin

Im in Rankin right now but I can probably look into this when I get back.

On Jul 19, 2016 9:31 AM, "Kevin Sterne" notifications@github.com wrote:

@pasha-ponomarenko https://github.com/pasha-ponomarenko, @kkotyk https://github.com/kkotyk,

I meant to go over this at some point during the workshop, but are either of you, or someone else out there able to go over this? It's fairly minor, but does get a function working correctly.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/vtsuperdarn/VTRST3.5/pull/14#issuecomment-233651368, or mute the thread https://github.com/notifications/unsubscribe-auth/AGxtWr-lzDZ3jFcUZTTHbNv-Ejq91Cygks5qXN_SgaJpZM4Ifodi .