commit 605597e98bf5aa6bc1124ff9626c6107ca195c32 Author: Oleksandr Bezdieniezhnykh Date: Sat Nov 1 18:47:44 2025 +0200 00_problem statement done diff --git a/docs/00_problem/acceptance_criteria.md b/docs/00_problem/acceptance_criteria.md new file mode 100644 index 0000000..3c19d3f --- /dev/null +++ b/docs/00_problem/acceptance_criteria.md @@ -0,0 +1,2 @@ +System should find out GPS of centers of all the photos from the flight within error no more than 100 meters in comparison to the real GPS +System should find out GPS of centers of 70% of the photos from the flight within error no more than 30 meters in comparison to the real GPS diff --git a/docs/00_problem/input_data/AD000001.jpg b/docs/00_problem/input_data/AD000001.jpg new file mode 100644 index 0000000..c8e39c3 Binary files /dev/null and b/docs/00_problem/input_data/AD000001.jpg differ diff --git a/docs/00_problem/input_data/AD000002.jpg b/docs/00_problem/input_data/AD000002.jpg new file mode 100644 index 0000000..02a7b46 Binary files /dev/null and b/docs/00_problem/input_data/AD000002.jpg differ diff --git a/docs/00_problem/input_data/AD000003.jpg b/docs/00_problem/input_data/AD000003.jpg new file mode 100644 index 0000000..7c8b9fe Binary files /dev/null and b/docs/00_problem/input_data/AD000003.jpg differ diff --git a/docs/00_problem/input_data/AD000004.jpg b/docs/00_problem/input_data/AD000004.jpg new file mode 100644 index 0000000..fb8c882 Binary files /dev/null and b/docs/00_problem/input_data/AD000004.jpg differ diff --git a/docs/00_problem/input_data/AD000005.jpg b/docs/00_problem/input_data/AD000005.jpg new file mode 100644 index 0000000..72e6ff4 Binary files /dev/null and b/docs/00_problem/input_data/AD000005.jpg differ diff --git a/docs/00_problem/input_data/AD000006.jpg b/docs/00_problem/input_data/AD000006.jpg new file mode 100644 index 0000000..f85dce8 Binary files /dev/null and b/docs/00_problem/input_data/AD000006.jpg differ diff --git a/docs/00_problem/input_data/AD000007.jpg b/docs/00_problem/input_data/AD000007.jpg new file mode 100644 index 0000000..dd9f516 Binary files /dev/null and b/docs/00_problem/input_data/AD000007.jpg differ diff --git a/docs/00_problem/input_data/AD000008.jpg b/docs/00_problem/input_data/AD000008.jpg new file mode 100644 index 0000000..334dae4 Binary files /dev/null and b/docs/00_problem/input_data/AD000008.jpg differ diff --git a/docs/00_problem/input_data/AD000009.jpg b/docs/00_problem/input_data/AD000009.jpg new file mode 100644 index 0000000..a2e8e9b Binary files /dev/null and b/docs/00_problem/input_data/AD000009.jpg differ diff --git a/docs/00_problem/input_data/AD000010.jpg b/docs/00_problem/input_data/AD000010.jpg new file mode 100644 index 0000000..3b285c8 Binary files /dev/null and b/docs/00_problem/input_data/AD000010.jpg differ diff --git a/docs/00_problem/input_data/AD000011.jpg b/docs/00_problem/input_data/AD000011.jpg new file mode 100644 index 0000000..d465e5e Binary files /dev/null and b/docs/00_problem/input_data/AD000011.jpg differ diff --git a/docs/00_problem/input_data/AD000012.jpg b/docs/00_problem/input_data/AD000012.jpg new file mode 100644 index 0000000..f66aeb1 Binary files /dev/null and b/docs/00_problem/input_data/AD000012.jpg differ diff --git a/docs/00_problem/input_data/AD000013.jpg b/docs/00_problem/input_data/AD000013.jpg new file mode 100644 index 0000000..a78fb34 Binary files /dev/null and b/docs/00_problem/input_data/AD000013.jpg differ diff --git a/docs/00_problem/input_data/AD000014.jpg b/docs/00_problem/input_data/AD000014.jpg new file mode 100644 index 0000000..90acb43 Binary files /dev/null and b/docs/00_problem/input_data/AD000014.jpg differ diff --git a/docs/00_problem/input_data/AD000015.jpg b/docs/00_problem/input_data/AD000015.jpg new file mode 100644 index 0000000..5078fc9 Binary files /dev/null and b/docs/00_problem/input_data/AD000015.jpg differ diff --git a/docs/00_problem/input_data/AD000016.jpg b/docs/00_problem/input_data/AD000016.jpg new file mode 100644 index 0000000..9a9063c Binary files /dev/null and b/docs/00_problem/input_data/AD000016.jpg differ diff --git a/docs/00_problem/input_data/AD000017.jpg b/docs/00_problem/input_data/AD000017.jpg new file mode 100644 index 0000000..f8c349d Binary files /dev/null and b/docs/00_problem/input_data/AD000017.jpg differ diff --git a/docs/00_problem/input_data/AD000018.jpg b/docs/00_problem/input_data/AD000018.jpg new file mode 100644 index 0000000..5e769d6 Binary files /dev/null and b/docs/00_problem/input_data/AD000018.jpg differ diff --git a/docs/00_problem/input_data/AD000019.jpg b/docs/00_problem/input_data/AD000019.jpg new file mode 100644 index 0000000..884277b Binary files /dev/null and b/docs/00_problem/input_data/AD000019.jpg differ diff --git a/docs/00_problem/input_data/AD000020.jpg b/docs/00_problem/input_data/AD000020.jpg new file mode 100644 index 0000000..22196e0 Binary files /dev/null and b/docs/00_problem/input_data/AD000020.jpg differ diff --git a/docs/00_problem/input_data/coordinates.yaml b/docs/00_problem/input_data/coordinates.yaml new file mode 100644 index 0000000..62fab2b --- /dev/null +++ b/docs/00_problem/input_data/coordinates.yaml @@ -0,0 +1,2 @@ +AD000005.jpg 48.273997, 37.379828 + diff --git a/docs/00_problem/problem_description.md b/docs/00_problem/problem_description.md new file mode 100644 index 0000000..5c0860e --- /dev/null +++ b/docs/00_problem/problem_description.md @@ -0,0 +1,3 @@ +We have a lot of images taken from wing-type UAV by camera with at least full hd resolution. Resolution of each photo could be up to 6200*4100 for the whole flight, but for other flight could be FullHd, f.e. +Photos are taken and named consecutively within 100 meters distance between each other. +We know only starting GPS coordinates. We need to determine coordinates of centers of each image. And also coordinates of the center of any object on these photos. \ No newline at end of file diff --git a/docs/00_problem/restrictions.md b/docs/00_problem/restrictions.md new file mode 100644 index 0000000..0b57dbf --- /dev/null +++ b/docs/00_problem/restrictions.md @@ -0,0 +1,9 @@ +Photos are taken by only airplane type UAVs. +Photos are taken by the camera pointing downwards and fixed, but it is not autostabilize +The flying range is restricted by eastern and southern part of Ukraine (To the left of Dnipro river) +The image resolution could be from FullHd to 6252*4168 +Altitude is prefefined and no more than 1km +Flights are done mostly in sunny weather +We can use satellite providers, but we're limited right now to Google Maps, which could be possibly outdated for some regions +Number of photos could be up to 3000, usually in 500-1500 range +During the flight UAV can make sharp turns, so that it is possible that next photo is absolutely different from the previous one (no same objects), but it is rather exception than the rule diff --git a/docs/_metodology/01_research_phase.md b/docs/_metodology/01_research_phase.md new file mode 100644 index 0000000..2b57182 --- /dev/null +++ b/docs/_metodology/01_research_phase.md @@ -0,0 +1,106 @@ +# 1. Research phase + + +## 1.1 **👨‍💻Developers**: Problem statement + Discuss the problem and create in the `docs/00_problem` next files: + - `problem_description.md`: Our problem to solve with the end result we want to achieve. For example: + We have wing type UAV (airplane). It should fly autonomously to predetermined GPS destination. During the flight it is relying on the signal form GPS module. + But when adversary jam or spoof GPS, then UAV either don't know where to fly, or fly to the wrong direction. + So, we need to achieve that UAV can fly correctly to the destination without GPS or when GPS is spoofed. We can use the camera pointing downward and other sensor data like altitude, available form the flight controller. Airplane is running Ardupliot. + - `restrictions.md`: Restrictions we have in real world. For example: + - We're limiting our solution to airplane type UAVs. + - Additional weight it could take is under 1 kg. + - The whole system should cost under $2000. + - The flying range is restricted by eastern and southern part of Ukraine. And so on. + - `acceptance_criteria.md`: Acceptance criteria for the solution. For example: + - UAV should fly without GPS for at least 30 km in the sunshine weather. + - UAV shoulf fly with maximum mistake no more than 40 meters from the real GPS + - UAV should fly correctly with little foggy weather with maximum mistake no more than 100 meters from the real GPS + - UAV should fly for minimum of 500 meters with missing inernal Satellite maps and the drifting error should be no more than 50 meters. + - `docs/00_problem/input_data`: Put to this folder all the necessary input data for the further tests. For example: + - orthophoto images from the UAV for the analysis + - initial gps + - ... + +## 1.2 **✨AI Research**: Research acceptance criteria in great detail + Form the next prompt by replacing *.md with corresponding content and run it in DeepResearch tool (Gemini, ChatGPT, or other) + **📝prompt:** + For the problem `problem_description.md` check how realistic these acceptance criteria: + `acceptance_criteria.md` + Check how critical is each criteria. Also find out more acceptance criteria for this specific domain. + Research impact of each value in acceptance criteria to the whole system quality. + Assess acceptable ranges for each value in each acceptance criteria in the state of the art solutions, and propose corrections in form: + - state of the art solutions' value ranges : our value ranges + + Form the new acceptance criteria based on your research. + + **👨‍💻Developers**: Revise the result, discuss them and overwrite `docs/00_problem/acceptance_criteria.md` + + +## 1.3 **✨AI Research**: Research the problem in great detail + Form the next prompt by replacing *.md with corresponding content and run it in DeepResearch tool (Gemini, ChatGPT, or other) + **📝prompt:** + Research the problem: + `docs/00_problem/problem_description.md` + We need to achieve this goal: + `docs/00_problem/goal.md` + Final solution should meet the acceptance criteria: + `docs/00_problem/acceptance_criteria.md` + The whole system has following limitations: + `docs/00_problem/restrictions.md` + Find out all the state of the art solutions for this problem and produce the resulting solution draft in the next format: + - Product solution description + - Architecture approach that meet restrictions and acceptance criteria + - Testing strategy. Research the best approaches to cover all the acceptance criteria, functional and non-functional tests + + **👨‍💻Developer**: Research the problem as well, and add solution details to the draft. Store it to the `docs/01_solution/solution_draft_01.md` + + +## 1.4 **✨AI Research**: Solution draft assessment + Form the next prompt by replacing *.md with corresponding content and run it in DeepResearch tool (Gemini, ChatGPT, or other) + **📝prompt:** + In the solution here: + `docs/01_solution/solution_draft_xx.md` + find out all the possible weak points and problems. Address them and find out ways to solve them. Based on your findings, form new solution draft in the same format. + + **👨‍💻Developer**: Research by yourself as well - how to solve additional problems which AI figured out, and add them to the result. Store the result draft to the `docs/01_solution/solution_draft_xx+1.md`, and repeat the process. When the next solution wouldn't differ much from the previous one, store the last draft as `docs/01_solution/solution.md` + +## 1.5 **🤖📋AI plan**: Solution Decomposition + **📝prompt:** + Decompose the solution `@docs/01_solution/solution.md` to the components. + Store description of each component to the file `docs/02_components/[##]_[component_name]/spec.md` with the next structure: + - Component Name + - Detailed description + - API methods, for each method: + - Name + - Input + - Output + - Description + - Test cases for the method + - Integration tests for the component if needed. + + Generate draw.io components diagram shows relations between components. + Do not put any code yet, only names, input and output. + + Also read `@docs/00_initial/acceptance_criteria.md` and compose tests according to test strategy to cover all the criteria and store them to the files + `docs/03_tests/[##]_[test_name]_spec.md` with the next structure: + - Summary + - Detailed description + - Preconditions for tests + - Steps: + - Step1 - Expected result1 + - Step2 - Expected result2 + ... + - StepN - Expected resultN + + Do not put any code yet. Ask as many questions as needed. + + **👨‍💻Developer**: Answer the questions AI asked, put as many details as possible + + ## 1.6 **🤖📋AI plan**: Business Requirement generation + From the initial requirements above generate Jira epics: + - Ask the Jira project key and latest created jira task number. For example AZ-412 + - Access the solution `@docs/01_solution/solution.md` and description of each component in the files `docs/02_components/[##]_[component_name]/spec.md` + - Generate Jira Epics from the Components + - Ensure each epic has clear goal and acceptance criteria, verify the criteria with `@docs/00_initial/acceptance_criteria.md` + - Generate draw.io components diagram based on previous diagram shows relations between components and Jira Epic numbers corresponding to each component. diff --git a/docs/_metodology/02_development_phase.md b/docs/_metodology/02_development_phase.md new file mode 100644 index 0000000..41ef7b4 --- /dev/null +++ b/docs/_metodology/02_development_phase.md @@ -0,0 +1,41 @@ +# 2. Development phase + +## 2.1 **🤖📋AI plan**: Component Decomposition + For each component in `docs/02_components` do next: + **📝prompt:** + Decompose `@docs/02_components/[##]_[component_name]/spec.md` to the features. If component is simple enough, make only 1 feature, if complex - separate per features. Feature can contain 0 or more APIs. Create `docs/02_components/[##]_[component_name]/[##]_[feature_name]_feature.md` with the next structure: + - Name + - Description + - Component APIs it implements if any + - External tools and service it uses for implementation if any + - Internal methods and its purposes + - Unit tests + - Integration tests + + Do NOT generate any code yet, only brief explanations what should be done. + Ask as many questions as needed. + + **👨‍💻Developer**: Answer the questions AI asked, put as many details as possible + +## 2.2 **🤖AI agent**: Feature implementation + For each component in `docs/02_components/[##]_[component_name]/` folder do next: + **📝prompt:** + Read component description `@docs/02_components/[##]_[component_name]/spec.md`. + Read all features in the folder `@docs/02_components/[##]_[component_name]`. For each feature do next: + - Implement it + - Make sure feature is connected and communicated properly with other features and existing code + - Create unit tests from the Test cases description, run it and make sure the result is a success + - Create integration test for the feature, run and make sure the result is a success + If integration tests are specified in component spec, then write them and run, and make sure that component working correctly + +## 2.3 **🤖AI agent**: Solution composition and integration tests + **📝prompt:** + Read all the files here `docs/03_tests/` and for each file write down tests and run it. + Compose a final test results in a csv with the next format: + - Test filename + - Execution time + - Result + + Fix all problems if tests failed until we got a successful result. + In case if one or more tests was failed due to missing data from user or API or other system, ask it from developer. + Repeat test cycle until no failed tests. \ No newline at end of file diff --git a/docs/_metodology/03_refactoring_phase.md b/docs/_metodology/03_refactoring_phase.md new file mode 100644 index 0000000..e69de29 diff --git a/docs/_prompts/1.2_research_acceptance_criteria.md b/docs/_prompts/1.2_research_acceptance_criteria.md new file mode 100644 index 0000000..0c60e7f --- /dev/null +++ b/docs/_prompts/1.2_research_acceptance_criteria.md @@ -0,0 +1,16 @@ +For the problem: + +"We have a lot of images taken from wing-type UAV by camera with at least full hd resolution. Resolution of each photo could be up to 6200*4100 for the whole flight, but for other flight could be FullHd, f.e. +Photos are taken and named consecutively within 100 meters distance between each other. +We know only starting GPS coordinates. We need to determine coordinates of centers of each image. And also coordinates of the center of any object on these photos." + +check how realistic these acceptance criteria: + +"System should find out GPS of centers of all the photos from the flight within error no more than 100 meters in comparison to the real GPS +System should find out GPS of centers of 70% of the photos from the flight within error no more than 30 meters in comparison to the real GPS" + +Check how critical is each criteria. Also find out more acceptance criteria for this specific domain. Research impact of each value in acceptance criteria to the whole system quality. Assess acceptable ranges for each value in each acceptance criteria in the state of the art solutions, and propose corrections in form: + +state of the art solutions' value ranges : our value ranges + +Form the new acceptance criteria based on your research. \ No newline at end of file