solstice

Compute collected power and efficiencies of a solar plant
git clone git://git.meso-star.com/solstice.git
Log | Files | Refs | README | LICENSE

commit 49c064810e2be07d0f87677829521cb8380c85f1
parent e3973ad3dd9f2a3b7833ba43749945ad92a1c4d8
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date:   Thu, 27 Apr 2017 18:19:15 +0200

Merge branch 'develop' of gitlab.com:meso-star/solstice into develop

Diffstat:
Mdoc/cli | 26+++++++++-----------------
Msrc/solstice.c | 1+
Msrc/solstice.h | 1+
Msrc/solstice_draw.c | 3++-
Msrc/test_solstice_simulation.c | 2+-
5 files changed, 14 insertions(+), 19 deletions(-)

diff --git a/doc/cli b/doc/cli @@ -1,6 +1,5 @@ solstice -b # Output binary per receiver hits - -d <date-list>:<pos-on-earth> -D <sun-dir-list> -f # Force output overwrite -h # Short help and exit @@ -17,13 +16,7 @@ solstice solstice -r img=1280x720:pos=0,100,0:tgt=0,0,0:up=0,1,0:fov=70:spp=1 solstice -g format=obj:split-group=1 --d and -D are exclusive - -<date-list> ::= - <date> [ ... ] - -<date> ::= - year:month:day:minutes:seconds:timezone # <=> UNIX format +-g, -p and -r are exclusives <sun-dir-list> ::= <sun-dir>:[ ... ] @@ -38,8 +31,7 @@ solstice -g format=obj:split-group=1 <rendering-option>[:<rendering-option> ... ] <rendering-option> ::= - <fov> | <img> | <position> | <render-mode> | <samples-per-pixel> | <target> | <up> - + <fov> | <img> | <position> | <render-mode> | <samples-per-pixel> | <target> | <up> <dump> ::= format=<dump-format>[:split=<split-mode>] @@ -49,7 +41,7 @@ solstice -g format=obj:split-group=1 <dump-path-option> ::= <sun-ray-len> | <inf-ray-len> | default -<sun-ray-len> ::= +<sun-ray-len> ::= # Length of the ray starting from the sun srlen=REAL <inf-ray-len> ::= # Length of the rays going to infinite @@ -61,13 +53,13 @@ solstice -g format=obj:split-group=1 <split-mode> ::= geometry | object | none -<fov> ::= - fov=<real3> +<fov> ::= # Horizontal field of view in degree + fov=REAL -<img> ::= +<img> ::= # Image resolution img=INTEGERxINTEGER -<position> ::= +<position> ::= # Camera position pos=<real3> <render-mode> ::= @@ -79,10 +71,10 @@ solstice -g format=obj:split-group=1 <samples-per-pixel> ::= spp=<INTEGER> -<target> ::= +<target> ::= # Camera target tgt=<real3> -<up> ::= +<up> ::= # Camera up vector up=<real3> <real3> ::= diff --git a/src/solstice.c b/src/solstice.c @@ -625,6 +625,7 @@ solstice_init if(res != RES_OK) goto error; solstice->render_mode = args->render_mode; solstice->spp = args->img.spp; + d3_set(solstice->up, args->camera.up); } exit: diff --git a/src/solstice.h b/src/solstice.h @@ -104,6 +104,7 @@ struct solstice { struct ssol_camera* camera; struct ssol_image* framebuffer; enum solstice_args_render_mode render_mode; + double up[3]; unsigned spp; /* #Samples per pixel */ /* Dump geometry */ diff --git a/src/solstice_draw.c b/src/solstice_draw.c @@ -92,7 +92,8 @@ solstice_draw(struct solstice* solstice) break; case SOLSTICE_ARGS_RENDER_PATH_TRACING: res = ssol_draw_pt(solstice->scene, solstice->camera, layout.width, - layout.height, solstice->spp, ssol_image_write, solstice->framebuffer); + layout.height, solstice->spp, solstice->up, ssol_image_write, + solstice->framebuffer); break; default: FATAL("Unreachable code.\n"); } diff --git a/src/test_solstice_simulation.c b/src/test_solstice_simulation.c @@ -296,7 +296,7 @@ read_primary CHECK( sscanf(line, "%s %*u " - "%lg %*lu %lg " + "%lg %*u %lg " "%lg %lg\n", name, /* ID */ area, /* count, */ cos,