Go to Post Suggesting change is one thing, implementing it is another. - JaneYoung [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 03-28-2014, 06:43 PM
alexander.h's Avatar
alexander.h alexander.h is offline
Lead Programmer, Captain, Driver
FRC #3975 (The Dragons)
Team Role: Programmer
 
Join Date: Aug 2013
Rookie Year: 2012
Location: Montreal, Quebec, Canada
Posts: 261
alexander.h has a spectacular aura aboutalexander.h has a spectacular aura aboutalexander.h has a spectacular aura about
Beginner Java Help - Question 1

Hello! I'm new to Java (we're planning to switch to it next year after passing the last three years using Labview) and I have one important question. In the "Getting Started with Java for FRC" pdf, it shows the following code for an autonomous that drives in a square pattern by driving half speed for 2 seconds, then turns 90 degrees. This is repeated 4 times :

Code:
public void autonomous() { 

     for (int i = 0; i < 4; i++) { 
          drive.drive(0.5, 0.0); // drive 50% fwd 0% turn 
          Timer.delay(2.0); // wait 2 seconds 
          drive.drive(0.0, 0.75); // drive 0% fwd, 75% turn 
       } 

     drive.drive(0.0, 0.0); // drive 0% forward, 0% turn 
}
What I don't understand is why it's a 75% turn for a 90 deg turn? Is there some way this was calculated?

Thanks!

P.S. I called this "Question 1" because I know that I will have other questions about Java in the future!
__________________



2012 - Rebound Rumble - Montreal Robotics Festival - Qualified 15th - Semifinalists thanks to 3379 and 3710 (Record : 8-8-1)
2013 - Ultimate Ascent - Montreal Robotics Festival - Qualified 33rd - Dean's List Finalist : Yazid Djenadi (Record : 4-8-0)
2014 - Aerial Assist - Montreal Robotics Festival - Qualified 9th (Record : 6-4-1)
2015 - Recycle Rush *** I predicted the game ***

Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 08:13 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi