About CosmicLens
CosmicLens is a web application that allows users to explore NASA's vast collection of space imagery. Using NASA's open APIs, this project provides two main features:
- Mars Rover Photos: View photos captured by NASA's Mars rovers (Curiosity, Spirit, and Opportunity) on specific Earth dates.
- Astronomy Picture of the Day (APOD): Discover NASA's daily curated image or video, complete with a detailed explanation.
About NASA's Mars Rovers
NASA's Mars rovers are robotic explorers designed to study the Martian surface.
- Curiosity: Launched in 2011, Curiosity is the largest rover, exploring Gale Crater to study Mars' habitability.
- Spirit: Launched in 2003, Spirit operated until 2010, exploring Gusev Crater.
- Opportunity: Also launched in 2003, Opportunity explored Meridiani Planum until 2018, setting records for distance traveled.
How to Use CosmicLens
CosmicLens is designed to be intuitive, allowing you to explore Mars Rover photos and NASA's Astronomy Picture of the Day with ease. Below are detailed instructions for using the app, with a focus on the Mars Rover Photos feature.
Using the Mars Rover Photos Feature
- Navigate to the Mars Rover Page: Open the main page by loading
index.html
in your browser or clicking the "Mars Rover" link in the navigation bar. - Select a Rover: In the centered form, choose a rover from the dropdown menu:
- Curiosity: Active since August 6, 2012, exploring Gale Crater for signs of past habitability.
- Spirit: Operated from January 4, 2004, to March 22, 2010, in Gusev Crater.
- Opportunity: Operated from January 25, 2004, to June 10, 2018, in Meridiani Planum.
- Choose an Earth Date: Use the date picker to select a specific Earth date. Ensure the date falls within the rover’s operational period:
- Curiosity: After August 6, 2012.
- Spirit: January 4, 2004 – March 22, 2010.
- Opportunity: January 25, 2004 – June 10, 2018.
- Fetch Photos: Click the black "Send" button to query NASA's Mars Rover Photos API. If photos are available, a responsive grid will appear, displaying images in 1–4 columns depending on your screen size. Each image is styled with rounded corners and a shadow effect.
- Handle No Results: If no photos are found (e.g., due to an invalid date or no data), an alert will prompt you to try a different rover or date. The photo grid remains hidden until valid data is fetched.
- Explore Photos: Scroll through the grid to view high-resolution Mars images captured by the selected rover on the chosen date.
Using the Astronomy Picture of the Day (APOD)
Click the "Picture of the Day" link in the navbar to visit apod.html
. The page automatically fetches and displays NASA's daily curated image or video, along with its title and a detailed explanation, using the APOD API. No user input is required.
Navigating the App
Use the fixed navigation bar at the top to switch between pages:
- Mars Rover: Access the photo fetcher.
- Picture of the Day: View the daily APOD.
- About: Learn about the app and rovers.
Tips for Best Experience
- Date Selection: Experiment with different dates within a rover’s operational period to find available photos.
- Internet Connection: Ensure a stable connection, as the app relies on NASA’s APIs.
Connect with the Creator
Follow the creator of CosmicLens on social media for updates and more projects: