Create an instance of the simulation and a number of threads

Assignment Help C/C++ Programming
Reference no: EM132117487

General Information

Intent: Skills in utilising, classes, abstraction, data structures, threading, data synchronisation and documentation will be assessed.

Task:

Write a program in C++ using object oriented paradigms that shares data originating from a range of Mechatronics sensors between a number of threads. Ensure data integrity between threads and enable relating data between them via suitable data structure that enables time synchronisation and subsequently interpolation of data for task at hand. Supply appropriate auto-generated documentation utilising inline source mark-up.

Rationale: In a Mechatronics System, sensors produce data at varying rates. Decisions need to be made based on correctly associated data in near real-time. Threading and synchronisation are ways to ensure the system performs as intended, with guarantees on the responsiveness of the system to incoming data changes, processing constraints and system behaviour.

Your task is to (a) create a number of threads that can handle buffering incoming data in an agnostic manner (b) create a separate thread to process the data from the sensors that ensures synchronisation of the data between producers / consumers and produces an output by extrapolation of data (extrapolation is the process of estimating, beyond the original observation).

Specifics

An aircraft is patrolling space surrounding a base station. The aircrafts task is to localise an enemy aircraft (bogie) that enters the airspace and intercept the aircraft by shadowing it (keeping on top of it) for a period of time.

The aircraft is controlled by supplying desired linear velocity and angular velocity (V and ω) that the on-board systems immediately respond to, as long as they are within operational parameters of aircraft. The controlled linear velocity cannot be less than a terminal velocity (50 m/s), otherwise the aircraft will stall and fall from the sky, or above max velocity (1000 m/s). The combination of linear and angular velocity cannot exceed 6G (safety limit for the pilot : calculated as V * ω / g ; g being gravitational force). A watchdog timer in the control systems requires control input to be supplied every 50ms (5ms tolerance) or the control systems will fail.

The aircraft is equipment with:

- A high-precision INSGPS that provides the aircraft precise pose (x,y and θ)
- An omnidirectional radar that provides range to the bogie (from the aircraft) updating at 100Hz

Apart from the on-board Radar the aircraft can:

- Receive readings from a radar situated at the base station that provides range to the bogie (from the base station) at 10Hz (the base station is at location 0.0).

A library (libsimulator.a) and header files encompassing the simulator is provided (as part of skeleton code - details below).

To illustrate how to use the simulator a sample project containing: CMakeLists.txt and simple main exploiting the simulator are available under student git repository (skeleton/a3-skeleton).

The complete API for the Simulator is available under your git repository (skeleton/a3-skeleton- doc). To access the API specifics, open index.html within above noted folder (for instance "firefox index.html"). Peruse Class List and view the methods available under Simulator class.

Task

Create an instance of the simulation and a number of threads to achieve control of an aircraft with an aim of (1) estimating the position of an enemy aircraft (bogie) and (2) shadowing this aircraft : keeping the aircraft on top of the bogie (within 600m) for 2 seconds.

Your system will need to

1. Obtain radar data from the aircraft and the ground station

2. Utilise the radar data to estimate the bogie position (via intersect of the ranges - circles) and display the estimated position on the simulator

3. Linearly extrapolate the bogie position (determine what parameters are needed for this task)

4. Estimate a control action that will lead to your aircraft intercepting the bogie

5. Control the aircraft within the watchdog imposed limits and aircraft specification envelope (terminal velocity / max velocity / max G profile).

6. Continue to determine control actions that will allow you to shadow the bogie, be within 600m for 2 seconds.

Therefore, you will need to design classes mapped to the task and functionality (refer assessment criteria).

Create a Main that

1. Creates objects from your classes

2. Creates a suitable number of threads for the task

3. Handle concurrency using appropriate data protection

4. Achieves goals (1-6)

5. Waits until the threads are terminated with CTRL+C

Attachment:- Assignment Information.rar

Reference no: EM132117487

Questions Cloud

How a person health issues are handled : What role should culture play in how a person's health issues are handled? Is this demonstrated in the health system today?
Declare a string variable myname and assign your name to it : Declare an integer variable named numStates and assign a value of 50 to it. Declare a string variable myName and assign your name to it.
What are some safety concerns : While performing aircraft maintenance in a hangar, what are some safety concerns?
Compute the goodness value for each of the 3 patterns : Generate a boxplot or histogram that shows the distribution of Goodness values across all 212 binary patterns ( components are -1 or +1)
Create an instance of the simulation and a number of threads : Assignment: Threading, Synchronisation and Data Integrity - Estimate a control action that will lead to your aircraft intercepting the bogie
How do you value the whole individual : Do you believe there is more than one right answer to situations? How do you value the whole individual? What barriers prevent us from responding.
Discuss the naming conventions used in the structure : Compare and contrast the 3 methods for issuing CL commands: keyword notation, positional notation, and prompting.
Healthcare organizations improve quality of care : Describe what Quality Measures are and how analyzing the data helps healthcare organizations improve their quality of care.
Explain point-to-point and point-to-multipoint communication : Explain Multiplexing in details and mention the advantages and disadvantages of different multiplexing methods.

Reviews

len2117487

9/20/2018 12:40:17 AM

How do students generate Doxygen for their assignment A complete introduction to doxygen is provided on UTSOnline as well as a sample project in week 5. If you wish solely to exploit in text commenting (without project files, which suffices for marking) then a quick way is to execute following two commands within your project folder: 1. “doxygen –g” (which will generate Doxyfile) 2. “doxygen Doxyfile”(generates the html and latex) DO NOT submit the generated document files as part of your ZIP, we can generate them from your source files.

len2117487

9/20/2018 12:40:08 AM

Documentation 10 Documentation is produced via Doxygen. All source files contain useful comments to understand methods, members and inner workings (ie extrapolation, control method). Modularity of software 20 Appropriate use class declarations, definitions, default values and naming convention allowing for reuse. No implicit coupling between classes that disables reuse. All classes interface in ways allowing use of class in others contexts and expansion (ie controlling another aircraft to pursue bogie). No “hard coded” values or assumptions.

len2117487

9/20/2018 12:40:02 AM

Proper code execution 30 Range data fused (extrapolated/interpolated) and combined with aircraft location to correctly estimate bogie position. Aircraft controlled in specified watchdog timer intervals within limits of aircraft specification envelope (terminal velocity / max G profile). Range data fused (extrapolated/interpolated) and combined with aircraft and bogie pose/velocity/angular_velocity data to shadow the bogie for time specified.

len2117487

9/20/2018 12:39:56 AM

Criteria Weight (%) Description / Evidence Use of appropriate data structures, locking mechanisms, data sorting mechanisms 40 Design adheres to principles of: Inheritance from base class, common data stored and generic functionality implemented solely in base class (no duplication). Member variables/functions that should not be available for instantiation are aptly protected. Suitable data containers, sorting mechanisms optimal with respect to memory footprint. Use of synchronisation mechanisms to enable efficient multithreading and safe data sharing between threads (avoiding busy waits / optimise locking).

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd