Attenzione! Javascript è disabilitato

The Sky Of Baronie

Welcome to this site, dedicated to the beauty of the sky of Sardinia...

Versione inglese

ASTROJS: Introduction

Sistema solare

(Da Wikipedia, l'enciclopedia libera.)

On this page I have included a number of functions (scripts) that I have created in JavaScript. These are mainly of an astronomical subject but some of these can be used on any kind of site.
All the functions have been inserted in the Astrojs js library file.
WARNING! For the correct use of the Astrojs library, the internal clock of your computer needs to mark the exact time; on this site: Greenwich Mean Time, you will find the hour in Greenwich Mean Time (G.M.T.).
Using the link provided, adjust the internal clock of your computer as precisely as possible, taking account of our time zone and daylight saving time when it is in force.

How to connect the astrojs library to a web page.

1st method: Download the archive: ASTROJS - (not available yet, use method 2). Do not change the name of the file and do not insert it into sub files, but only in the main file of your site; this is done to avoid having to change the script's search path.
After having inserted the astrojs file, glue the listing 1 in the <head></head> section, under the <title> tag of your web page.

Listing 1

<script type="text/javascript" src="astrojs/astrojs.js"></script>

2nd Method: If you do not want to download the astrojs file but you want to use the library, copy and past list 2 in the <head></head> section of your web page. My advice to you is ot use this second list, at least at the beginning, in order to test the functions found in the library and after, download the archive file permanently. Method 2 has the advantage of making a file that is always updated availabile; the only disadvantage is that the service may not be available, but this happens in rare cases.

Listing 2

<script type="text/javascript" src=""></script>

After having complete this second insertion, select the list (3) and glue it into <body> section of the page. Personally, I prefer to put this list at the bottom of the page, just before the closing </body> tag but always before a visit counter.

Listing 3:

 <!--  List code (3) astrojs.js Library - Start Code      -->

 <script type="text/javascript">


   // -->

 <!--  List code (3) astrojs.js Library - End Code     -->

After pasting just one of lists 1-2 and 3, your page is ready to interact with the Astrojs functions.

List and description of functions found in ASTROJS.JS

To ease the task of entering, for every function I have prepared a brief description, how to use the function and the parameters needed for its correct functioning, including the code to copy and paste. Below I have included some of the functions in the library, some of these are still not usable since I still have not prepared an accurate description.

ASTROJS list of functions grouped by subject:

In many pages of this site, I entered the code ready to be copied, in particular in the Ephemeris section found in the navigation menu.

Free use of ASTROJS

The use of the Astrojs.js library is free; we only ask that you do not delete the name of the author (present in the list) and to not consider me liable for any errors or damages resulting from the use of these macros under no circumstances..
Reports of bugs or suggestions for new macros are always welcome. Have fun!

The Download of Astrojs is still not available, use the 2nd method to access the library.

Riferimenti bibliografici:
JEAN MEEUS - Astronomia con il computer. ( Hoepli-1990 ) - PETER DUFFETT-SMITH -Astronomia pratica. ( Sansoni Studio 1981 )
FRANCESCO ZAGAR -Astronomia sferica e teorica ( Zanichelli 1988 )

Copyright ©2009 - Salvatore Ruiu
All Rights Reserved.

Questo sito è Online da dicembre 2009 || Ultima modifica: 10-Dicembre 2009 || Questa pagina web rispetta le direttive del W3C | CSS 2.1 | XHTML 1.0