Comments on the VK5DJ_sunmoon.dll and how to use it

Similar documents
VK5DJ_sunmoon.dll - how to use it

Chapter S1 Lecture. The Cosmic Perspective Seventh Edition. Celestial Timekeeping and Navigation Pearson Education, Inc.

LightWork Memo 18: Galactic Spectra Data Overview 1

Computer Activity #3 SUNRISE AND SUNSET: THE SEASONS

Mapping Earth s Surface Chapter 2 Section 3

COMPUTER ACTIVITY 3: THE SEASONS: LENGTH OF THE DAY

User's Guide version: 0.06

Coordinate Systems for Astronomy or: How to get your telescope to observe the right object

Meridian Circle through Zenith, North Celestial Pole, Zenith Direction Straight Up from Observer. South Celestial Pole

Transforming from Geographic to Celestial Coordinates

LOCATING CELESTIAL OBJECTS: COORDINATES AND TIME. a. understand the basic concepts needed for any astronomical coordinate system.

Astronomy A BEGINNER S GUIDE TO THE UNIVERSE EIGHTH EDITION

INTRODUCTION FOREWORD

THE MOON. G. Iafrate (a), M. Ramella (a) e V. Bologna (b) (a) INAF - Osservatorio Astronomico di Trieste (b)

THE LIGHT SIDE OF TRIGONOMETRY

Understanding Positional Astronomy Part 2 Celestial Co-ordinates Difficulty: Intermediate

1296 EME EME operation can be an adventure, from building the station to operating off the moon.

Name Class Date. For each pair of terms, explain how the meanings of the terms differ.

Guide to Polar Alignment of a Meade LX200GPS Telescope

Gnuradio Companion Considerations

Coordinates on the Sphere

An Adaptive Autoguider using a Starlight Xpress SX Camera S. B. Foulkes, Westward, Ashperton, Nr. Ledbury, HR8 2RY. Abstract

Astronomy is the oldest science! Eclipses. In ancient times the sky was not well understood! Bad Omens? Comets

The Galilean Moons of Jupiter

Tools of Astronomy Tools of Astronomy

Physics Lab #5: Starry Night Observations of the Sun and Moon

Knowing the Heavens. Goals: Constellations in the Sky

Knowing the Heavens. Goals: Constellations in the Sky

Mounts and Coordinate Systems

2. Modern: A constellation is a region in the sky. Every object in the sky, whether we can see it or not, is part of a constellation.

NATIONAL UNIVERSITY OF SINGAPORE DEPARTMENT OF MATHEMATICS SEMESTER 1 EXAMINATION Heavenly Mathematics: Cultural Astronomy

Chapter S1 Celestial Timekeeping and Navigation. How do we define the day, month, year, and planetary time periods?

ZW2000 and Your Sundial

Usage of IGS TEC Maps to explain RF Link Degradations by Spread-F, observed on Cluster and other ESA Spacecraft

Phys Lab #1: The Sun and the Constellations

The Sun-Earth-Moon System

Physics Lab #3:! Starry Night! Observations of the Sun and Moon!

netw rks Guided Reading Activity Essential Question: How does geography influence the way people live? What Is Geography?

Topic Guide: The Celestial Sphere. GCSE (9-1) Astronomy. Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Astronomy (1AS0)

OCN 201 LAB FALL 2003 POLYNESIAN AND WESTERN NAVIGATION

Section 2. Locating Astronomical Objects in the Night Sky What Do You See? What Do You See? Think About It. Investigate.

ASTRONOMICAL COORDINATE SYSTEMS CELESTIAL SPHERE

Cartesian Coordinates Need two dimensional system 2 number lines perpendicular to each other X-axis is horizontal Y-axis is vertical Position relative

DUMMIES guide to Astro-Navigation

Astronomy I Exam I Sample Name: Read each question carefully, and choose the best answer.

Go to Click on the first animation: The north pole, observed from space

The celestial sphere, the coordinates system, seasons, phases of the moon and eclipses. Chapters 2 and S1

-ASTR 204 Application of Astroimaging Techniques

Fundamentals of Satellite technology

Carbon Cycle Sample Site Set- up - Student Field Guide. Sample Site Corner Team

Interface: Planetary Nodes

MiSP Astronomy Seasons Worksheet #1 L1

Map Projections. Displaying the earth on 2 dimensional maps

Astronomy 101 Lab: Stellarium Tutorial

VOCABULARY SCAVENGER HUNT Five Themes of Geography

MiSP Astronomy - Seasons Worksheet #1 L2

RECOMMENDATION ITU-R S Impact of interference from the Sun into a geostationary-satellite orbit fixed-satellite service link

