Click here to Skip to main content
15,909,897 members
Home / Discussions / C#
   

C#

 
GeneralRe: Beaten and defeated by this simple geography compass problem. Pin
PIEBALDconsult12-Jan-09 19:47
mvePIEBALDconsult12-Jan-09 19:47 
AnswerRe: Beaten and defeated by this simple geography compass problem. Pin
Luc Pattyn13-Jan-09 2:27
sitebuilderLuc Pattyn13-Jan-09 2:27 
GeneralRe: Beaten and defeated by this simple geography compass problem. Pin
Garry Freemyer12-Jan-09 16:16
Garry Freemyer12-Jan-09 16:16 
AnswerRe: Beaten and defeated by this simple geography compass problem. [modified] Pin
Luc Pattyn12-Jan-09 16:32
sitebuilderLuc Pattyn12-Jan-09 16:32 
GeneralI keep getting zero as the angle no matter what. [modified] Pin
Garry Freemyer13-Jan-09 6:04
Garry Freemyer13-Jan-09 6:04 
AnswerRe: I keep getting zero as the angle no matter what. [modified] Pin
Luc Pattyn13-Jan-09 6:37
sitebuilderLuc Pattyn13-Jan-09 6:37 
GeneralRe: I keep getting zero as the angle no matter what. Pin
Garry Freemyer13-Jan-09 7:12
Garry Freemyer13-Jan-09 7:12 
AnswerRe: I keep getting zero as the angle no matter what. [modified] Pin
Luc Pattyn13-Jan-09 8:14
sitebuilderLuc Pattyn13-Jan-09 8:14 
Hi,

I would prefer you show actual code, "..." would not compile, function degreesToRadian now has vanished;
also please make life easier to yourself and us CPians, by dropping the statements you commented out, and by putting the code in PRE tags (use the CODE BLOCK button) that would make it more readable, like so:

#define ParadiseLat 39.743
#define ParadiseLon -121.605

#define SanDiegoLat 32.723
#define SanDiegoLon -117.165



Garry Freemyer wrote:
I get the formula working for Paradise CA to Colorado Springs and it breaks down when I try for a Destination of San Diego, and if I fix San Diego, it breaks for Colorado Springs.


I can't imagine what that could possibly mean; the formulae and the code either are correct or they are not, how could you "fix" them for a specific city?

If you need to debug, I recommend you turn the atan2 line into three lines (and insert some Console.WriteLine statements), so you actually see the two values that you are feeding into atan2.

Smile | :)
Luc Pattyn [Forum Guidelines] [My Articles]

I use ListBoxes for line-oriented text, and PictureBoxes for pictures, not drawings.


modified on Friday, June 10, 2011 12:30 PM

GeneralRe: I keep getting zero as the angle no matter what. Pin
Garry Freemyer13-Jan-09 14:04
Garry Freemyer13-Jan-09 14:04 
GeneralRe: I keep getting zero as the angle no matter what. Pin
Garry Freemyer13-Jan-09 14:06
Garry Freemyer13-Jan-09 14:06 
AnswerRe: Beaten and defeated by this simple geography compass problem. Pin
PIEBALDconsult12-Jan-09 16:12
mvePIEBALDconsult12-Jan-09 16:12 
GeneralRe: Beaten and defeated by this simple geography compass problem. Pin
Garry Freemyer12-Jan-09 16:22
Garry Freemyer12-Jan-09 16:22 
GeneralRe: Beaten and defeated by this simple geography compass problem. Pin
Jason Lepack (LeppyR64)12-Jan-09 16:47
Jason Lepack (LeppyR64)12-Jan-09 16:47 
GeneralRe: Beaten and defeated by this simple geography compass problem. Pin
PIEBALDconsult12-Jan-09 19:49
mvePIEBALDconsult12-Jan-09 19:49 
AnswerRe: Beaten and defeated by this simple geography compass problem. Pin
J4amieC12-Jan-09 22:19
J4amieC12-Jan-09 22:19 
AnswerRe: Beaten and defeated by this simple geography compass problem. Pin
Alan Balkany13-Jan-09 4:28
Alan Balkany13-Jan-09 4:28 
AnswerRe: Beaten and defeated by this simple geography compass problem. Pin
Luc Pattyn14-Jan-09 3:24
sitebuilderLuc Pattyn14-Jan-09 3:24 
GeneralRe: Beaten and defeated by this simple geography compass problem. Pin
Garry Freemyer14-Jan-09 9:43
Garry Freemyer14-Jan-09 9:43 
AnswerRe: Beaten and defeated by this simple geography compass problem. [modified] Pin
Luc Pattyn14-Jan-09 9:51
sitebuilderLuc Pattyn14-Jan-09 9:51 
GeneralRe: Beaten and defeated by this simple geography compass problem. Pin
Garry Freemyer14-Jan-09 10:28
Garry Freemyer14-Jan-09 10:28 
AnswerRe: Beaten and defeated by this simple geography compass problem. [modified] Pin
Luc Pattyn14-Jan-09 10:40
sitebuilderLuc Pattyn14-Jan-09 10:40 
GeneralRe: Beaten and defeated by this simple geography compass problem. Pin
Garry Freemyer14-Jan-09 11:05
Garry Freemyer14-Jan-09 11:05 
AnswerRe: Beaten and defeated by this simple geography compass problem. [modified] Pin
Luc Pattyn14-Jan-09 11:03
sitebuilderLuc Pattyn14-Jan-09 11:03 
GeneralRe: Beaten and defeated by this simple geography compass problem. Pin
Garry Freemyer14-Jan-09 11:16
Garry Freemyer14-Jan-09 11:16 
AnswerRe: Beaten and defeated by this simple geography compass problem. Pin
Luc Pattyn14-Jan-09 11:30
sitebuilderLuc Pattyn14-Jan-09 11:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.