This repository contains my solutions to the Light, Medium, and Hard Dose problems
Throughout this task, I:
- Learned to install ubuntu by dual booting
- Got to know how to use Git and Github
- Learned about bashscripting
- Understood new concepts of Filters, 3D and 4D rotation systems,Path finding with Matrix
- Worked with python libraries such as collections
- Had fun time doing all the other Problems
- Euclidean distance between two points: (\sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2})
-
Standard deviation formula:
$$ \text{Standard Deviation} = \sqrt{ \frac{1}{N} \sum_{i=1}^{N} (x_i - \text{mean})^2 } $$ - where
- ( N ) is the total number of data points
- ( x_i ) is each individual data point
- ( \text{mean} = \frac{1}{N} \sum_{i=1}^{N} x_i )
- where
-
Relative Standard Deviation:
-
Choosing filter based on RSD
-
Z - Score to find Outlier
Learnings:
-
Interpretation of Given Data :
x, y, zcoordinates are given as input.zcoordinate is taken as the height.yrepresents forward and backward movement.xrepresents left and right movement.
-
Reasoning :
- The
ycoordinate may contain error because the camera is mounted at the front, but the rover should rotate when its center reaches the marker.
- The
-
Final Output :
- Therefore, we adjust the y coordinate by an offset value of 55.
we can find the distance between camera and marker using euclidean distance formula
-
Interpretation of Given Data :
- Morse code is stored in a dictonary named morse_dict
- The message is split into words using split function giving 7 spaces as paramater to split
- The words are again split into letters using the split function giving 3 spaces as parameter to split
-
Reasoning :
- Traveresed thorugh each letter
- checked weather if the morse code of the letter is found in dictonary keys
- if yes returned the english equivalend
- and added it to the result string
-
Final Output :
- returned the result string
note: Main function was not included since the question was to write a funciton
-
Interpretation of Given Data :
- The given input message was converted to upper case
-
Reasoning :
- Traversed through each letter
- took its ascii value
- reduced the ascii value by its position value
- converted it back to charecter
-
Final Output :
- The result was stored in a list , so converted it back to string
-
Interpretation of Given Data :
- A set of data was given in log.txt
- extracted the data using file handling in python and stored it in list name data
-
Reasoning :
- Included Three function One for Sanchiko filter , Other for Muchiko filter and other to determine which filter to use
- Muchiko filter
- using sliding window technique and deque from collections module computed average using a window size of 3 and added the results to smoothed data list
- Sanchiko filter
- using sliding window technique and deque created the window sorted it into ascending oreder and found the median and added the results to smoothed data list
- Which filter to use
- Calculated the RSD value
- if its between 1 to 10 use Muchiko
- if its between 10 to 30 use Hybrid
- if it greater than 30 check for z score
- if spike is found use Sanchiko
- else use Muchiko
-
Final Output :
- Smoothed data and Filter used is returned
-
Interpretation of Given Data :
- Assuming the input is in degree converted it into radians
-
Reasoning :
- Calculated the half angles and computed the quternions using the formula
-
Final Output :
- The quaternion cordinates were returned
-
Interpretation of Given Data :
- obstacle cordinates where taken from sample.txt file using python file handling functions
- each row is considered as one obstacle
- stored the obstacle cordinates in a list
-
Reasoning :
- To create the map The largest value is found from the obstacle cordinate and
- created a map double the size of it because brick is in the center and it can move in both the directions
- intialised the map with 1
- The net movement in the vertical direction will be North - South
- The net movement in the horizontal direction will be East -west
- The middle cordinates will be [n,n]
- the exact cordinate of obstacle will be
- row: n - (north-south)
- column: n + (east-west)
- equated that cordinate to zero
-
Final Output :
- The map is printed