Light Work Memo 14: Galactic Map of December+January Observations 1

CHARTING THE HEAVENS USING A VIRTUAL PLANETARIUM

Solar Schoolhouse Human Sundial Building a Sundial with the Online Calculator

Lab 2 Working with the X-Band Interferometer

CHAPTER 2 SKILL SHEET 2: CELESTIAL NAVIGATION

Day, Night & the Seasons. Lecture 2 1/21/2014

Astronomy 101 Lab Manual. Victor Andersen Community College of Aurora

Oberth: Energy vs. Momentum

NAVIGATION THEORY QUESTIONS Basics of Navigation

Astronomy 311 Professor Menningen January 2, Syllabus overview books & supplies course goals assignments & grading About the professor

Useful Formulas and Values

Chapter 1: Discovering the Night Sky. The sky is divided into 88 unequal areas that we call constellations.

POTW #13-11 Photographic Dating

Daily Motions. Daily Motions. Solar and Sidereal Days. Annual Motions of the Sun. Coordinate system on Earth. Annual Motion of the Stars.

Astronomy Studio Exercise Geocentric and Heliocentric World Views Guy Worthey

6/17. Universe from Smallest to Largest:

Astronomical coordinate systems. ASTR320 Monday January 22, 2018

PHYSICS 1030 Homework #9

Astro 101 Lab #2. Start up the Stellarium program. If you do not remember how to use the user interface, please refer to Lab#1 or the user s guide.

Polar Sundial. Cut carefully on this line. Cut on this line.

DisDirToXYplus: program&interface b y R o n P e n n d e r s, P A 2 I O N

Exercise 7.0 THE CHANGING DIURNAL CIRCLES OF THE SUN

THE SUN-EARTH-MOON SYSTEM

a. 0.5 AU b. 5 AU c. 50 AU d.* AU e AU

CESAR Science Case. Jupiter Mass. Calculating a planet s mass from the motion of its moons. Teacher

One sine wave is 7.64 minutes peak to peak variation. Two sine waves is 9.86

Geog Lecture 29 Mapping and GIS Continued

Orbit and Transmit Characteristics of the CloudSat Cloud Profiling Radar (CPR) JPL Document No. D-29695

THE LOSMANDY G-11 MOUNT

Test 1 Review Chapter 1 Our place in the universe

a system for input, storage, manipulation, and output of geographic information. GIS combines software with hardware,

10/17/2012. Observing the Sky. Lecture 8. Chapter 2 Opener

Exercise 1.0 THE CELESTIAL EQUATORIAL COORDINATE SYSTEM

The. Astronomy is full of cycles. Like the day, the month, & the year In this section we will try to understand these cycles.

Solar Fire Gold. Have fun with the program, Brian. Brian Clark - Using your Solar Fire Program 1

LATITUDES AND LONGITUDES

Celestial Sphere Spectroscopy (Something interesting; e.g., advanced data analyses with IDL)

MAHALAKSHMI ENGINEERING COLLEGE-TRICHY QUESTION BANK UNIT I PART A

Stargazing For Beginners: How To Find Your Way Around The Night Sky By Lafcadio Adams

PHAS 1511: Foundations of Astronomy

A Review of Coordinates

Navigation. Longitude and Latitude Foundations of Navigation. MTPs:

GERMAN TYPE EQUATORIAL MOUNT (FM 51/52 - FM 100/102 - FM150) USER MANUAL

Transcription:

