TimeForge is a full-stack application designed to monitor, analyze, and predict GNSS (Global Navigation Satellite System) clock biases and orbit errors. It utilizes a Transformer-based Deep Learning model for high-precision time series forecasting and features an interactive 3D frontend with an integrated AI agent for natural language data analysis.
- Deep Learning Engine: Custom Transformer Encoder model trained on satellite clock data to predict future clock bias corrections.
- Interactive 3D Visualization: Real-time rendering of satellite constellations (GPS, GLONASS, Galileo, BeiDou) using Three.js and React.
- Data Analysis Dashboard: Visual charts for clock error and orbit error predictions using Recharts/Plotly.
- AI Agent Assistant: Built-in AI chat interface (powered by LangChain & Google GenAI) to query satellite performance, compare errors, and generate summaries.
- Multi-Constellation Support: Filters and visualization for specific satellite groups.
- Framework: React (Vite)
- Styling: Tailwind CSS, PostCSS
- Visualization: Three.js (
three-globe), Lucide React Icons - HTTP Client: Axios
- Server: FastAPI (Python)
- Data Processing: Pandas, NumPy
- AI/LLM Integration: LangChain, Google Gemini API (GenerativeLanguage)
- Framework: PyTorch
- Model: Transformer Encoder with learned Satellite Embeddings
- Utilities: Scikit-Learn (metrics), Astropy (time conversion)
TimeForge/
├── backend/ # FastAPI Server and AI Logic
│ ├── agent_prototype/ # Advanced AI Agent modules (LangChain)
│ ├── data/ # CSV Data storage (e.g., suyash_gandu.csv)
│ ├── server.py # Main entry point for the API
│ └── requirements.txt # Backend dependencies
├── frontend/ # React + Vite User Interface
│ ├── src/
│ │ ├── components/ # UI Components (Galaxy, Globe, Charts)
│ │ ├── App.jsx # Main Application Logic
│ │ └── index.css # Global Styles
│ └── package.json # Frontend dependencies
└── DL/ # Deep Learning Model Training
├── model/ # Transformer model architecture
├── utils/ # Data loaders and metrics
├── train.py # Training script
└── requirements.txt # ML dependencies
If you wish to retrain the model or generate new .pth weights:
cd DL
# Install scientific computing dependencies
pip install -r requirements.txt
# Run the training script
python train.py --epochs 10 --batch_size 32Note: The script saves the model as gnss_transformer_model_with_embeddings.pth.
The backend serves the API and the AI agent.
cd backend
# Install backend dependencies
pip install -r requirements.txt
# Create a .env file
touch .envConfiguration: Ensure you place your data file (e.g., suyash_gandu.csv) inside backend/data/ as referenced in server.py.
Run the Server:
# Starts the FastAPI server
python server.py
# OR using uvicorn directly
uvicorn server:app --reload --port 8000The user interface is built with Vite.
cd frontend
# Install Node dependencies
npm install # or yarn install
# Start the development server
npm start # Runs 'craco start' or 'vite' depending on configThe frontend will launch at http://localhost:3000 by default.
Dashboard: Upon loading, you will see a 3D globe. Click on any satellite (dots on the globe or list on the left) to view its specific details.
Analysis Panel: Clicking a satellite opens the right panel showing:
- Summary: Average clock error and peak orbit error.
- Charts: Click on "Clock Error Prediction" or "Orbit Error Prediction" to expand the graphs.
AI Agent:
- Click the "AI Agent" button in the header or the "Ask AI Agent" button in the satellite panel.
- Type queries like:
"Compare G01 vs G12 orbit error""Find satellites with peak clock error > 2m"
Filtering: Use the dropdown in the header to filter satellites by constellation (GPS, GLONASS, Galileo, BeiDou).
The system uses LangChain and Google Generative AI. To make the AI features work fully in the backend:
- Obtain a Google API Key.
- Add it to your
backend/.envfile:
GOOGLE_API_KEY=your_api_key_hereMIT