Sample RTML Generator for VB.NET (project available on request)

'
' Sample RTML 2.3 Generator in VB.NET
'
' Bob Denny 02-Dec-2014
'
Imports DC3.RTML23

Module SampleGenRTML

    Sub Main()
        Dim RTML As New RTML

        RTML.Contact = New Contact
        RTML.Contact.User = "Ray Jay Poteet"
        RTML.Contact.Email = "rayjay@deliverance.com"
        '
        ' An RTML Request (child of RTML document)
        '
        Dim REQ = New Request
        REQ.UserName = "Bob Denny"                                  ' SPECIFY THIS FIRST!
        REQ.Project = "Sample Project"                              ' Proj for above user will be created if needed
        REQ.ID = "Test Plan"                                        ' This becomes the Plan name for each Request
        '
        ' In RTML, a Correction (child of Request) applies to -all- Pictures
        ' in the REQUEST!!. 
        '
        ' zero      Bias subtract
        ' dark      Dark subtract
        ' flat      Flat-field correction
        '
        REQ.Correction = New Correction
        REQ.Correction.Zero = True                                  ' NOTE: Just one of these is enough for ACP Scheduler
REQ.Correction.Flat = True ' to fully calibrate via MaxIm REQ.Correction.dark = True ' ' Now add this Request to the RTML document. You can add as many ' Requests to the RTML as you want. ' RTML.Requests.Add(REQ) ' ' An RTML Target (child of Request) ' Dim TGT = New Target ' ' You can specify coordinates, orbital elements (comet or ' minor planet) or a major planet name (except Earth and Moon). ' ' Choose one of the following: ' ' Coordinates (child of Target.TargetType): TGT.TargetType.Coordinates = New Coordinates ' TargetType is Liquid Magic TGT.TargetType.Coordinates.RightAscension = 15 * 8.123 ' RA in DEGREES for RTML! TGT.TargetType.Coordinates.Declination = +24.321 TGT.Name = "Test-1" ' Required ' ' Elements (MPC 1-line MP or Comet): ''TGT.TargetType.OrbitalElements = "00010 5.43 0.15 K047E 273.78747 313.55726 283.64568 3.84229 0.1192435 0.17735951 3.1373748 0 MPC 35055 2261 104 1849-1999 0.53 M-v 38h Goffin 0000 (10) Hygiea 19990306" ''TGT.Name = "(00010) Hygiea" ' ' Major Planet (Except Earth and Moon) ''TGT.TargetType.Planet = "Mars" ''TGT.Name = TGT.TargetType.Planet ' ' ' Targets can specify a repeat count and interval. ' ''TGT.Count = 3 ''TGT.Interval = 0.5 ' HOURS!!! ' ' Now add this Target to the Request. You can repeat the above, ' creating additional Targets, and add them to the Request. ' REQ.Targets.Add(TGT) ' ' An RTML Picture (child of Target) You may set the count property to acquire ' multiple images within this Picture, and you may set the autostack property ' to True to cause the repeated images to be automatically aligned and stacked. ' Dim PIC = New Picture PIC.Name = "Test-1 Clear" ' Required PIC.ExposureSpec.ExposureTime = 120 ' ExposureSpec is Liquid magic (??) PIC.Binning = 2 PIC.Filter = "Clear" ' ' Now add this Picture to the Target. You can repeat the above, ' creating additional Pictures, and add them to the Target. ' TGT.Pictures.Add(PIC) RTML.NoBanner = True ' Suppress Liquid advert in XML MsgBox(RTML.ToXml()) End Sub End Module