Beispiel #1
0
void ExtentDlg::OnInitDialog(wxInitDialogEvent& event)
{
	GetDMS()->Enable(m_bDegrees);

	FormatStrings(1);
	FormatStrings(2);

	wxWindow::OnInitDialog(event);
}
Beispiel #2
0
void ReadGuideStartup( void)
{
	double RaDeg, DecDeg;
	struct HMSH RaHMSH;
	struct DMS DecDMS;
	Flag RaFlag = No;
	Flag DecFlag = No;


	Input = fopen( GuideStartupMarFilePtr, "r");
	if( Input == NULL)
		BadExit( strcat( "ReadGuideStartup(): Could not open ", GuideStartupMarFilePtr));

	fscanf( Input, "%s", Name);
	while( !feof( Input) && !RaFlag || !DecFlag)
	{
		if( (strncmpi( Name, "ra", sizeof( Name))) == 0)
		{
			FReadDouble( Input, &RaDeg);
			RaDeg = 360. - RaDeg;
			RaFlag = Yes;
		}
		else if( (strncmpi( Name, "dec", sizeof( Name))) == 0)
		{
			FReadDouble( Input, &DecDeg);
			DecFlag = Yes;
		}
		fscanf( Input, "%s", Name);
	}
	fclose( Input);
	if( RaFlag && DecFlag)
	{
		In.Ra = RaDeg*DegToRad;
		In.Dec = DecDeg*DegToRad;
		DisplayIn( "from Guide", NameBlanks);

		/* write to OutGuideFile, preserving a record of all positions returned from Guide */
		GetHMSH( In.Ra*RadToHundSec + .5, &RaHMSH);
		GetDMS( In.Dec*RadToArcsec + .5, &DecDMS);
		if( In.Dec < 0)
			if( DecDMS.Deg > 0)
				DecDMS.Deg = -DecDMS.Deg;
			else
				if( DecDMS.Min > 0)
					DecDMS.Min = -DecDMS.Min;
				else
					DecDMS.Sec = -DecDMS.Sec;

		fprintf( OutGuideFilePtr, "%3d %3d %3d   %3d %3d %3d   from_guide\n", RaHMSH.Hr, RaHMSH.Min,
		RaHMSH.Sec, DecDMS.Deg, DecDMS.Min, DecDMS.Sec);
	}
}