Skip to content

Software configuration

Dominic Ford edited this page Dec 22, 2018 · 3 revisions

Software configuration

The file pi-gazing/configuration/installation_settings.conf contains a list of settings which describe your set up. When you install a new system, it is important that you go through this file and ensure these settings are correct.

If you plan to use your system to make observations (as opposed to as a web server to browse observations made elsewhere), you must configure your installation's latitude and longitude, your installation's name and unique ID, the model of camera and lens that you are using.

Even if you are only using your system as a repository to receive observations from other observing nodes, you may still want to configure the server to export observations to another machine.

List of settings

The settings in the file pi-gazing/configuration/installation_settings.conf are as follows:

  • latitude
  • longitude

These must be set if you are using your system to make observations. The latitude should be specified as a number of degrees north of the equator, and the longitude as degrees east of Greenwich.

They should be accurate to within 100 metres or so, but be aware that they will be publicly visible if you upload observations to public servers. Individuals may wish to choose the coordinates of a road junction or park close to their home to avoid disclosing exactly where they live.

  • observatoryId
  • observatoryName

These must be set if you are using your system to make observations.

The observatoryId is a short identifier that must be unique for every Pi Gazing installation. If you plan to upload observations to public servers, you will need to ask us to issue you with a unique ID. The ID should not contain any spaces. Dashes are the only punctuation that should be used. We often use something like obs-fred for Fred's camera.

The observatoryName is the public name of your installation which will appear on the web interface. It can have spaces in it, but it is still best to keep it short. We often use names like "Bury-St-Edmunds" or "Cambridge-South".

If you don't set these correctly, it's quite likely your observations will be irretrievable. If you have two cameras with the same ID, and both export to an external server, they will interfere with each other!

  • defaultCamera

This is the name of the camera that you're using, and must be set if you are using your system to make observations. For example, it might be "watec_902h2_ultimate" or "watec_902h".

This string must match the name of an entry in the file pi-gazing/src/camera_properties/cameras.xml.

If you're using a model of camera that we don't have an existing entry for, you should edit this file to enter some details for it. An entry might look like this:

 <camera>
  <name>my_camera</name>
  <width>720</width>
  <height>480</height>
  <fps>24.71</fps>
  <upsidedown>0</upsidedown>
  <type>webcam</type>
 </camera>

You should not change the type field from webcam. The field upsidedown should be set to 1 if the camera is mounted upside down in your housing; it rotates the images by 180 degrees.

Note that this setting does not take affect unless you run the script pi-gazing/src/cmd_line_admin/update_observatory_status.py to update the database.

  • defaultLens

This is the name of the lens that you're using, and must be set if you are using your system to make observations.

This string must match the name of an entry in the file pi-gazing/src/camera_properties/lenses.xml.

If you're using a model of lens that we don't have an existing entry for, you should edit this file to enter some details for it. An entry might look like this:

 <lens>
  <name>my_lens</name>
  <fov>50</fov>
  <barrel_a>0</barrel_a>
  <barrel_b>0</barrel_b>
  <barrel_c>0</barrel_c>
 </lens>

The three barrel settings describe the barrel distortion present in images taken through this lens. If you don't have values to hand, set them to zero. However, if you're using a wide field lens, your installation may not be able to work out where it is pointing until these settings are determined, as the distortion in wide field images can be quite severe.

The setting "fov" should be set to the approximate width of field of the lens.

Note that this setting does not take affect unless you run the script pi-gazing/src/cmd_line_admin/update_observatory_status.py to update the database.

  • estimated_image_scale

This is the approximate width of field of the lens (in degrees). It does not need to be accurate, but it must be set if you are using your system to make observations.

Setting it to within a factor of two is probably good enough. Setting it to within 20% is better.

  • gpioPinRelay
  • gpioLedA
  • gpioLedB
  • gpioLedC

These settings only affect installations running on Raspberry Pis, which are going to be used to make observations.

Optionally, you can have a relay which switches your camera on at night time, and off in the day time, and three LEDs which flash to indicate what the camera is doing. Here, you configure which GPIO lines (in BOARD mode) they are connected to.

If you get these wrong, it's not the end of the world, but your relay and/or indicator LEDs won't work.

  • relayOnGPIOState

Some relays turn the camera on when they receive a high signal (i.e. True). Others turn the camera on when they receive a low signal (i.e. False). You may have to try both settings and see which one works!

  • dataLocalLifetime

If you're storing data on a Raspberry Pi with an SD card, you'll probably run out of storage space quite quickly. You'll probably want to wipe old data off your Raspberry Pi, and keep the archive on a PC with more storage.

This settings allows you to specify how many days old data should be kept on your Raspberry Pi for. Set it to a big number if you don't want your system to automatically erase old data!

  • exportURL
  • exportUsername
  • exportPassword

This settings configure whether your installation should export all its observations to an external server. See this page for more information.

These three settings should be configured to the URL at which the web interface of the external repository can be found, and the log-in details that should be used to insert data into it.