Skip to content

Instantly share code, notes, and snippets.

View mayonesa's full-sized avatar
🇺🇦

John Jimenez mayonesa

🇺🇦
  • Florida, USA
View GitHub Profile
@mayonesa
mayonesa / pr1.Rmd
Last active February 4, 2022 17:31
---
title: 'Project 1: Explore and Prepare Data'
subtitle: |-
CSE6242 - Data and Visual Analytics - Spring 2017
Due: Sunday, March 5, 2017 at 11:59 PM UTC-12:00 on T-Square
header-includes:
- \usepackage[T1]{fontenc}
- \usepackage[greek,english]{babel}
- \usepackage{CJKutf8}
- \usepackage{textgreek}
# Write a function 'kalman_filter' that implements a multi-
# dimensional Kalman Filter for the example given
from math import *
class matrix:
# implements basic operations of a matrix class
def __init__(self, value):
# Fill in the matrices P, F, H, R and I at the bottom
#
# This question requires NO CODING, just fill in the
# matrices where indicated. Please do not delete or modify
# any provided code OR comments. Good luck!
from math import *
class matrix:
# In this exercise, you should implement the
# resampler shown in the previous video.
from math import *
import random
landmarks = [[20.0, 20.0], [80.0, 80.0], [20.0, 80.0], [80.0, 20.0]]
world_size = 100.0
class robot:
# -----------------
# USER INSTRUCTIONS
#
# Write a function in the class robot called move()
#
# that takes self and a motion vector (this
# motion vector contains a steering* angle and a
# distance) as input and returns an instance of the class
# robot with the appropriate x, y, and orientation
# for the given motion.
# --------------
# USER INSTRUCTIONS
#
# Write a function in the class robot called sense()
# that takes self as input
# and returns a list, Z, of the four bearings* to the 4
# different landmarks. you will have to use the robot's
# x and y position, as well as its orientation, to
# compute this.
#
# --------------
# USER INSTRUCTIONS
#
# Now you will put everything together.
#
# First make sure that your sense and move functions
# work as expected for the test cases provided at the
# bottom of the previous two programming assignments.
# Once you are satisfied, copy your sense and move
# definitions into the robot class on this page, BUT
'''
Created on Jun 3, 2017
@author: john_jimenez
'''
# ----------
# User Instructions:
#
# Define a function, search() that returns a list
# in the form of [optimal path length, row, col]. For
'''
Created on Jun 15, 2017
@author: john_jimenez (jjimenez36)
'''
#
# === Introduction ===
#
# In this problem, you will build a planner that helps a robot
# find the best path through a warehouse filled with boxes
from math import atan2, cos, sin, sqrt
'''
pr1.1
Created on May 18, 2017
@author: jjimenez36
'''
def estimate_next_pos(m_i, ms = None):