Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
VIPSCommon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VIPS
VIPSCommon
Commits
8ea50097
Commit
8ea50097
authored
9 years ago
by
Tor-Einar Skog
Browse files
Options
Downloads
Patches
Plain Diff
Renaming method
parent
d9f47e5f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/no/nibio/vips/util/SolarRadiationUtil.java
+1
-1
1 addition, 1 deletion
src/main/java/no/nibio/vips/util/SolarRadiationUtil.java
src/test/java/no/nibio/vips/util/SolarRadiationUtilTest.java
+4
-4
4 additions, 4 deletions
src/test/java/no/nibio/vips/util/SolarRadiationUtilTest.java
with
5 additions
and
5 deletions
src/main/java/no/nibio/vips/util/SolarRadiationUtil.java
+
1
−
1
View file @
8ea50097
...
...
@@ -30,7 +30,7 @@ import java.util.TimeZone;
*/
public
class
SolarRadiationUtil
{
public
Double
get
SolarRadiationAtLocationAndTime
(
Double
latitude
,
Double
longitude
,
Date
date
,
TimeZone
timeZone
)
public
Double
calculate
SolarRadiationAtLocationAndTime
(
Double
latitude
,
Double
longitude
,
Date
date
,
TimeZone
timeZone
)
{
// We must adjust the hour to reflect the deviation from the LSTM (Local Standard Time Meridian)
Calendar
cal
=
Calendar
.
getInstance
(
timeZone
);
...
...
This diff is collapsed.
Click to expand it.
src/test/java/no/nibio/vips/util/SolarRadiationUtilTest.java
+
4
−
4
View file @
8ea50097
...
...
@@ -145,9 +145,9 @@ public class SolarRadiationUtilTest extends TestCase {
}
/**
* Test of
get
SolarRadiationAtLocationAndTime method, of class SolarRadiationUtil.
* Test of
calculate
SolarRadiationAtLocationAndTime method, of class SolarRadiationUtil.
*/
public
void
test
Get
SolarRadiationAtLocationAndTime
()
{
public
void
test
Calculate
SolarRadiationAtLocationAndTime
()
{
System
.
out
.
println
(
"getSolarRadiationAtLocationAndTime"
);
Double
latitude
=
59.660468
;
Double
longitude
=
10.781989
;
...
...
@@ -157,7 +157,7 @@ public class SolarRadiationUtilTest extends TestCase {
Date
date
=
cal
.
getTime
();
SolarRadiationUtil
instance
=
new
SolarRadiationUtil
();
Double
expResult
=
0.9540516211907254
;
Double
result
=
instance
.
get
SolarRadiationAtLocationAndTime
(
latitude
,
longitude
,
date
,
timeZone
);
Double
result
=
instance
.
calculate
SolarRadiationAtLocationAndTime
(
latitude
,
longitude
,
date
,
timeZone
);
assertEquals
(
expResult
,
result
);
/*
...
...
@@ -169,7 +169,7 @@ public class SolarRadiationUtilTest extends TestCase {
format.setTimeZone(timeZone);
while(cal.get(Calendar.DAY_OF_YEAR) <= lastDayOfYear)
{
String resultStr = String.valueOf(instance.
get
SolarRadiationAtLocationAndTime(latitude, longitude, date, timeZone) * 1000);
String resultStr = String.valueOf(instance.
calculate
SolarRadiationAtLocationAndTime(latitude, longitude, date, timeZone) * 1000);
System.out.println(format.format(date) + ";" + resultStr.replace(".", ","));
cal.add(Calendar.HOUR_OF_DAY, 1);
date = cal.getTime();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment