1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
|
/*
Plot_dialog.h sky view
Copyright (C) 2011 Enas Giovanni <gio.enas@alice.it>
This file is part of Nautic.
Nautic is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Nautic is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Nautic. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _PLOTDIALOG_
#define _PLOTDIALOG_
#include <wx/wx.h>
#include <wx/settings.h>
#include <wx/bitmap.h>
#include <wx/image.h>
#include <wx/icon.h>
#include <wx/statbmp.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/string.h>
#include <wx/sizer.h>
#include <wx/button.h>
#include <wx/textctrl.h>
#include <wx/stattext.h>
#include <wx/dialog.h>
#include <wx/wfstream.h>
#include <wx/datstrm.h>
#include <wx/rawbmp.h>
#include <wx/file.h>
////////////////////////
#include "sun.h"
#include "stars.h"
#include "starpos.h"
#include "moon.h"
class Plot_dialog : public wxDialog {
//DECLARE_DYNAMIC_CLASS(Plot_dialog )
public:
Plot_dialog();
Plot_dialog( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Stars position"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(750,400), long style = wxCAPTION|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER);
~Plot_dialog();
////////////////////////////variable////////////////////////////////////////////
double dYear ;
double dMonth;
double dDay;
double dHour;
double dMinute;
double dSeconds;
double latitud;
double longitud;
protected:
wxStaticBitmap* m_bitmap3;
virtual void OnPaint( wxPaintEvent& event );// { event.Skip(); }
virtual void OnLeftMouseClick( wxMouseEvent& event );
virtual void OnMotion( wxMouseEvent& event );
virtual void OnLeftMouseUp( wxMouseEvent& event );
//variable
wxPoint centre_toppoint;
wxPoint centre_bottompoint;
wxPoint east_toppoint;
wxPoint east_bottompoint;
wxPoint south_toppoint;
wxPoint south_bottompoint;
wxPoint north_toppoint;
wxPoint north_bottompoint;
wxPoint west_toppoint;
wxPoint west_bottompoint;
int point_from_centre_span;
private:
////////////////////function///////////////////////////////
void Calc_sun_data(double* azimuth, double* alt, double *GHA);
void Calc_moon_data(double* azimuth, double* alt, double *GHA);
void Calc_planet_data(double* azimuth, double *alt, int iChoice, wxString* name);
void Calc_star_data(double* azimuth, double* alt, int a, wxString* name);
void Draw_sun(wxPaintDC * dc, wxPoint point, double altitude);
void Draw_compass(wxPaintDC * dc, wxPoint point);
void Draw_moon(wxPaintDC* dc, wxPoint point, double altitude, double GHA);
void Draw_planet(wxPaintDC*dc, wxPoint point, double altitude, wxString name);
void Draw_star(wxPaintDC*dc, wxPoint point, double altitude, wxString name);
void Draw_alt(wxPaintDC*dc, wxPoint point);
wxPoint Calc_draw_coordinate(double azimuth, double alt);
wxCursor open_cursor;
wxCursor close_cursor;
//////////////////////variables/////////////////////////////
double declination;
double CoArect;
double moon_alt;
double moon_tm;
double sun_alt;
double sun_gha;
//////////////tempo siderale/////////////////////////
double Ts;
double altitude;
double azth;
double RA;
double LHA;
double equinox;
double loctime;
double t;
double lamda;
double beta;
double parlax;
double smdiam;
wxString bodyname;
wxString constell;
};
#endif // PLOTDIALOG
|