Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
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
RadioObservatory
LOFAR
Commits
adc38b25
"SAS/TMSS/git@git.astron.nl:ro/lofar.git" did not exist on "d5b7567d8a28e4360645581d5c9b322920483f35"
Commit
adc38b25
authored
14 years ago
by
Andre Offringa
Browse files
Options
Downloads
Patches
Plain Diff
Bug 1491: RA en DEC string tools
parent
57e17613
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CEP/DP3/AOFlagger/include/AOFlagger/msio/antennainfo.h
+30
-5
30 additions, 5 deletions
CEP/DP3/AOFlagger/include/AOFlagger/msio/antennainfo.h
with
30 additions
and
5 deletions
CEP/DP3/AOFlagger/include/AOFlagger/msio/antennainfo.h
+
30
−
5
View file @
adc38b25
...
@@ -155,18 +155,43 @@ struct Frequency {
...
@@ -155,18 +155,43 @@ struct Frequency {
}
}
};
};
struct
Declinat
ion
{
struct
RightAscens
ion
{
static
std
::
string
ToString
(
numl_t
value
)
static
std
::
string
ToString
(
numl_t
value
)
{
{
return
""
;
value
=
fmod
(
value
,
2
.
0
*
M_PInl
);
if
(
value
<
0
.
0
)
value
+=
2
.
0
*
M_PInl
;
std
::
stringstream
s
;
s
<<
(
int
)
floorn
(
value
*
12
.
0
/
M_PInl
)
<<
':'
;
int
d2
=
(
int
)
floornl
(
fmodnl
(
value
*
12
.
0
*
60
.
0
/
M_PInl
,
60
.
0
));
if
(
d2
<
10
)
s
<<
'0'
;
s
<<
d2
<<
':'
;
numl_t
d3
=
fmodnl
(
value
*
12
.
0
*
60
.
0
*
60
.
0
/
M_PInl
,
60
.
0
);
if
(
d3
<
10
.
0
)
s
<<
'0'
;
s
<<
d3
;
return
s
.
str
();
}
}
};
};
struct
RightAscens
ion
{
struct
Declinat
ion
{
static
std
::
string
ToString
(
numl_t
value
)
static
std
::
string
ToString
(
numl_t
value
)
{
{
return
""
;
value
=
fmod
(
value
,
2
.
0
*
M_PInl
);
if
(
value
<
0
.
0
)
value
+=
2
.
0
*
M_PInl
;
if
(
value
>
M_PInl
*
0
.
5
)
value
=
M_PInl
-
value
;
std
::
stringstream
s
;
if
(
value
>
0
.
0
)
s
<<
'+'
;
else
s
<<
'-'
;
value
=
fabsnl
(
value
);
s
<<
(
int
)
floornl
(
value
*
180
.
0
/
M_PIn
)
<<
'.'
;
int
d2
=
(
int
)
fmodnl
(
value
*
180
.
0
*
60
.
0
/
M_PIn
,
60
.
0
);
if
(
d2
<
10
)
s
<<
'0'
;
s
<<
d2
<<
'.'
;
numl_t
d3
=
fmodnl
(
value
*
180
.
0
*
60
.
0
*
60
.
0
/
M_PIn
,
60
.
0
);
if
(
d3
<
10
.
0
)
s
<<
'0'
;
s
<<
d3
;
return
s
.
str
();
}
}
};
};
#endif
#endif
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