Jump to content


Photo

Astro planner software - export to Sequence?


  • Please log in to reply
8 replies to this topic

#1 Corpze

Corpze

    Member

  • Beta Tester
  • 208 posts
  • LocationSweden - Arvika

Posted 10 September 2016 - 04:09 PM

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, 10 September 2016 - 04:14 PM.


#2 nakbrooks

nakbrooks

    Member

  • Beta Tester
  • 268 posts
  • LocationWiltshire (England) & Hautes-Pyrenees (France)

Posted 10 September 2016 - 04:34 PM

What does the Astro Planner exported file look like Daniel? If it is XML it should be simple to use XSLT to translate it.
Nigel Brooks
Stratis Observatory, Hautes Pyrénées, France.
http://www.facebook.com/stratisobservatory

#3 Corpze

Corpze

    Member

  • Beta Tester
  • 208 posts
  • LocationSweden - Arvika

Posted 10 September 2016 - 04:37 PM

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?



#4 nakbrooks

nakbrooks

    Member

  • Beta Tester
  • 268 posts
  • LocationWiltshire (England) & Hautes-Pyrenees (France)

Posted 10 September 2016 - 06:18 PM

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.
Nigel Brooks
Stratis Observatory, Hautes Pyrénées, France.
http://www.facebook.com/stratisobservatory

#5 maxmirot

maxmirot

    Member

  • Beta Tester
  • 223 posts

Posted 11 September 2016 - 01:23 AM

Please show us how us how do this.

 

I would love to import into Sequence.

 

Max



#6 nakbrooks

nakbrooks

    Member

  • Beta Tester
  • 268 posts
  • LocationWiltshire (England) & Hautes-Pyrenees (France)

Posted 11 September 2016 - 08:13 AM

Sorry, I don't have any knowledge of Astro Planner myself.
Nigel Brooks
Stratis Observatory, Hautes Pyrénées, France.
http://www.facebook.com/stratisobservatory

#7 Corpze

Corpze

    Member

  • Beta Tester
  • 208 posts
  • LocationSweden - Arvika

Posted 11 September 2016 - 08:23 AM

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<0 then s="-"+s
  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, 11 September 2016 - 08:43 AM.


#8 maxmirot

maxmirot

    Member

  • Beta Tester
  • 223 posts

Posted 12 September 2016 - 09:31 PM

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, 12 September 2016 - 09:32 PM.


#9 Corpze

Corpze

    Member

  • Beta Tester
  • 208 posts
  • LocationSweden - Arvika

Posted 13 September 2016 - 10:35 AM

I could post a few .trg files tonight when i am at home.
But - i think the most important thing is to get a good focus star, and how does Sequence chooses the star?

/Daniel




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users