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 c29a8e055fe97ceffac831bc6e41a88d3de92bf9
parent 807bff9644aa0f52d841710bffc1a15c69df57ac
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date:   Fri,  6 Jan 2017 17:20:46 +0100

Fix deg VS rad mismatch in solstice args test.

Diffstat:
Msrc/test_solstice_args.c | 22+++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/test_solstice_args.c b/src/test_solstice_args.c @@ -168,29 +168,29 @@ test_sun_dirs(void) CHECK(solstice_args_init(&args, cmd_size(cmd), cmd), RES_OK); CHECK(args.nsun_dirs, 1); CHECK(args.sun_dirs[0].azimuth, 0); - CHECK(args.sun_dirs[0].elevation, 1); + CHECK(args.sun_dirs[0].elevation, MDEG2RAD(1)); solstice_args_release(&args); cmd_delete(cmd); cmd = cmd_create(0, "test", "-D", "1.2,3.4:3.14,0.123:", RES_OK); CHECK(solstice_args_init(&args, cmd_size(cmd), cmd), RES_OK); CHECK(args.nsun_dirs, 2); - CHECK(args.sun_dirs[0].azimuth, 1.2); - CHECK(args.sun_dirs[0].elevation, 3.4); - CHECK(args.sun_dirs[1].azimuth, 3.14); - CHECK(args.sun_dirs[1].elevation, 0.123); + CHECK(args.sun_dirs[0].azimuth, MDEG2RAD(1.2)); + CHECK(args.sun_dirs[0].elevation, MDEG2RAD(3.4)); + CHECK(args.sun_dirs[1].azimuth, MDEG2RAD(3.14)); + CHECK(args.sun_dirs[1].elevation, MDEG2RAD(0.123)); solstice_args_release(&args); cmd_delete(cmd); cmd = cmd_create(0, "test", "-D", "1.2,3.4:3.14,0.123:2.01,23.1", RES_OK); CHECK(solstice_args_init(&args, cmd_size(cmd), cmd), RES_OK); CHECK(args.nsun_dirs, 3); - CHECK(args.sun_dirs[0].azimuth, 1.2); - CHECK(args.sun_dirs[0].elevation, 3.4); - CHECK(args.sun_dirs[1].azimuth, 3.14); - CHECK(args.sun_dirs[1].elevation, 0.123); - CHECK(args.sun_dirs[2].azimuth, 2.01); - CHECK(args.sun_dirs[2].elevation, 23.1); + CHECK(args.sun_dirs[0].azimuth, MDEG2RAD(1.2)); + CHECK(args.sun_dirs[0].elevation, MDEG2RAD(3.4)); + CHECK(args.sun_dirs[1].azimuth, MDEG2RAD(3.14)); + CHECK(args.sun_dirs[1].elevation, MDEG2RAD(0.123)); + CHECK(args.sun_dirs[2].azimuth, MDEG2RAD(2.01)); + CHECK(args.sun_dirs[2].elevation, MDEG2RAD(23.1)); solstice_args_release(&args); cmd_delete(cmd);