Comments on the VK5DJ_sunmoon.dll and how to use it The purpose of the DLL is to provide an easily used platform for the calculation of the position of the sun or the moon and to provide the associated information often required for amateur radio operators interested in EME. Due to the use of stdcall the DLL library should work with any of Windows versions of Delphi, Visual Basic, C and versions of these compilers designed for Linux. The first and most important procedure is that of DataToDLL. It is this procedure that sends the required data to the DLL to enable the main calculations to be made. Most of the functions described below extract result data from the DLL following this call. Some do a separate calculation such as bearing/distance, GetLocator, GetLatLong. DataToDLL has 12 parameters. They are in order: Year,Month,Day,Hour,Minute,Second: all of which are word variables HtASL, Latitude, Longitude: all of which are extended real variables RefractSwitch,SunMoonSW: all of which are Boolean and Band: which is an extended variable). To send the data to the DLL you load the appropriate variables with the values required and use: DataToDLL(Year, Month, Day, Hour, Minute, Second, HtASL, Latitude, Longitude, RefractSwitch,SunMoonSW,Band); Typical values for the variables might be: Year: 2008 (note full number required and all date time variables must be in UTC) Month: 7 (values from 1-12) Day: 1 (values from 1-31) Hour: 13 (values from 0-23) Minute: 10 (values from 0-59) Second: 30 (values from 0-59 HtASL: 10 (values from 0.0 whatever your height may be in metres) Latitude:-37.5833 (your Latitude +ve for northern hemisphere, -ve for southern) Longitude: 140.3831 (your longitude +ve for East and ve for West) RefractSwitch: true (values true or false. True includes optical refraction adjustment) SunMoon:false (true= sun calculation, false=moon calculation) Band: 1296.0 (Band in use in MHz used for Doppler calculations Note that str8 is a type of string with 8 characters. It has been defined like this in GetLocator and GetRtAscHHMMSS Type Str8 = string[8]; Because the main procedure and its supporting functions are all external and contained in VK5DJ_sunmoon.dll, you need to tell your compiler and in the case of Delphi this would be in the declaration part of the interface or implementation section. It is declared like this: Procedure DataToDLL(Year,Month,Day,Hour,Minute,Second:word; HtASL, Latitude, Longitude:extended; RefractSwitch,SunMoonSW:boolean;Band:word); StdCall;

Note the addition of the word stdcall and the name of the DLL in quotes. The DLL should be in the same directory as your main program. Similarly the data gathering functions should be declared in the following way. function GetElevation:extended; stdcall; function GetAzimuth:extended; stdcall; function GetDoppler(DopNo:byte):extended; stdcall; external 'VK5DJ_sunmoon.dll' Function GetLibration:extended;stdcall; function GetDistance:extended; stdcall; function GetAngularDiam:extended; stdcall; function GetRightAsc:extended; stdcall; function GetRtAscHHMMSS:str8; stdcall; external VK5DJ_sunmoon.dll function GetDeclination:extended; stdcall; function GetDecTopo:extended; stdcall; ; function GetDXdistance(Longitude,Latitude,RemoteLong, RemoteLat: extended;dist_b:boolean):extended; stdcall; function GetPolarity:extended; stdcall; function GetDB:extended; stdcall; function GetLocator(Latitude,Longitude:extended):str8; stdcall; function GetLatLong(Locator:Str8; LatOrLong:boolean):extended; stdcall; function GetVersion:extended; stdcall; In this document I have split the listings of the main procedure DataToDLL, function GetDXDistance, GetLocator and GetLatLong across several lines for legibility reasons. Depending on your compiler this may be allowable or each may need to be placed as one long line. Be careful that you include the required punctuation. When the main procedure DataToDLL is called the sun or moon calculations are performed and data is created and stored in the DLL library. To extract the data you call the appropriate functions: function GetElevation:extended; returns the elevation of the object from your home location in degrees in an extended variable. When printing this to screen you should round it to no better than the nearest 0.01 degree. function GetAzimuth:extended; returns the azimuth of the object from your home location in degrees in an extended variable. When printing this to screen you should round it to no better than the nearest 0.01 degree. function GetDoppler:extended; returns the Doppler shift home/home if DataToDLL call was loaded with home data, and it returns the Doppler shift DX/DX if the DataToDLL call was loaded with the remote station data. Each shift is doubled from the perspective of the station concerned as listening to his/her own signal.

To calculate the mutual Doppler shift the single direction shifts are taken into account, added and averaged. See my sample program TestDLL. Note that to obtain the required data for both the home station and the DX station the procedure DataToDLL must be called with the appropriate information before reading back the Doppler shift. Each read provides the doubled Doppler shift as if the station was hearing its own echoes. The Doppler shift between Home and DX is then calculated using something like this: DopplerHome_DX:= DopplerHome/2 +DopplerRemote/2 Internally Doppler uses a time period 1 minute earlier, the current time and the time forward 1 minute to calculate the difference in distance between the moon and the station. This distance difference is turned into a Doppler shift using the speed of light and the frequency in use. The GetDoupler routine no longer requires a specific parameter. Doppler:=GetDoppler puts the value of Doppler into the extended variable Doppler. Function GetLibration:extended; returns the libration expressed as spread in Hertz of a received frequency function GetDistance:extended; returns the distance to the sun/moon in kilometres. function GetAngularDiam:extended; returns the angular diameter of the sun/moon in degrees. function GetRightAsc:extended; returns the RightAscension of the sun/moon in decimal hours. function GetRightAscHHMMSS:String[8]; returns the RightAscension of the sun/moon as a short string of 8 characters i.e. string[8] in the form of HH:MM:SS. Note the type of the function MUST be a short string of 8 characters. See variable types above. function GetDeclination:extended; returns the geocentric declination of the sun/moon in degrees. function GetDecTopo:extended; returns the topocentric declination of the sun/moon in degrees. Function GetDXdistance(Longitude,Latitude,RemoteLong,RemoteLat,True): extended; returns the distance of the remote station in kilometres when True or its great circle bearing if False. Typical values for the variables might be: Longitude: 140.8 Latitude: -37.8 (dec degrees longitude +ve for East and ve for West) (dec degrees Latitude +ve for Northern hemisphere, -ve for southern) RemoteLong: -122.00 (DX station longitude +ve for East and ve for West) RemoteLatitude: 24.982 (DX station Latitude, +ve for N, -ve for S) Dist_B: true (true = distance calculation in Km, false= bearing calc in degrees)

function GetPolarity:extended; returns the polarity shift as measured from a moon s perspective. See my example as to how to combine the readings from home station and DX station to identify the possible rotation required between the two antennas (Home and DX). The polarity is most easily read as a displacement + or from the DX alignment so I have used an equation to extract it once each polarity is determined: PolarityShift:=PolarityHome-PolarityRemote; If PolarityShift>90 then PolarityShift:=PolarityShift-180; The resultant is the direction the polarization of the home station must be rotated to match another station using the same polarization as you. Keep in mind that below 1296 MHz Faraday rotation can be such as to make this figure meaningless. Treat it as a guide. function GetDB:extended; returns the relative signal strength in db compared with the mean position of the moon. The strength will be greater at Perigee and weaker at Apogee. This figure is an approximate guide as there are many other factors that affect signals. It takes into account the distance of the moon and the size of the moon. The next two functions are routines that may prove useful in your program. function GetLocator(Latitude,Longitude:extended):string[8]; returns the Locator for the station when the latitude and longitude is passed to the function. function GetLatLong(Locator:Str8; LatOrLong:boolean):extended; returns a latitude and longitude in decimal degrees from a provided locator. The routine is called with the Locator and a Boolean variable LatOrLong as parameters. Locator has six characters eg QF02ek and the LatOrLong variable is set true to recover the Latitude and false to recover the Longitude. Because of the nature of Locators the Lat and Long are approximate but sufficiently accurate for calculations provided by the DLL. Example: Latitude:=GetLatLong( QF02ek, true); sets Latitude to -37.5625 while Longitude:=GetLatLong( QF02ek,false); sets Longitude to 140.375 Function GetVersion:extended; returns the version number of the DLL as an extended number. A typical external call might look like this: label27.caption:='dll version '+floattostr(getversion); Summary I have included a sample program written in Delphi to illustrate how the VK5DJ_sunmoon.dll may be used. Note that when printing the figures to a screen you would normally not show the extended variable value as I have mostly done. This was done only to minimize the example code for you and keep it uncluttered by print statements. I have provided a couple of rounded printouts to show how it might be done. I recommend the following printout accuracy.

Azimuth and Elevation: 2 decimal places in degrees RightAscension and Declination: normally 2 decimal places but I have included a function within the DLL to output hours:mins:secs for Right Ascension. Distance to moon: nearest km Angular diameter of moon: 3 decimal places in degrees Distance of DX in km round to nearest 10km (irregularities of earth limit to 0.1%) Bearing of DX in degrees round to 1 decimal place (irregularities limit to 0.1%) Doppler readings to nearest Hz Libration to nearest Hertz Antenna polarity to nearest degree (if you are an optimist) GetDB could be printed to a rounded 1 or 2 decimal places. Again, this is a rough guide only. GetLocator returns a string 6 characters long and should be printed in its entirety. GetLatLong returns an extended variable in decimal degrees and would normally be converted to Deg:Min:Sec. You will need to program the conversion, it is not available from the DLL Enjoy these routines. No guarantees are offered, use at your own peril. The results seem to be pretty good. The improved algorithms for Doppler in this version are from a program by Gerald (K5GW). They are more accurate than my effort. Thanks Gerald. I acknowledge libration coding by Keith Burnett and George Rosenberg. If you use this DLL library I would hope that you will keep its name intact and acknowledge my work in bringing together the work of many people but particularly those acknowledged below. I wish to acknowledge the following sources: Author Title Published Jean Meeus Astronomical Algorithms Willmann-Bell, Inc 2 nd Edition 1998 with corrections 2005 Peter Duffett-Smith Astronomy with your personal computer Cambridge University Press 1985 John Morris Amateur Radio Software RSGB 1985 Gerald Williamson MC011011.bas re doppler Keith Burnett and others Spreadsheet re libration 73 John Drew VK5DJ http://www.vk5dj.com 27 February 2011