starTracker is an application that allows users to capture a photo or select an image from the gallery and it returns an image with stars surrounded by circles, with each star accompanied by its ID number. To find out the name of a star, users can enter its ID number and receive its corresponding name. All the photos are saved, allowing users to revisit the stars they have already discovered.
There are two parts to the algorithm:
Identifying world coordinates system (WCS) and converting pixel coordinates to world coordinates (RA, DEC).
The algorithm used to identify the stars is based on the Plate Solution algorithm, implemented by the Astrometry.net project (https://astrometry.net/). The algorithm receives an image and coordinates of the stars in the image in pixel units and returns the coordinates of the stars in the image in degrees. The algorithm is based on the following steps:
- The algorithm receives an image the coordinates of the stars in the image achieved by DAOStarFinder from photoutils python library.
- The algorithm finds the WCS of the image using blind astrometric solving without initial guess based on image metadata (e.g., time, location, orientation, etc.).
- Iteratively, the algorithm finds the transformation matrix between the stars in the image and the stars in the catalog.
- Update the WCS guess and repeat step 3 until the error is less than some fixed threshold.
- Convert the pixel coordinates of the stars in the image to world coordinates (RA, DEC).
- Extract the stars from the catalog that are within a distance of 2.0 arcmin from the points found in the previous step. This is implemented using the "find_region" function from the Simbad Python library.
- Find the stars in the catalog that are closest to the stars in the image by utilizing the k-d tree algorithm for efficient search. This step is implemented by the function "match_coordinates_sky" from the astropy Python library.
Astrometry.net: Astrometry.net is a powerful astrometric engine that can identify celestial objects in astronomical images.
Astropy Project: Astropy is a community-driven library for astronomy in Python, providing various utilities and tools for working with astronomical data.
Simbad: SIMBAD is an astronomical database that provides information on astronomical objects, including their coordinates, magnitudes, and spectra.
To use the starTracker application, follow these steps:
- Clone the repository's:
1.1 git clone https://github.com/einav242/starTracker.git
1.2 git clone https://github.com/einav242/project_new_space.git - Open "starTracker" project in Android Studio.
- Open the build.gradle file at the application level in Android Studio and modify the following line:
python{
buildPython "C:/Users/e2402/AppData/Local/Microsoft/WindowsApps/python3.9.exe"
}
to the Python path on your computer. - Inside entities folder enter to the serverAPI file and change line 19:
.baseUrl(<your server network address>).client(okHttpClient).build();to your network ip address. - Inside res-> xml enter to the network_security_config.xml file and add the following line:
<domain includeSubdomains="true"><your server network address></domain> - Build and run the application on an Android device or emulator.
- In a separate open the project directory named "project_new_space" in a Python development environment, such as PyCharm and run the following command in the terminal to start the server:
uvicorn server:app --host <server network address> --port 8080 --reload
or
python -m uvicorn server:app --host <server network address> --port 8080 --reload
Note. Verify that the phone and the server are connected to the same network (Wi-Fi, Ethernet, eg.)
- Add image– After clicking on this button, you can choose an image from the gallery or take a photo yourself.
Then, you can click on the "Algorithm" button to see the identified stars.
In the next window, you can choose to delete, save, or take another photo. If you select "save," you will proceed to the next window where you can enter the star's ID using the keyboard, and its corresponding name will be displayed next to it.
Also, you can see the names of all the stars by clicking on the "Show all the names" button.
- your discoverd stars– By clicking on this button, you can view all the captured star images. You can delete an image by using the "Delete" button and find the names of the stars by clicking on the "Search by ID" button.