github.com/archlabjp/eeslism-go@v0.0.0-20231109122333-4bb7bfcdf292/eeslism/CINC.go (about)

     1  //This file is part of EESLISM.
     2  //
     3  //Foobar is free software : you can redistribute itand /or modify
     4  //it under the terms of the GNU General Public License as published by
     5  //the Free Software Foundation, either version 3 of the License, or
     6  //(at your option) any later version.
     7  //
     8  //Foobar is distributed in the hope that it will be useful,
     9  //but WITHOUT ANY WARRANTY; without even the implied warranty of
    10  //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
    11  //GNU General Public License for more details.
    12  //
    13  //You should have received a copy of the GNU General Public License
    14  //along with Foobar.If not, see < https://www.gnu.org/licenses/>.
    15  
    16  package eeslism
    17  
    18  import "math"
    19  
    20  ///*
    21  //
    22  //						   壁面に対する入射日射角度
    23  //						   FILE=CINC.c
    24  //						   Create Date=1999.6.7
    25  //						   */
    26  
    27  func CINC(op P_MENN, ls, ms, ns float64, co *float64) {
    28  	Wz := math.Cos(op.wb * math.Pi / 180)
    29  	Ww := -math.Sin(op.wb*math.Pi/180) * math.Sin(op.wa*math.Pi/180)
    30  	Ws := -math.Sin(op.wb*math.Pi/180) * math.Cos(op.wa*math.Pi/180)
    31  
    32  	*co = ns*Wz + ls*Ww + ms*Ws
    33  
    34  	//fmt.Printf("op.wb=%f ns=%f ls=%f ms=%f co=%f\n", op.wb, ns, ls, ms, *co)
    35  }