seandepagnier / celestial_navigation_pi

celestial navigation plugin for opencpn
17 stars 21 forks source link

RFE Sight > Find should preferably calculate Corrections for Parameters #23

Open rgleason opened 7 years ago

rgleason commented 7 years ago

So that FIND altitude/azimuth measurement is corrected by Parameters Tab values to match the entry that would be entered with an actual sighting

http://www.cruisersforum.com/forums/f134/celestial-navigation-plugin-redux-98748.html#post2500392

http://www.cruisersforum.com/forums/f134/celestial-navigation-plugin-redux-98748.html#post2500411

PARAMETER TAB Eye Height=? Temperature=? Pressure=? Index Error=? These factors provide corrections to the altitude or azimuth

Altitude or Azimuth angle that FIND looks up in the tables has to be ADJUSTED to the Angle that a NAVIGATOR taking sights would see, by actually making the Corrections in the Parameters Tab. So it is just a little more math and perhaps another "Corrected measurement" Line that can be copied in the FIND Dialogue.

So FindBodyDialog.cpp needs some lines that will calculate the Corrections required for the PARAMETERS TAB and show a line for "Corrected angle" under Altitude and Azimuth. Or have a choice to [X] Correct for Parameters

I spoke with Sean and these formulas need to be reversed so that they will work properly. IE: The Sight (+) Corrections, establishes the Altitude/Azimuth, then the Sight is shown.
For FIND we think we know the Boat Position (or it is rough) the Altitude/Azimuth is determined then we need to (-) Corrections to get the Sight corrected altitude/azimuth.

He also said the order of calculation has to be reversed as well.

Line 300 - 303 off SightDialog.cpp Calculations Under void SightDialog::Recompute() m_tEyeHeight->GetValue().ToDouble(&m_Sight.m_EyeHeight); m_Sight.m_Temperature = m_sTemperature->GetValue(); m_Sight.m_Pressure = m_sPressure->GetValue(); m_tIndexError->GetValue().ToDouble(&m_Sight.m_IndexError);