francoisjosephlacroix / ApparentOrbitalMotionExplorer

0 stars 0 forks source link

Quadrant change #2

Open francoisjosephlacroix opened 10 months ago

francoisjosephlacroix commented 10 months ago

there will be an issue with the way we currently compute angles in the predictor. We assume that the computed future values must be in the same half of the trigonometric circle as the current value. But since we are doing very tiny subsequent predictions, we are going to hit a point where there needs to be a quadrant change and the satellite will be going backwards instead.

We need to add an exception when computing these future values where we pick a sensible angle.

For instance, a sanity check should be to check approximately what angle we expect the satellite to cover in the time step using Kepler time of flight equation. Then see if the expected angle matches the prediction.

For example, if the current angle is 179.9 degrees and we expect to cover 1 degree. We should expect to be at 180.9 degrees and not at 170.1 degrees. The current estimate would probably say 170.1 because it is attempting to force the prediction to be in the same half circle.

francoisjosephlacroix commented 10 months ago

Maybe this is not a problem, let's wait and see. I have manually checked some values at 179.99999999 degrees for a really small time step and it seems to make it to the next half circle. I did the same check at 89.999999 degrees and no problem.