Ocular.cpp   Ocular.cpp 
skipping to change at line 40 skipping to change at line 40
{ {
} }
Ocular::Ocular(const QObject& other) Ocular::Ocular(const QObject& other)
: m_binoculars(other.property("binoculars").toBool()), : m_binoculars(other.property("binoculars").toBool()),
m_permanetCrosshair(other.property("permanentCrosshair").toBool()) , m_permanetCrosshair(other.property("permanentCrosshair").toBool()) ,
m_appearentFOV(other.property("appearentFOV").toDouble()), m_appearentFOV(other.property("appearentFOV").toDouble()),
m_effectiveFocalLength(other.property("effectiveFocalLength").toDo uble()), m_effectiveFocalLength(other.property("effectiveFocalLength").toDo uble()),
m_fieldStop(other.property("fieldStop").toDouble()), m_fieldStop(other.property("fieldStop").toDouble()),
m_name(other.property("name").toString()), m_name(other.property("name").toString()),
m_reticlePath(other.property("reticlePath").toString()),
m_reticleFOV(other.property("reticleFOV").toDouble()) m_reticleFOV(other.property("reticleFOV").toDouble())
{ {
} }
Ocular::~Ocular() Ocular::~Ocular()
{ {
} }
static QMap<int, QString> mapping; static QMap<int, QString> mapping;
QMap<int, QString> Ocular::propertyMap(void) QMap<int, QString> Ocular::propertyMap(void)
skipping to change at line 72 skipping to change at line 73
} }
/* ********************************************************************* */ /* ********************************************************************* */
#if 0 #if 0
#pragma mark - #pragma mark -
#pragma mark Instance Methods #pragma mark Instance Methods
#endif #endif
/* ********************************************************************* */ /* ********************************************************************* */
double Ocular::actualFOV(const Telescope * telescope, const Lens * lens) co nst double Ocular::actualFOV(const Telescope * telescope, const Lens * lens) co nst
{ {
const double lens_multipler = (lens != NULL ? lens->multipler() : 1. 0f); const double lens_multipler = (lens != NULL ? lens->getMultipler() : 1.0f);
double actualFOV = 0.0; double actualFOV = 0.0;
if (m_binoculars) { if (m_binoculars) {
actualFOV = appearentFOV(); actualFOV = appearentFOV();
} else if (fieldStop() > 0.0) { } else if (fieldStop() > 0.0) {
actualFOV = fieldStop() / (telescope->focalLength() * lens_ multipler) * 57.3; actualFOV = fieldStop() / (telescope->focalLength() * lens_ multipler) * 57.3;
} else { } else {
//actualFOV = apparent / mag //actualFOV = apparent / mag
actualFOV = appearentFOV() / (telescope->focalLength() * len s_multipler / effectiveFocalLength()); actualFOV = appearentFOV() / (telescope->focalLength() * len s_multipler / effectiveFocalLength());
} }
return actualFOV; return actualFOV;
} }
double Ocular::magnification(const Telescope * telescope, const Lens * lens ) const double Ocular::magnification(const Telescope * telescope, const Lens * lens ) const
{ {
double magnifiction = 0.0; double magnifiction = 0.0;
if (m_binoculars) { if (m_binoculars) {
magnifiction = effectiveFocalLength(); magnifiction = effectiveFocalLength();
} else { } else {
const double lens_multipler = (lens != NULL ? lens->multiple r() : 1.0f); const double lens_multipler = (lens != NULL ? lens->getMulti pler() : 1.0f);
magnifiction = telescope->focalLength() * lens_multipler / e ffectiveFocalLength(); magnifiction = telescope->focalLength() * lens_multipler / e ffectiveFocalLength();
} }
return magnifiction; return magnifiction;
} }
/* ********************************************************************* */ /* ********************************************************************* */
#if 0 #if 0
#pragma mark - #pragma mark -
#pragma mark Accessors & Mutators #pragma mark Accessors & Mutators
#endif #endif
 End of changes. 3 change blocks. 
2 lines changed or deleted 3 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/