S1005403_RisCC/README.md
VALLONGOL 5c0731f0b4 separati gli scenari dalla configurazione
aggiunta la sezione per lam creazione dei file temporanei
sistemato il problema dell'invio dellle flag anche in tgtset
2025-10-22 10:03:43 +02:00

1.9 KiB

target_simulator

A brief description of target_simulator.

Features

  • Feature 1
  • Feature 2

Getting Started

...

Contributing

...

License

...

Note: debug GUI vs simulation command behaviour

The project provides two different code paths for sending target update commands:

  • Debug GUI (SFP Packet Inspector / Simple Target Sender):

    • When you press "Send Target" from the debug window, the GUI sends a tgtset command that includes state qualifiers such as /s (active), /t (traceable) and /r (restart) if the corresponding checkboxes are set.
    • This behaviour is intentional: the debug UI is meant for manual testing and for explicitly toggling target flags.
  • Runtime Simulation:

    • The simulation engine and continuous updates use tgtset commands that contain only the positional/kinematic parameters (range, azimuth, velocity, heading, altitude) and do not include the state qualifiers. This avoids unintentionally changing target lifecycle flags during normal simulation.

Why this matters

  • Historically the code used tgtinit in some debug flows. tgtinit sets some different internal parameters (for example heading_start) and can change target motion in unintended ways. To preserve correct simulation behaviour, the debug window now sends tgtset + qualifiers while the simulation keeps sending tgtset without qualifiers.

Where to look in the code

  • Debug GUI sender: target_simulator/gui/sfp_debug_window.py (_on_send_target).
  • Command builders: target_simulator/core/command_builder.py (build_tgtset_from_target_state, build_tgtset_selective, build_tgtinit).
  • Settings: debug file names and options are in settings.json (section debug) and target_simulator/config.py contains defaults.

If you want the debug UI to exactly mimic runtime behaviour, uncheck the Active/Traceable/Restart checkboxes before sending, or use the runtime APIs to send tgtset without qualifiers.