Jump to content

Astro planner software - export to Sequence?


Corpze

Recommended Posts

Hi, i am looking for a program that helps me choose what object to image. I have been looking into Astro Planner (maybe you have a better suggestion?)

One feature of Astro Planner is that you can export your list - but can it export to Sequence? 

 

The target file in sequence uses a .trg fiel extension and contains this;
 

<?xml version="1.0"?>
<clsTarget xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Name />
  <ObjRa>00h53m45,6s</ObjRa>
  <ObjDe>+56d42m26s</ObjDe>
  <FocRa>00h25m42,0s</FocRa>
  <FocDe>+61d55m26s</FocDe>
  <Comment />
</clsTarget>

This should not be that hard to script if possible in Astro Planner right?
 

/Daniel

Edited by Corpze
Link to comment
Share on other sites

Just downloaded the program (no license so i have limited functionality) and after a quick look it looks like i can export as text document and .xls
how ever, you can script Astro planner, am looking into it right now.
How does XSLT works? i have never used that before?

Link to comment
Share on other sites

XSLT translates structured text files (typically XML) from one structure to another.

 

Probably best to see if scripting will do the job first rather than complicate things by adding XSLT into the pipeline, but that may be an option if scripting fails.

Link to comment
Share on other sites

I have been looking into it a bit and the .xls file that you can export is HUGE - i can't even insert it as code on this forum.

There is how ever a script example in AStro planner for running a export script to CCD commander, maybe we can start out from that?
I have never scripted before but it shouldn't be that difficult?

Here is the script code for CCDc;

 


//- Paul Rodman, Jan 2010
//- 
//- V1.0  25 Jan 2010
//-   Initial Release
//- V1.1  25 Jan 2010
//-   Minor changes (Juan Gonzalez)
//- V1.2  8 Feb 2010
//-   Modified for V2
//- V1.3  15 Oct 2012
//-   Added ability to choose ID, Name, or Both as object identifier
 
//# Name: CCD Commander Export
//# URL: 
//# Author: Paul Rodman
//# E-Mail: paul@ilanga.com
//# Category: Export|Imaging
//# MinVersion: 2.0
//# Keywords: Export, Imaging, CCD Commander
 
function FormatCoordinate(v as double) as string
  dim s as string
  s = format(abs(v),"00.000000")
  s = left(s,2)+"."+mid(s,4) // Force decimal period (.)
  while left(s,1)="0" and left(s,2)"0."
    s=mid(s,2)
  wend
  if v
  return s
end function
 
sub main()
  dim tf as APTextFile
  dim i as integer
  dim id,sra,sdec as string
  dim ob as APPlanObject
  
  dim nid as integer = Plan().RestoreValue("nid",0)
  
  dim dlg as new Dialog
  dlg.ChoiceParameter("Object Identifier",nid,"ID","Name","Both (ID_Name)")
  if not dlg.Show("CCD Commander Export") then return
  nid = dlg.ChoiceParameter("Object Identifier")
  
  Plan().SaveValue("nid",nid)
  
  // Create output file
  tf = APTextFile.WriteFile ("export.txt")
  if tf=nil then return
  
  // Output a line for each object
  for i = 1 to Plan().nObjects
    ob = Plan().Obj(i)
    select case nid
    case 0
    id = ob.ID
    case 1
    id = ob.Name
    else
    if ob.Name="" then
    id=ob.ID
    elseif ob.ID="" then
    id=ob.Name
    else
    id = ob.ID+"_"+ob.Name
    end if
    end select
    id = ReplaceAll(id,",","-") // Replace any commas with hyphens
    id = ReplaceAll(id,"/","")     // Remove the slash sign
    id = ReplaceAll(id," ","_")    // Replace spaces
    
    tf.Write id+","+FormatCoordinate(ob.RA)+","+FormatCoordinate(ob.Dec)+chr(13)+chr(10)
  next
    
  tf.Close
end sub
 

The .trg file is quite simple and only uses a few lines - i do not know how to write this script though :/
And we have to get the nearby focus star as well... 
Hmpf

/Daniel

Edited by Corpze
Link to comment
Share on other sites

I sent Paul Rodman the author of Astroplanner. The email below. He is willing to help us.

 

I don't use Sequence that much yet but hope to soon with Astroplanner import.

 

Can someone post a few .trg files with a few  targets and focus stars that I can forward to him?

 

Max

 

 

-------------------------------------------------------------------------

 

Sure. Send me some sample XML files and I will figure out what you'll need to do.

 

Paul Rodman

Sent from my iPad

On Sep 12, 2016, at 12:07 PM, Mirot, Max Max.Mirot@canyonvistamedicalcenter.com> wrote:

Paul,

 

I just purchased AstroPlanner.

I see it has a lot of ways to export including scripting.

 

I use the automation program called Sequence by ASA telescopes that supports their direct drive mounts.

Several members of the ASA user group are also interested in exporting from Astroplanner into Sequence.

Sequence takes a XML file.

 

Can you help us configure or script this output?   I can send you some sample files that we need to emulate.

 

Thanks

 

Max

Edited by maxmirot
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...