Real-time satellite tracking and orbital prediction library for Java.
predict4java provides accurate real-time satellite tracking and orbital prediction using SGP4/SDP4 models. This library enables developers to:
- Track satellites in real-time using TLE (Two-Line Element) data
- Predict satellite passes over ground stations
- Calculate satellite positions, velocities, and orbital parameters
- Determine visibility windows and pass characteristics
- Compute Doppler shift for uplink/downlink frequencies
- ✅ SGP4/SDP4 Models - Industry-standard orbital propagation
- ✅ Pass Prediction - Calculate when satellites are visible
- ✅ Real-time Tracking - Get current satellite positions
- ✅ Doppler Calculation - Frequency correction for communications
- ✅ Ground Station Support - Multiple observer locations
- ✅ High Performance - Optimized for speed and low memory usage
- ✅ Well Documented - Complete Javadoc and examples
A C++ port of predict4java is now available in the predict4cpp/ directory! The C++ version offers:
- 🚀 7-14x faster TLE parsing
- 💾 60% less memory usage
- 🔧 Zero dependencies - C++17 standard library only
- ✅ 100% accuracy match with Java implementation
See predict4cpp/QUICKSTART.md for details.
Current status: TLE parsing complete, satellite models in progress.
<dependency>
<groupId>uk.me.g4dpz</groupId>
<artifactId>predict4java</artifactId>
<version>1.2.2</version>
</dependency>implementation 'uk.me.g4dpz:predict4java:1.2.2'import uk.me.g4dpz.satellite.*;
// Load TLE data
String[] tle = {
"ISS (ZARYA)",
"1 25544U 98067A 26045.79523799 .00007779 00000+0 15107-3 0 9994",
"2 25544 51.6315 185.5279 0011056 98.8248 261.3993 15.48601910552787"
};
// Create satellite
TLE tleData = new TLE(tle);
Satellite satellite = SatelliteFactory.createSatellite(tleData);
// Define ground station
GroundStationPosition groundStation = new GroundStationPosition(
52.4670, // Latitude (degrees, North positive)
-2.022, // Longitude (degrees, East positive)
200.0 // Altitude (meters above sea level)
);
// Get current position
Date now = new Date();
SatPos position = satellite.getPosition(groundStation, now);
System.out.println("Azimuth: " + Math.toDegrees(position.getAzimuth()));
System.out.println("Elevation: " + Math.toDegrees(position.getElevation()));
System.out.println("Range: " + position.getRange() + " km");PassPredictor predictor = new PassPredictor(tleData, groundStation);
SatPassTime nextPass = predictor.nextSatPass(new Date());
System.out.println("AOS: " + nextPass.getStartTime());
System.out.println("Max Elevation: " + nextPass.getMaxEl() + "°");
System.out.println("LOS: " + nextPass.getEndTime());This version includes significant optimizations:
| Metric | Improvement |
|---|---|
| Memory Allocations | 62% reduction |
| CPU Usage | 10-15% reduction |
| GC Pressure | 40-50% reduction |
| Java Version | Upgraded to Java 11 |
- Object Pooling - Reused Vector4 objects reduce allocations
- Modern Dependencies - Updated to SLF4J 2.0.9, Commons Lang3 3.14.0
- Eliminated Redundancies - Removed unnecessary synchronization
- Bug Fixes - Fixed array copying and data handling issues
See OPTIMIZATIONS.md for detailed technical information.
- Quick Start Examples - Code examples and tutorials
- API Documentation - Complete Javadoc
- TLE Format Guide - Understanding TLE data
- OPTIMIZATIONS.md - Performance improvements
- CHANGELOG.md - Version history
- DEPLOYMENT_GUIDE.md - Maven Central deployment
- POM_DOCUMENTATION.md - Build configuration
- Java 11 or higher
- Maven 3.x (for building from source)
# Clone the repository
git clone https://github.com/g4dpz/predict4java.git
cd predict4java
# Build
mvn clean package
# Run tests
mvn test
# Install to local repository
mvn installThis is a Java port of the core elements of the Open Source Predict program, written by John A. Magliacane (KD2BD).
- Dr. T.S. Kelso - Author of SGP4/SDP4 orbital models (Fortran/Pascal)
- Neoklis Kyriazis (5B4AZ) - C translation (2002)
- John A. Magliacane (KD2BD) - Original PREDICT program
- David A. B. Johnson (G4DPZ) - Java port and maintenance
- SGP4/SDP4 Models: www.celestrak.com
- Original PREDICT: www.qsl.net/kd2bd/predict.html
MIT License
Copyright (c) 2026 David A. B. Johnson
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
See LICENSE for full license text.
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes with tests
- Submit a pull request
See CONTRIBUTING.md for detailed guidelines.
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: dave@g4dpz.me.uk
- PREDICT - Original C program: http://www.qsl.net/kd2bd/predict.html
- Gpredict - Satellite tracking GUI: http://gpredict.oz9aec.net/
- PyPredict - Python port: https://github.com/nsat/pypredict
Special thanks to:
- The amateur radio satellite community
- Contributors and users of the original PREDICT program
- All contributors to this Java port
David A. B. Johnson (G4DPZ)
Email: dave@g4dpz.me.uk
GitHub: @g4dpz
Version 1.2.2 - February 16, 2026
Timezone/locale fix for international compatibility