Hello, I have an issue with using a propagator with a Kalman filter, where I input TDM data (which I essentially fabricate myself).
I’ve set it up like this:
- I have SP3 data (in the ECEF reference frame) every 5 minutes.
- I initialize the initial state using a TLE propagator.
- I use numerical propagator with perturbations
- I update the Kalman filter using data generated by this code (ICRS, ICRF):
from astropy.coordinates import EarthLocation, SkyCoord, CartesianRepresentation
from astropy import units as u
from astropy.time import Time
import numpy as np
X = propagated_position.getX() # Współrzędna X w metrach
Y = propagated_position.getY() # Współrzędna Y w metrach
Z = propagated_position.getZ() # Współrzędna Z w metrach
eci_coords = CartesianRepresentation(X * u.m, Y * u.m, Z * u.m)
from astropy.time import Time
time = Time('2024-01-20T02:15:32.321332', format='isot', scale='utc')
print(time)
skycoord = SkyCoord(eci_coords, frame='icrs', obstime=time)
ra = skycoord.ra
dec = skycoord.dec
print(f"(RA): {ra}")
print(f"(Dec): {dec}")
Below are the key fragments related to the Kalman filter. I’d like to ask whether this approach is correct for using RA/DEC data because, so far, the discrepancies are significant.
- Propagation alone allows errors within a few meters over a 5-minute horizon.
- Using the Kalman filter this way, the errors grow to hundreds of kilometers!
integrator_builder = DormandPrince853IntegratorBuilder(min_step, max_step, position_tolerance)
propagator_builder = NumericalPropagatorBuilder(
initial_state.getOrbit(), integrator_builder, PositionAngleType.MEAN, position_tolerance
)
cov_vel=30.0
cov_pos=100.0
covariance_matrix = Array2DRowRealMatrix(6, 6)
covariance_matrix.setEntry(0, 0, cov_pos) # X
covariance_matrix.setEntry(1, 1, cov_pos) # Y
covariance_matrix.setEntry(2, 2, cov_pos) # Z
covariance_matrix.setEntry(3, 3, cov_vel) # VX
covariance_matrix.setEntry(4, 4, cov_vel) # VY
covariance_matrix.setEntry(5, 5, cov_vel) # VZ
process_noise = ConstantProcessNoise(covariance_matrix, covariance_matrix)
kalman_builder = KalmanEstimatorBuilder()
kalman_builder.addPropagationConfiguration(propagator_builder, process_noise)
kalman_estimator = kalman_builder.build()
for index, observation in enumerate(observations):
if(index<130):
utc = TimeScalesFactory.getUTC()
date_str, ra, dec = observation
date = parse_date(date_str, utc)
print(date_str, ra, dec)
ra_rad = math.radians(ra)
dec_rad = math.radians(dec)
# Tworzenie pomiaru kątowego
angular_measurement = AngularRaDec(
ground_station, frame, date, [ra_rad, dec_rad], [2.0, 2.0], [1.0, 1.0], observable_satellite
)
kalman_estimator.estimationStep(angular_measurement)
estimated_state = kalman_estimator.getPhysicalEstimatedState()
I tried different matrixes settings also
I’d like to point out that when I fed SP3 data into the Kalman filter, the error was very small (after all, I was comparing it against the same data used for estimation). However, I can’t achieve the same level of accuracy when using RA/DEC data.
Any guidance or insights on whether this methodology is valid would be greatly appreciated. Thank you!