mldsgp4 model#

This module defines the mldsgp4 class within the dsgp4 library.

class dsgp4.mldsgp4.mldsgp4(normalization_R=6958.137, normalization_V=7.947155867983262, hidden_size=100, input_correction=0.01, output_correction=0.8)#

This class implements the ML-dSGP4 model, where dSGP4 inputs and outputs are corrected via neural networks, better match simulated or observed higher-precision data.

Parameters:#

normalization_R (float): normalization constant for x,y,z coordinates. normalization_V (float): normalization constant for vx,vy,vz coordinates. hidden_size (int): number of neurons in the hidden layers. input_correction (float): correction factor for the input layer. output_correction (float): correction factor for the output layer.

__init__(normalization_R=6958.137, normalization_V=7.947155867983262, hidden_size=100, input_correction=0.01, output_correction=0.8)#

This class implements the ML-dSGP4 model, where dSGP4 inputs and outputs are corrected via neural networks, better match simulated or observed higher-precision data.

Parameters:#

normalization_R (float): normalization constant for x,y,z coordinates. normalization_V (float): normalization constant for vx,vy,vz coordinates. hidden_size (int): number of neurons in the hidden layers. input_correction (float): correction factor for the input layer. output_correction (float): correction factor for the output layer.

forward(tles, tsinces)#

This method computes the forward pass of the ML-dSGP4 model. It can take either a single or a list of dsgp4.tle.TLE objects, and a torch.tensor of times since the TLE epoch in minutes. It then returns the propagated state in the TEME coordinate system. The output is normalized, to unnormalize and obtain km and km/s, you can use self.normalization_R constant for the position and self.normalization_V constant for the velocity.

Parameters:#

tles (dsgp4.tle.TLE or list): a TLE object or a list of TLE objects. tsinces (torch.tensor): a torch.tensor of times since the TLE epoch in minutes.

Returns:#

(torch.tensor): a tensor of len(tsince)x6 representing the corrected satellite position and velocity in normalized units (to unnormalize to km and km/s, use self.normalization_R for position, and self.normalization_V for velocity).

load_model(path, device='cpu')#

This method loads a model from a file.

Parameters:#

path (str): path to the file where the model is stored. device (str): device where the model will be loaded. Default is ‘cpu’.