Skip to content

Commit

Permalink
Added Service/PROMS output
Browse files Browse the repository at this point in the history
  • Loading branch information
chimari committed Feb 15, 2018
1 parent 73c04d8 commit 85c00d3
Show file tree
Hide file tree
Showing 42 changed files with 614 additions and 227 deletions.
6 changes: 5 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
2018.02.13 ver3.3.0 - Added Exposure Time Calculator (ETC).
2018.02.14 ver3.3.0 - Added Exposure Time Calculator (ETC).
- Added Magnitude Online Search.
(GSC/PS1/SDSS/GAIA/2MASS).
- Added Catalog Matching Service.
(SIMBAD/NED/LAMOST).
- Added CamZ sync button.
referring http://hds.skr.jp/CamZ
- Added Service Request txt output.
- Added PROMS target list output.

2018.01.30 ver3.1.0 - Non-Sidereal Tracking.
- Guide Star Selection in FCDB.
Expand Down
4 changes: 4 additions & 0 deletions calcpa.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// hoe : Subaru HDS OPE file Editor
// calcpa.c : Calculate Objects' Position & Plot
// 2018.02.14 A.Tajitsu

#include"main.h"
#include<math.h>
#include<stdio.h>
Expand Down
32 changes: 3 additions & 29 deletions configfile.c
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,32 +1,6 @@
// MaCoPiX = Mascot Construnctive Pilot for X
// (ActX / Gtk+ Evolution)
// A unified desktop mascot program
// for UNIX / X Window System with Gdk Environment
//
// configfile.c : Save Data Access for MaCoPiX
// copyright K.Chimari 2002
// (diverting from original program of XMMS)
//
// XMMS - Cross-platform multimedia player
// Copyright (C) 1998-1999 Peter Alm, Mikael Alm, Olle Hallnas,
// Thomas Nilsson and 4Front Technologies
//
//
// This program 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 2 of the License, or
// (at your option) any later version.
//
// This program 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 this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
//
// hoe : Subaru HDS OPE file Editor
// configfile.c : Save & Load Data
// 2018.02.14 A.Tajitsu

#include "main.h"

Expand Down
3 changes: 3 additions & 0 deletions dynamical_time.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// hoe : Subaru HDS OPE file Editor
// dynamical_time.c : imported from libnova
// 2018.02.14 A.Tajitsu
/*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down
4 changes: 4 additions & 0 deletions earth.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// hoe : Subaru HDS OPE file Editor
// earth.c : imported from libnova
// 2018.02.14 A.Tajitsu

/*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down
32 changes: 16 additions & 16 deletions edit.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// HDS OPE file Editor
// edit.c --- Edit OPE file
//
// 2004.6.18 A.Tajitsu

// hoe : Subaru HDS OPE file Editor
// edit.c : Edit OPE file
// 2018.02.14 A.Tajitsu

#include"main.h" // ÀßÄê¥Ø¥Ã¥À
#include"version.h"
Expand All @@ -13,8 +11,8 @@ void save_opedit();

GtkWidget *make_edit_menu();

void add_FocusAGSequence();
void add_FocusAG();
void add_FocusSVSequence();
void add_FocusSV();
void add_BIAS();
void add_Setup();
void add_Comp();
Expand Down Expand Up @@ -70,7 +68,7 @@ void create_opedit_dialog(typHOE *hg)
editbar=make_edit_menu(hg);
gtk_box_pack_start(GTK_BOX(opedit_wbox), editbar,FALSE, FALSE, 0);

gtk_widget_set_usize (opedit_main, 680,400);
gtk_widget_set_usize (opedit_main, 900,600);
title_tmp=g_strconcat("HOE : ",g_path_get_basename(hg->filename_write),NULL);
gtk_window_set_title(GTK_WINDOW(opedit_main), title_tmp);
gtk_widget_realize(opedit_main);
Expand Down Expand Up @@ -101,10 +99,10 @@ void create_opedit_dialog(typHOE *hg)
gtk_container_set_border_width (GTK_CONTAINER (hbox), 2);
gtk_container_add (GTK_CONTAINER (frame2), hbox);

button=gtk_button_new_with_label("FocusAG");
button=gtk_button_new_with_label("FocusSV");
gtk_box_pack_start(GTK_BOX(hbox),button,TRUE,TRUE,0);
my_signal_connect(button,"pressed",
add_FocusAGSequence,
add_FocusSVSequence,
NULL);


Expand Down Expand Up @@ -438,15 +436,17 @@ GtkWidget *make_edit_menu(typHOE *hg){
return(menu_bar);
}

void add_FocusAGSequence(GtkWidget *widget, gpointer gdata){
insert("### FocusAG\n");
insert("FocusAGSequence $DEF_PROTO\n");
void add_FocusSVSequence(GtkWidget *widget, gpointer gdata){
insert("### FocusSV\n");
insert("FocusSVSequence $DEF_COMMON\n");
insert("SetStarSize $DEF_PROTO SEEING=0.60\n");
insert("\n");
}

void add_FocusAG(GtkWidget *widget, gpointer gdata){
insert("### FocusAG\n");
insert("FocusAG $DEF_PROTO\n");
void add_FocusSV(GtkWidget *widget, gpointer gdata){
insert("### FocusSV\n");
insert("FocusSV $DEF_COMMON\n");
insert("SetStarSize $DEF_PROTO SEEING=0.60\n");
insert("\n");
}

Expand Down
4 changes: 4 additions & 0 deletions efs.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// hoe : Subaru HDS OPE file Editor
// efs.c : Echelle Format Simulator
// 2018.02.14 A.Tajitsu

#include"main.h"
#include<math.h>

Expand Down
4 changes: 4 additions & 0 deletions etc.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// hoe : Subaru HDS OPE file Editor
// etc.c : Exposure Time Calculator
// 2018.02.14 A.Tajitsu

#include"main.h"
#include<math.h>

Expand Down
3 changes: 1 addition & 2 deletions etctree.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// HDS OPE file Editor
// etctree.c --- Exposure Time Calculator Reuslts
//
// etctree.c : Exposure Time Calculator Reuslts
// 2018.2.05 A.Tajitsu


Expand Down
4 changes: 1 addition & 3 deletions fc.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// HDS OPE file Editor
// fc.c --- Finding Chart
//
// fc.c : Finding Chart
// 2010.3.15 A.Tajitsu


#include"main.h" // 設定ヘッダ
#include"version.h"
#include "hsc.h"
Expand Down
7 changes: 2 additions & 5 deletions fc_output.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
// hskymon from HDS OPE file Editor
// New SkyMonitor for Subaru Gen2
// fc_output.c --- Output CSV for Finding Chart List
//
// HDS OPE file Editor
// fc_output.c : Output CSV for Finding Chart List
// 2010.3.15 A.Tajitsu


#include"main.h"
#include"version.h"

Expand Down
4 changes: 1 addition & 3 deletions fcdbtree.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// HDS OPE file Editor
// stdtree.c --- Standard Star List
//
// fcdbtree.c : DB/Finding Chart List
// 2018.1.24 A.Tajitsu


#include"main.h" // 設定ヘッダ
#include"version.h"

Expand Down
128 changes: 65 additions & 63 deletions http-client.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// HDS OPE file Editor
// http-client.c : Access to HTTP
// 2012.10.22 A.Tajitsu
/* $Id: ftp-client.c,v 1.4 2004/05/29 05:36:31 68user Exp $ */

#include "main.h"
Expand Down Expand Up @@ -2301,69 +2304,67 @@ int get_fcdb(typHOE *hg){
}

void unchunk(gchar *dss_tmp){
FILE *fp_read, *fp_write;
gchar *unchunk_tmp;
static char cbuf[BUFFSIZE];
gchar *cpp;
gchar *chunkptr, *endptr;
long chunk_size;
gint i, read_size=0, crlf_size=0;

if ( debug_flg ){
fprintf(stderr, "Decoding chunked file \"%s\".\n", dss_tmp);fflush(stderr);
}

fp_read=fopen(dss_tmp,"r");
unchunk_tmp=g_strconcat(dss_tmp,"_unchunked",NULL);
fp_write=fopen(unchunk_tmp,"w");

while(!feof(fp_read)){

if(fgets(cbuf,BUFFSIZE-1,fp_read)){
cpp=cbuf;

read_size=strlen(cpp);
for(i=read_size;i>=0;i--){
if(isalnum(cpp[i])){
crlf_size=read_size-i-1;
break;
}
else{
cpp[i]='\0';
}
}
chunkptr=g_strdup_printf("0x%s",cpp);
chunk_size=strtol(chunkptr, &endptr, 0);
g_free(chunkptr);

if(chunk_size==0) break;
if(chunk_size>BUFFSIZE-crlf_size){
fprintf(stderr, "!!! Buffer size overflow. Stopped to convert\"%s\".\n", dss_tmp);
fflush(stderr);
break;
}


if(fread(cbuf,1, chunk_size+crlf_size, fp_read)){
cpp=cbuf;
fwrite( &cbuf , chunk_size , 1 , fp_write );
}
else{
break;
}
}
}

fclose(fp_read);
fclose(fp_write);

unlink(dss_tmp);

rename(unchunk_tmp,dss_tmp);

g_free(unchunk_tmp);
}

FILE *fp_read, *fp_write;
gchar *unchunk_tmp;
gchar cbuf[BUFFSIZE];
gchar *dbuf=NULL;
gchar *cpp;
gchar *chunkptr, *endptr;
long chunk_size;
gint i, read_size=0, crlf_size=0;

if ( debug_flg ){
fprintf(stderr, "Decoding chunked file \"%s\".\n", dss_tmp);fflush(stderr);
}

fp_read=fopen(dss_tmp,"r");
unchunk_tmp=g_strconcat(dss_tmp,"_unchunked",NULL);
fp_write=fopen(unchunk_tmp,"w");

while(!feof(fp_read)){
if(fgets(cbuf,BUFFSIZE-1,fp_read)){
cpp=cbuf;

read_size=strlen(cpp);
for(i=read_size;i>=0;i--){
if(isalnum(cpp[i])){
crlf_size=read_size-i-1;
break;
}
else{
cpp[i]='\0';
}
}
chunkptr=g_strdup_printf("0x%s",cpp);
chunk_size=strtol(chunkptr, &endptr, 0);
g_free(chunkptr);

if(chunk_size==0) break;

if((dbuf = (gchar *)g_malloc(sizeof(gchar)*(chunk_size+crlf_size+1)))==NULL){
fprintf(stderr, "!!! Memory allocation error in unchunk() \"%s\".\n", dss_tmp);
fflush(stderr);
break;
}
if(fread(dbuf,1, chunk_size+crlf_size, fp_read)){
fwrite( dbuf , chunk_size , 1 , fp_write );
if(dbuf) g_free(dbuf);
}
else{
break;
}
}
}

fclose(fp_read);
fclose(fp_write);

unlink(dss_tmp);

rename(unchunk_tmp,dss_tmp);

g_free(unchunk_tmp);
}

#ifdef USE_SSL
gint ssl_gets(SSL *ssl, gchar *buf, gint len)
Expand Down Expand Up @@ -2475,6 +2476,7 @@ gint ssl_write(SSL *ssl, const gchar *buf, gint len)
}
#endif


#ifdef USE_WIN32
unsigned __stdcall http_c_std(LPVOID lpvPipe)
{
Expand Down
7 changes: 2 additions & 5 deletions json_parse.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
// hskymon from HDS OPE file Editor
// New SkyMonitor for Subaru Gen2
// json_parse.c --- pursing JSON table for Gemini archive.
// HDS OPE file Editor
// json_parse.c : pursing JSON table for Gemini archive.
// Using json-c
//
// 2017 12.24 A.Tajitsu


#include "main.h"
#include <json.h>

Expand Down
5 changes: 2 additions & 3 deletions julian_day.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// hskymon from HDS OPE file Editor
// New SkyMonitor for Subaru Gen2
// HDS OPE file Editor
// julian_day.c --- imported from libnova
//
// 2012.10.22 A.Tajitsu

/*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down
6 changes: 2 additions & 4 deletions jupiter.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// hskymon from HDS OPE file Editor
// New SkyMonitor for Subaru Gen2
// jupiter.c --- imported from libnova
//
// HDS OPE file Editor
// jupiter.c : imported from libnova
// 2012.10.22 A.Tajitsu
/*
* This library is free software; you can redistribute it and/or
Expand Down
4 changes: 1 addition & 3 deletions linetree.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// HDS OPE file Editor
// linetree.c --- Line List for EFS
//
// linetree.c : Line List for EFS
// 2010.2.22 A.Tajitsu


#include"main.h" // 設定ヘッダ
#include"version.h"

Expand Down
3 changes: 3 additions & 0 deletions lunar.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// HDS OPE file Editor
// lunar.c : imported from libnova
// 2010.2.22 A.Tajitsu
/*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down
Loading

0 comments on commit 85c00d3

Please sign in to comment.