Giter Club home page Giter Club logo

Comments (31)

dr-ni avatar dr-ni commented on July 29, 2024 1

Everything is fine. But why so many commits? Do you make edits through the WEB-face?

I'm working from different locations - also sometimes over web UI

cppcheck -v -f . 2>cppcheck.err
splint *.c > splint.log

were these ok?

I prefere using valgrind.
e.g.
valgrind ./helmparms3d examples/testpoints_src.txt examples/testpoints_dest.txt examples/testpoints_params.txt
valgrind ./helmert3d examples/testpoints_src.txt examples/testpoints_params.txt
that was ok so far

uwe@rp4-sams:~/helmparms3d$ valgrind ./helmparms3d examples/testpoints_src.txt examples/testpoints_dest.txt examples/testpoints_params.txt
==2110== Memcheck, a memory error detector
==2110== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==2110== Using Valgrind-3.16.1 and LibVEX; rerun with -h for copyright info
==2110== Command: ./helmparms3d examples/testpoints_src.txt examples/testpoints_dest.txt examples/testpoints_params.txt
==2110== 

examples/testpoints_src.txt:
4157222.5430000001 664789.3070000000 4774952.0990000004 
4149043.3360000001 688836.4430000000 4778632.1880000001 
4172803.5109999999 690340.0780000000 4758129.7010000004 
4177148.3760000002 642997.6350000000 4760764.7999999998 
4137012.1899999999 671808.0290000000 4791128.2149999999 
4146292.7289999998 666952.8870000000 4783859.8559999997 
4138759.9019999998 702670.7380000000 4785552.1960000005 

examples/testpoints_dest.txt:
4157870.2370000002 664818.6780000000 4775416.5240000002 
4149691.0490000001 688865.7850000000 4779096.5880000005 
4173451.3539999998 690369.3750000000 4758594.0750000002 
4177796.0639999998 643026.7000000000 4761228.8990000002 
4137659.5490000001 671837.3370000001 4791592.5310000004 
4146940.2280000001 666982.1510000000 4784324.0990000004 
4139407.5060000001 702700.2270000000 4786016.6449999996 

R =
1.0000000000 0.0000048146 -0.0000043328 
-0.0000048146 1.0000000000 -0.0000048409 
0.0000043327 0.0000048409 1.0000000000 

T =
641.8804120357 68.6553412730 416.3981803656 

s = 1.0000055825 (= 0.0000055825 ppm)

...done
==2110== 
==2110== HEAP SUMMARY:
==2110==     in use at exit: 0 bytes in 0 blocks
==2110==   total heap usage: 119 allocs, 119 frees, 65,520 bytes allocated
==2110== 
==2110== All heap blocks were freed -- no leaks are possible
==2110== 
==2110== For lists of detected and suppressed errors, rerun with: -s
==2110== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
uwe@rp4-sams:~/helmparms3d$ valgrind --leak-check=full --show-leak-kinds=all  ./helmert3d examples/testpoints_src.txt examples/testpoints_params.txt
==2565== Memcheck, a memory error detector
==2565== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==2565== Using Valgrind-3.16.1 and LibVEX; rerun with -h for copyright info
==2565== Command: ./helmert3d examples/testpoints_src.txt examples/testpoints_params.txt
==2565== 

found 7 points
reading helmert parameters...
1.000000 0.000005 -0.000004
-0.000005 1.000000 -0.000005
0.000004 0.000005 1.000000
641.880412 68.655341 416.398180
1.000006
...done
starting transformation...
...done
Results written to transformed.xyz
==2565== 
==2565== HEAP SUMMARY:
==2565==     in use at exit: 0 bytes in 0 blocks
==2565==   total heap usage: 9 allocs, 9 frees, 19,296 bytes allocated
==2565== 
==2565== All heap blocks were freed -- no leaks are possible
==2565== 
==2565== For lists of detected and suppressed errors, rerun with: -s
==2565== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

from helmert3d.

zvezdochiot avatar zvezdochiot commented on July 29, 2024 1

@dr-ni say:

716e5df

helmert3d-master>make
gcc -Wall -O2 -o helmert3d src/helmert3d.c -lm
gcc -Wall -O2 -o helmparms3d src/helmparms3d.c src/svdm.c -lm

Win10, gcc 32bits

>gcc --version
gcc (GCC) 10.1.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

from helmert3d.

dr-ni avatar dr-ni commented on July 29, 2024

I have made some changes again. Can you check if all is fine?

from helmert3d.

zvezdochiot avatar zvezdochiot commented on July 29, 2024

@dr-ni say:

Can you check if all is fine?

Everything is fine. But why so many commits? Do you make edits through the WEB-face?

See also:

  • cppcheck -v -f . 2>cppcheck.err
  • splint *.c > splint.log

from helmert3d.

zvezdochiot avatar zvezdochiot commented on July 29, 2024

@dr-ni say:

I prefere using valgrind.

