Skip to content

Add weighted functionals, burn time penalty, and Stage 0 angle optimization#10

Draft
Copilot wants to merge 7 commits into
masterfrom
copilot/improve-meteorite-stability
Draft

Add weighted functionals, burn time penalty, and Stage 0 angle optimization#10
Copilot wants to merge 7 commits into
masterfrom
copilot/improve-meteorite-stability

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 26, 2026

Meteorites with degrading measurement accuracy (e.g., Halliday1996 data) need weighted error metrics and better angle space exploration.

Changes

Weighted Functionals

  • Extended BasicFunctional, L1Functional, L2Functional to accept per-measurement weights
  • Added GenerateDecayingWeights(count, decay_factor) with exponential decay: weight[i] = exp(-decay_factor * 3.0 * i/(count-1))
  • Functional name reflects weighting: "L2-Weighted" vs "L2"
// Generate weights with exponential decay (decay_factor ∈ [0,1])
auto weights = BasicFunctional::GenerateDecayingWeights(n_records, 0.5);
L2Functional weighted(meteorite, 1.0, 1.0, weights);  // Later measurements have ~22% weight of first

Burn Time Penalty

  • Added BurnTimePenaltyFunctional wrapper that penalizes burn duration mismatch
  • Penalty: penalty_weight * |t_actual - t_expected| / t_expected

Stage 0 Entry Angle Refinement

  • New preliminary stage: 10K meteoroids, 1-step Adams, dt=0.01s
  • Extracts optimal gamma range from top 100 candidates with 10% margin
  • Reduces Stage 1 search space without accuracy loss

Functional Visualization

  • Added GetStructureDescription() to IFunctional interface
  • TrajectoryVisualizer outputs configuration to functional_info.txt (lambda values, weights, measurement count)

Testing

  • 4 new tests validate weighted behavior and decay generation
  • Pre-existing GoldTests segfault is unrelated to these changes
Original prompt

This section details on the original issue you should resolve

<issue_title>Improving accuracy and stability</issue_title>
<issue_description>As we need to adjust our method for ‘bad’ meteorites, the following ideas should be tested:

  • Use personal weight for each tabular value of velocity/height. It has been shown that the later values are usually much more approximate. A good example for testing this idea is data from Halliday1996.
  • Update IFunctional to allow dynamic creation of complex functionality. In addition, it is worth visualizing the structure of functional values in trajectories.png.
  • Add a penalty to the minimized functional that depends on the moment when the virtual meteorite stops burning. Obviously, if a camera does not detect the real meteorite anymore, our virtual one cannot be lighting as well. And vice versa.
  • Introduce Stage 0. We can adjust the entry angle range and, after that, restart the simulation. This will allow us to reduce the total number of considered virtual meteorites.

Other ideas are welcome.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 6 commits February 26, 2026 12:45
Co-authored-by: m-krivov <46718253+m-krivov@users.noreply.github.com>
Co-authored-by: m-krivov <46718253+m-krivov@users.noreply.github.com>
Co-authored-by: m-krivov <46718253+m-krivov@users.noreply.github.com>
Co-authored-by: m-krivov <46718253+m-krivov@users.noreply.github.com>
…zation

Co-authored-by: m-krivov <46718253+m-krivov@users.noreply.github.com>
Copilot AI changed the title [WIP] Improve accuracy and stability of meteorite simulation methods Add weighted functionals, burn time penalty, and Stage 0 angle optimization Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improving accuracy and stability

2 participants