Discussion:
e.getBearing() returns angles with errors
feistybot99
2011-04-25 01:16:11 UTC
Permalink
Hi

I am relatively new to Robo as well as Java but I have a question:
When I use e.getBearing() the angle returned has a significant error, like around 25 degrees. I thnk its because the the beam width is too wide. Its around 30 deg. So I can't get an accurate fix on the enemy. How can I make the beam width narrower or otherwise get a more accurate bearing?

Another question, how can I print data to the screen or console window? The program seems to ignore out.println

kind regards,
andrew



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/Robocode/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/Robocode/join
(Yahoo! ID required)

<*> To change settings via email:
Robocode-***@yahoogroups.com
Robocode-***@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
Robocode-***@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
feistybot99
2011-04-25 15:33:33 UTC
Permalink
Post by feistybot99
Hi
When I use e.getBearing() the angle returned has a significant error, like around 25 degrees. I thnk its because the the beam width is too wide. Its around 30 deg. So I can't get an accurate fix on the enemy. How can I make the beam width narrower or otherwise get a more accurate bearing?
Another question, how can I print data to the screen or console window? The program seems to ignore out.println
kind regards,
andrew
Never mind, i found the problem with the angle error. I still have the question about printing out to the screen. Do I have to show the console window first? Let me know.

regards,
andrew



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/Robocode/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/Robocode/join
(Yahoo! ID required)

<*> To change settings via email:
Robocode-***@yahoogroups.com
Robocode-***@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
Robocode-***@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
Noah Jacobson
2011-04-25 18:59:22 UTC
Permalink
I think when you print to the console (via System.out.println, for instance),
the text you specified can be seen by clicking on your robot's name over on the
side of the battle screen. This is the same window one uses to turn on and off
painting. Doing so should open a status window with some tabs, and one of those
tabs will show what you've printed.

I forget the actual name of the window, but I hope this is helpful.

-Noah




________________________________
From: feistybot99 <***@yahoo.com>
To: ***@yahoogroups.com
Sent: Mon, April 25, 2011 11:33:33 AM
Subject: [Robocode] Re: e.getBearing() returns angles with errors
Post by feistybot99
Hi
When I use e.getBearing() the angle returned has a significant error, like
around 25 degrees. I thnk its because the the beam width is too wide. Its around
30 deg. So I can't get an accurate fix on the enemy. How can I make the beam
width narrower or otherwise get a more accurate bearing?
Another question, how can I print data to the screen or console window? The
program seems to ignore out.println
kind regards,
andrew
Never mind, i found the problem with the angle error. I still have the question
about printing out to the screen. Do I have to show the console window first?
Let me know.


regards,
andrew
Julian Kent
2011-04-25 19:20:30 UTC
Permalink
Either open up the console window by clicking on your robot's name in
the battle display (all the System.out.println() goes there) or you can
open your robots window and enable painting, which lets you display
directly on the battlefield.

Take a look at robowiki.net for implementation details - there are lots
of open source bots which use painting for all sorts of uses.

Hope this helps
Julian (AKA Skilgannon at robowiki)
Post by feistybot99
Post by feistybot99
Hi
When I use e.getBearing() the angle returned has a significant error, like around 25 degrees. I thnk its because the the beam width is too wide. Its around 30 deg. So I can't get an accurate fix on the enemy. How can I make the beam width narrower or otherwise get a more accurate bearing?
Another question, how can I print data to the screen or console window? The program seems to ignore out.println
kind regards,
andrew
Never mind, i found the problem with the angle error. I still have the
question about printing out to the screen. Do I have to show the console
window first? Let me know.
regards,
andrew
------------------------------------
Yahoo! Groups Links
--
Julian Kent
***@fastmail.net
--
http://www.fastmail.fm - The way an email service should be



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/Robocode/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/Robocode/join
(Yahoo! ID required)

<*> To change settings via email:
Robocode-***@yahoogroups.com
Robocode-***@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
Robocode-***@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
Loading...