Valgrind helps to catch leaks, but does not say anything about incorrect comparisons and type mismatches.

PS: Use markdown for code. See https://docs.github.com/en/free-pro-team@latest/github/writing-on-github/basic-writing-and-formatting-syntax#quoting-code

from helmert3d.

dr-ni avatar dr-ni commented on July 29, 2024

my experiance is that valgrind complains also most of incorrect comparisons and type mismatches

did you do your proposed tests?

maybe pull again

from helmert3d.

zvezdochiot avatar zvezdochiot commented on July 29, 2024

@dr-ni say:

did you do your proposed tests?

Cppcheck is rude and only finds obvious bloopers. The log is empty.

Splint is very picky and has issued a lot of matrix operator warnings. I did not delve into it. But he is very picky and most of the warnings can be ignored. Now I can't make a log, only tomorrow.

from helmert3d.

dr-ni avatar dr-ni commented on July 29, 2024

ok

I have renamed the project, since its much more clear what its doing...

from helmert3d.

zvezdochiot avatar zvezdochiot commented on July 29, 2024

Hi @dr-ni .

Current commit: d4c79c1

$ cd src
$ splint *.c > splint.log
Splint 3.1.2 --- 20 Feb 2009

Finished checking --- 126 code warnings

See splint.log:
splint.log

from helmert3d.

dr-ni avatar dr-ni commented on July 29, 2024

Hi zvezdochiot,
I'll go through the log later.

of course you can rebase all untill yesterday under "cleanup and improved error handling"

from helmert3d.

zvezdochiot avatar zvezdochiot commented on July 29, 2024

@dr-ni say:

of course you can rebase all untill yesterday

This will change little, the warnings will be the same. Splint is very picky. I ignore most of his warnings.

from helmert3d.

dr-ni avatar dr-ni commented on July 29, 2024

I have now made most of all splint fixes, can you check if all is ok for you?

If all is good - may be you can make some packages for win32 win64 osx-dmg deb-i386 rpm?
I can make one for deb-armhf and deb-amd64.

...then we can include it to the release

from helmert3d.

zvezdochiot avatar zvezdochiot commented on July 29, 2024

Hi @dr-ni .

Current commit: 970fc71

! ⚠️ !

$ ./helmparms3d examples/testpoints_src.txt examples/testpoints_dest.txt examples/testpoints_prms.txt 

See stdout:
stdout.txt

$ splint *.c > splint.log
Splint 3.1.2 --- 20 Feb 2009

Finished checking --- 18 code warnings

See splint.log:
splint.log

$ cppcheck -v -f . 2>cppcheck.err

cppcheck.err:

svdm.c:50:37: error: Invalid calloc() argument nr 1. The value is 0 but the valid values are '1:'. [invalidFunctionArg]
    double     *r = (double*)calloc(0, sizeof(double)*(size_t)n);

from helmert3d.

dr-ni avatar dr-ni commented on July 29, 2024

again some changes, can you check again?

from helmert3d.

zvezdochiot avatar zvezdochiot commented on July 29, 2024

Hi @dr-ni .

Current commit: 7f136f0

$ splint *.c *.h > splint.log
Splint 3.1.2 --- 20 Feb 2009

Finished checking --- 16 code warnings

See splint.log:
splint.log

from helmert3d.

dr-ni avatar dr-ni commented on July 29, 2024

and cppcheck -v -f .:

Checking helmert3d.c ...
Defines:
Undefines:
Includes:
Platform:Native
1/3 files checked 20% done
Checking helmparms3d.c ...
Defines:
Undefines:
Includes:
Platform:Native
2/3 files checked 66% done
Checking svdm.c ...
Defines:
Undefines:
Includes:
Platform:Native
3/3 files checked 100% done

may be you can make some packages for win32 win64 osx-dmg deb-i386 rpm?
I can make one for deb-armhf and deb-amd64...

from helmert3d.

zvezdochiot avatar zvezdochiot commented on July 29, 2024

Hi @dr-ni .

Make release 1.0.0. I'll add win32 and deb-i386 to it.

from helmert3d.

dr-ni avatar dr-ni commented on July 29, 2024

ok

from helmert3d.

dr-ni avatar dr-ni commented on July 29, 2024

have fond an inconsistent path in your deb:

in Makefile and man the examples are in /usr/local/share/helmparms3d
in your deb /usr/share/doc/helmparms3d/examples

shall we change the release or the deb?

from helmert3d.

zvezdochiot avatar zvezdochiot commented on July 29, 2024

Hi @dr-ni .

I used the standard paths scheme for packager. Later I will bring it into line with man or make symlinks.

PS: This is just one of the problems with using absolute paths. Therefore, I did not use them.

from helmert3d.

dr-ni avatar dr-ni commented on July 29, 2024

the best solution would be using autogen autoconf automake etc...
but I have not so much experience with that

from helmert3d.

zvezdochiot avatar zvezdochiot commented on July 29, 2024

@dr-ni say:

the best solution would be using autogen autoconf automake etc...

