View Single Post
  #12  
Old 08-07-2021, 10:48 AM
daz (Darren)
Registered User

daz is offline
 
Join Date: Jun 2021
Location: Surfers Paradise, Australia
Posts: 37
Gary, have confirmed via https://www.magnetic-declination.com/# that 11.3 deg is correct for Gold Coast.


The problem seems to be with my code, which produces different results depending on whether the values for lat & lon are enclosed in quotes or not, and the manner in which the variables are declared:


ob.lon, ob.lat, ob.elevation = -28.00274, 153.42999, 0


produces 286 deg


ob.lon, ob.lat, ob.elevation = '-27.9985', '153.4227', 0


produces 62 deg


ob.lon, ob.lat, ob.elevation = -27.9985, 153.4227, 0


produces 286 deg


ob.lat='-27.9985'
ob.lon='153.4227'


produces 299 deg


So, 299 - 11.3 gives me an angle to magnetic north of 287.7 deg or 72.3 deg., which seems about right based on observation. I'll pull out a compass to confirm if the skies clear.


Thanks for your help everyone!
Reply With Quote