Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TSAT delayed with improved TOBT #2

Open
Phil061995 opened this issue Apr 15, 2023 · 3 comments
Open

TSAT delayed with improved TOBT #2

Phil061995 opened this issue Apr 15, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@Phil061995
Copy link

It still happens that if the TOBT is changed and still before the TSAT, the TSAT is delayed.

This should not happen, the TSAT should only be improved if possible in this case.

Example what had happened:
TOBT = 1240 | TSAT = 1255
New TOBT = 1250 | new TSAT = 1305

In this case the TSAT should stay at 1255, but might improve to 1250.

@Frenkii Frenkii added the bug Something isn't working label Apr 15, 2023
@Frenkii
Copy link
Contributor

Frenkii commented Apr 16, 2023

The question is, where to change it.
Either inside the plugin or inside the backend?

From the plugin I noticed this:

root["callsign"] = callsign;
root["vacdm"] = Json::Value();
root["vacdm"]["tobt"] = Airport::timestampToIsoString(tobt);
root["vacdm"]["tsat"] = Airport::timestampToIsoString(types::defaultTime);
if (false == manualTobt)
  root["vacdm"]["tobt_state"] = "NOW";
root["vacdm"]["ttot"] = root["vacdm"]["tsat"].asString();
root["vacdm"]["asat"] = root["vacdm"]["tsat"].asString();
root["vacdm"]["aobt"] = root["vacdm"]["tsat"].asString();
root["vacdm"]["atot"] = root["vacdm"]["tsat"].asString();

After each TOBT-update we set the TSAT to -1. Therefore the List in Euroscope gets empty for user feeedback reasons.

But if the TSAT is -1, the backend will calculate a new one.

IMO we have to decide wheter we change the plugin behaviour or the backend logic.
Maybe @dotFionn, and @LeoKle can say something about.

@svengcz
Copy link

svengcz commented Apr 18, 2023

Should be done inside the plugin.

We agreed on the general architecture that the plugin defines the timestamps due to UTC vs TAI conflicts between the backend and the frontend. Otherwise can it happen that the plugin and the backend expect different behaviours if the current time and TSAT are close enough.

Expected behaviour:
Plugin keeps TSAT if current time < TSAT, otherwise reset TSAT, too
Plugin shows TSAT with a star, of TOBT is -1 and TSAT != -1.

Instead of hiding TSAT is it better to show it with a flag to have a visualization that shows the real internal data.

@svengcz svengcz self-assigned this Apr 18, 2023
@Phil061995
Copy link
Author

This issue still happens quiet often and is one of the most annoying ones, as pilots are sometimes ready before their TSAT window.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants