Commit 26f1593d authored by Oliver Bock's avatar Oliver Bock
Browse files

First integration of antenna pattern library (dt unused)

parent fc050c7a
# ##############################################################################
# Copyright (C) 2008 by Oliver Bock #
# Copyright (C) 2017 by Oliver Bock #
# oliver.bock[AT]aei.mpg.de #
# #
# This file is part of PulsatingScience. #
......@@ -28,12 +28,14 @@ HEADERS += src/pulsaranimationwidget.h \
src/pulsescopewidget.h \
src/pulsatingscience.h \
src/common.h \
src/plotdata.h
src/plotdata.h \
lib/antenna_lib.h
SOURCES += src/pulsaranimationwidget.cpp \
src/pulsescopewidget.cpp \
src/pulsatingscience.cpp \
src/main.cpp \
src/plotdata.cpp
LIBS += -L$$_PRO_FILE_PWD_/lib -lantenna
FORMS += src/pulsatingscience.ui
RESOURCES += src/pulsatingscience.qrc
TS_DIR = src/resources
......
......@@ -19,6 +19,7 @@
******************************************************************************/
#include "pulsaranimationwidget.h"
#include "lib/antenna_lib.h"
const double PulsarAnimationWidget::deg2rad = PI/180.0;
......@@ -567,10 +568,21 @@ void PulsarAnimationWidget::resetCameraPosition(const double angleH, const doubl
void PulsarAnimationWidget::updatePulseProfile()
{
struct InputStruct in;
struct OutputStruct out;
in.iota = m_sourceIota;
in.psi = m_sourceInclination;
in.orientation[0] = m_LLOAngle;
in.orientation[1] = m_LHOAngle;
in.orientation[2] = m_VirgoAngle;
get_antenna(&out, &in);
for(int x = 0; x < 360*PERIODS; ++x) {
m_plotData.m_dataLHO[x] = 2.960124 * sin(x*deg2rad) + -0.494787 * cos(x*deg2rad);
m_plotData.m_dataLLO[x] = -3.533299 * sin(x*deg2rad) + -0.414445 * cos(x*deg2rad);
m_plotData.m_dataVirgo[x] = -0.984298 * sin(x*deg2rad) + 0.695593 * cos(x*deg2rad);
m_plotData.m_dataLLO[x] = out.amp[0] * sin((x+out.phase[0]) * deg2rad);// + out.dt[0];
m_plotData.m_dataLHO[x] = out.amp[1] * sin((x+out.phase[1]) * deg2rad);// + out.dt[1];
m_plotData.m_dataVirgo[x] = out.amp[2] * sin((x+out.phase[2]) * deg2rad);// + out.dt[2];
}
// propagate new profile
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment