+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Copying and pasting an XRTF trigger study +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Trigger studies may be repeated by means of "copy and paste" to optimise planning. An initial trigger study and its corresponding response study is created and saved. This may then be copied and pasted. The procedure involves copying the hunter study (as usual - a mechanism already exists), and then also creating and saving a new response entry. The new response study will be a copy of the original except for the tags; + response_id - needs to be unique (incremented) + s/c coords - retrieved from pointing file at new cursor time + solar coords - calculated at new time (from mip/yip and s/c pointing) It's important that the mip and yip values are retained. Hunter Study Pointing: +++++++++++++++++++++ Mip and yip values will be retained from the original response study (they are the values actually used onboard, and only one instance of an xrtf table is available even though there may be multiple trigger studies). The spacecraft pointing will be updated from the ORe-point file. From these two values, xcen and ycen will be calculated and saved. Response Study Pointing: +++++++++++++++++++++++ Same as Hunter Study Pointing (above) Code path: +++++++++++++++++++++++ 1. eis_copy_tl_gui::apply (copy gui) Self.parentClass->apply_copy_tl_entries, tStart[0], tStop[0], tNew[0] 2. eis_mk_plan_gui::apply_copy_tl_entries, tStart, tStop, tNew eis_mk_plan_gui::savePlanToDatabase calls eis_mk_plan_gui::save_response_study , trigger calls eis_mk_plan_gui::save_copied_hunter_study , temp Test Case: +++++++++++++++++++++++ Response mip/yip checked by independently inserting this study on the TL. Hunter Study id = 1 Response Study id = 2 --Original-- Hunter Study Response Study time = 03:00 19-Oct-2013 seq_id = 36814 resp_id = 365 x/y = 762.79,-431.84 x/y = 762.79,-431.84 sc_x/y = 762.79,-431.84 sc_x/y = 762.79,-431.84 mip/yip = 1040,306 mip/yip = 1200,306 --Copied-- Hunter Study Response Study time = 05:00 19-Oct-2013 seq_id = 36815 resp_id = 366 x/y = 770.89,-430.37 x/y = 770.89,-430.37 sc_x/y = 770.89,-430.37 sc_x/y = 770.89,-430.37 mip/yip = 1040,306 mip/yip = 1200,306 Pressing the "Check Trigger/Response Properties" button prints the following message; ************************************************* Checking 2 Trigger/Response Studies.... 1 -> XRTF Trigger on TL seq_id 36814 is OK 2 -> XRTF Trigger on TL seq_id 36815 is OK Checking for duplicate tables... ... confirm one instance of each table. Trigger/Response Events are Valid. Continuing... ********************************************************