diff --git a/projects/Assignments/homework2/TackettMulticastSender.java b/projects/Assignments/homework2/TackettMulticastSender.java index f4f218e0119ab48b6b618fda1586eac80a971294..6942dfa6743786eb8f51464d0ccadab51a956aaa 100644 --- a/projects/Assignments/homework2/TackettMulticastSender.java +++ b/projects/Assignments/homework2/TackettMulticastSender.java @@ -23,8 +23,8 @@ public class TackettMulticastSender { public static void main(String[] args) { - int velocity = 2; - int dir = 45; + int velocity = 3; + int direction = 180; double xPos = 0; double yPos = 2; @@ -57,8 +57,8 @@ public class TackettMulticastSender { for(int idx = 0; idx < 100; idx++) { - xPos = xPos + (Math.cos(Math.toRadians(dir))*velocity); //computes the horixontal displacement for each movement based on velocity - this is a fixed velocity and time increment - yPos = yPos + (Math.sin(Math.toRadians(dir))*velocity); //computes the vertical displacement for each movement based on velocity - this is a fixed velocity and time increment + xPos = xPos + (Math.cos(Math.toRadians(direction))*velocity); //computes the horixontal displacement for each movement based on velocity - this is a fixed velocity and time increment + yPos = yPos + (Math.sin(Math.toRadians(direction))*velocity); //computes the vertical displacement for each movement based on velocity - this is a fixed velocity and time increment ByteArrayOutputStream baos = new ByteArrayOutputStream(); DataOutputStream dos = new DataOutputStream(baos);