The goal of this chapter is to demonstrate the use of the REST API via sample configuration using ASCOM simulators, documented examples and video tutorials.


Before starting to run the documented examples, please follow these steps:


  1. Install SkySurveyor (For more information read Installing the Application)
  2. Unzip the SkySurveyor API to C:\Program Files (x86)\SkySurveyor\API
  3. Proceed with the URL reservation 
  4. Request a license for SkyGuard (For more information read Requesting a license)
  5. Register the license (For more information read Registering your license)
  6. Create an empty folder somewhere on your local drive (e.g. C:\Demo)
  7. Copy the sample configuration from SkyGuard_x86_ASCOM64_MDL6_v3.3.0000.00000\SDK\Workspace.xml to the new empty folder
  8. Open SkyGuard application and select the new empty folder as a working folder (For more information read Selecting the working folder)
  9. Open a Internet browser and enter http://localhost:18700/help in the URL field
  10. Open the Windows Powershell ISE and open the script SkyGuard_x86_ASCOM64_MDL6_v3.3.0000.00000\SDK\RESTCallbackListener.ps1
  11. Start the HTTP listener script
  12. Open the Windows Powershell ISE and open the script SkyGuard_x86_ASCOM64_MDL6_v3.3.0000.00000\SDK\RESTAPISamples.ps1


Once all steps are done, you can organize your desktop as following in order to see all in a glance on your desktop:



Now, it’s time to proceed with guider simulator configuration. Please follow these steps:



  1. From SkyGuard GUI, select instrument tab
  2. Select the Simulator in available instrument list
  3. Go to bottom of the instrument settings form and click on the setup button on the guiding & focusing camera settings
  4. Select “Camera V2 Simulator” in the ASCOM Camera chooser and click properties button
  5. Setup the simulator as following:
    1. Pixel Width = 9 microns
    2. Pixel Height = 9 microns
    3. CCD Width = 1024 pixels
    4. CCD Height = 1024 pixels
    5. Check Simulation Apply Noise 
    6. Select Simulation Image File

The simulator image file can be found here: SkyGuard_x86_ASCOM64_MDL6_v3.3.0000.00000\SDK\GuiderSimulator.bmp

  1. Click OK button on Simulator Setup dialog box.
  2. Click Ok button on ASCOM Camera Chooser.



Now, it’s time to proceed with guider simulator configuration. Please follow these steps:



  1. Click on the setup button on the focuser settings
  2. Select “Simulator” in the ASCOM Focuser chooser and click properties button
  3. Setup the simulator as following:
    1. Maximum Position = 65535 microns
    2. Step Size = 50 microns
    3. Focuser Type = Absolute
  4. Click OK button on Simulator Setup dialog box.
  5. Click Ok button on ASCOM Focuser Chooser.
  6. Go back to Guiding & Focusing tab