Nonsense! Under Win even the simplest thing is tortured to collect. For such utilities, the Makefile is more than sufficient.

from helmert3d.

dr-ni avatar dr-ni commented on July 29, 2024

ok I like also clear Makefiles much more, however - we cannot prepare a Makefile for all systems.

I cannot run the win32 bins in wine. How did you bild them?
ther is also an issue while checking on

https://www.virustotal.com/gui/file/a8df9c7566afc1aa00569e9ea5c052567117f2a8536a85c70be850b70bfa82ea/detection

https://www.virustotal.com/gui/file/6f2bb9a7bf857b6ce1a3dbab918372d190e10f4328381cd4bf83e4b8e00dfec7/detection

from helmert3d.

zvezdochiot avatar zvezdochiot commented on July 29, 2024

@dr-ni say:

I cannot run the win32 bins in wine. How did you bild them?

Due to problems with web-face github.com, I have one Win10 machine.

Bkav

He even finds something that is not there. And this is due to the incorrect fprintf under Win.

helmert3d-1.0.0-win32>make
gcc -Wall -O2 -o helmert3d src/helmert3d.c -lm
src/helmert3d.c: In function 'main':
src/helmert3d.c:90:28: warning: unknown conversion type character 'z' in format [-Wformat=]
   90 |     fprintf(stdout,"Found %zu points\n",l);
      |                            ^
src/helmert3d.c:90:20: warning: too many arguments for format [-Wformat-extra-args]
   90 |     fprintf(stdout,"Found %zu points\n",l);
      |                    ^~~~~~~~~~~~~~~~~~~~
src/helmert3d.c:90:28: warning: unknown conversion type character 'z' in format [-Wformat=]
   90 |     fprintf(stdout,"Found %zu points\n",l);
      |                            ^
src/helmert3d.c:90:20: warning: too many arguments for format [-Wformat-extra-args]
   90 |     fprintf(stdout,"Found %zu points\n",l);
      |                    ^~~~~~~~~~~~~~~~~~~~
gcc -Wall -O2 -o helmparms3d src/helmparms3d.c src/svdm.c -lm

from helmert3d.

dr-ni avatar dr-ni commented on July 29, 2024

have made a new asset using mingw, however even worse fond now 11 issues
but included also man pdf
do you think %zu changing to %lu helps?
are exe files running?


$ wine helmert3d.exe testpoints_src.txt pa 
Invalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 key
*******************************
*      helmert3d v1.0.0       *
*   (c) U. Niethammer 2020    *
*******************************
Reading points...
Found zu points
Reading helmert parameters...
1.000000 0.000005 -0.000004
-0.000005 1.000000 -0.000005
0.000004 0.000005 1.000000
641.880425 68.655345 416.398185
1.000006
...done
Starting transformation...
...done
Results written to transformed.xyz
$ wine helmert3d.exe testpoints_src.txt pa 
Invalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 key
*******************************
*      helmert3d v1.0.0       *
*   (c) U. Niethammer 2020    *
*******************************
Reading points...
Found 7 points
Reading helmert parameters...
1.000000 0.000005 -0.000004
-0.000005 1.000000 -0.000005
0.000004 0.000005 1.000000
641.880425 68.655345 416.398185
1.000006
...done
Starting transformation...
...done
Results written to transformed.xyz

%lu did help for mingw exe

is comitted...
can you make again win32 with man pdf's?

from helmert3d.

zvezdochiot avatar zvezdochiot commented on July 29, 2024

@dr-ni say:

can you make again win32 with man pdf's?

❓ What for?

from helmert3d.

dr-ni avatar dr-ni commented on July 29, 2024

a correct working helmert3d...

from helmert3d.

zvezdochiot avatar zvezdochiot commented on July 29, 2024

@dr-ni say:

a correct working helmert3d...

And what was wrong in the commit (92007b4)? Has the result changed?

PS: I don't take part in flea catching. Who needs it?

from helmert3d.

dr-ni avatar dr-ni commented on July 29, 2024

pdfs are already in the new win32 asset


%zu was wrong


716e5df

from helmert3d.

dr-ni avatar dr-ni commented on July 29, 2024

still the same exe in your upload?

$ wine helmert3d.exe testpoints_src.txt pa 
Invalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 key
Reading points...
Found zu points
Reading helmert parameters...
1.000000 0.000005 -0.000004
-0.000005 1.000000 -0.000005
0.000004 0.000005 1.000000
641.880425 68.655345 416.398185
1.000006
...done
Starting transformation...
...done
Results written to transformed.xyz

from helmert3d.

zvezdochiot avatar zvezdochiot commented on July 29, 2024

@dr-ni say:

still the same exe in your upload?

https://github.com/dr-ni/helmert3d/releases/download/v1.0.0/helmert3d-1.0.0-win32.zip

PS: You do not need PDFs, but a link to open the console in the desired folder (the most common question for console tools: How to start them?)

from helmert3d.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.