"23:59:59"0:TS$ݪ:DS$ݫ:DS$(DS$,6)"20"(DS$,2):Avoid last second of a day; capture Time & Date strings; formulate 21st century Date string~PI#:500:If Pi is defined then pass through to next line, elsewise Pi is not defined (i.e., resolved as zero) because initial assignment of constants and variables has not been made -- go make those initial assignmentsƁYR%((DS$,4)):LY%1(YR%400):0LY%LY%(YR%100)(1(YR%4))MN%((DS$,2)):DY%365((DS$,4)):(LY%MN%)2DY%DY%1013MN%16,15,14,13,12,11,10,9,8,7,6,5fDY%DY%31:reduce by 365;enter here for JanuaryDY%DY%28:reduce by 334;enter here for FebruaryтDY%DY%31:reduce by 306;enter here for MarchDY%DY%30:reduce by 275;enter here for April7 DY%DY%31:reduce by 245;enter here for Mayj
DY%DY%30:reduce by 214;enter here for JuneDY%DY%31:reduce by 184;enter here for July҃DY%DY%31:reduce by 153;enter here for August
DY%DY%30:reduce by 122;enter here for September@DY%DY%31:reduce by 092;enter here for OctoberwDY%DY%30:reduce by 061;enter here for NovemberDY%DY%31:reduce by 031;enter here for DecemberބT0#2PI#DY%(365LY%):Temporal factor 0T1#T0#4.8718:Temporal factor 1SD#0.32200322.9711(T0#)0.357898(2T0#)0.14398(3T0#)3.94638(T0#)0.019334(2T0#)0.05928(3T0#):Solar Declination (in degrees)مSD#SD#DR#:Solar Declination expression now in radiansv(ET#5.0323430.837(T1#)12.5024(2T1#)18.25(3T1#)100.976(T1#)595.275(2T1#)3.6858(3T1#)12.47(4T1#):Equation of Time (in seconds)2LA#LT#DR#:LAtitude (in radians)9TD!TZ!:Time Differential (in hours) with respect to Universal Time Coordinated (UTC)E:12TD!TD!TD!24:compensate (only once) if more negative than -12;TD!12TD!TD!24:compensate (only once) if more positive than +12<UC#TD!((TS$,2))((TS$,4))60((TS$,2))3600:Universal time-of-day Coordinated (in hours)EUC#24UC#UC#24:1(UC#)UC#UC#24:compensate (once only) if +24 or more positive, else compensate (once only) if -24 or less negative͈FHA#LG#PI#12(ET#3600UC#)PI#:Hour Angle (in radians)@P:Calculation of AL# follows. Sine of AL# is computed, and then its ArcSine (i.e., inverse sine) produces AL#QSL#(SD#)(LA#)(SD#)(LA#)(HA#):Sine of aLtitude angle of sun[X:ArcSine (i.e., ArcSIN) is not provided in Tandy BASIC. ArcSine is found via BASIC equivalent statements where the ArcSine of unitless number, such as UN#, is equal to ATN ( UN# / SQR( 1 - UN# * UN#) )YAL#(SL#(1SL#2)):ALtitude angle of sun, which is the true angle rather than the visible angle that results from atmospheric refraction (in radians)sZ:Calculation of AZ# follows. Cosine of AZ# is computed, and then its ArcCosine (i.e., inverse Cosine) produces AZ#[CZ#((SD#)(LA#)(SD#)(LA#)(HA#))(AL#):Cosine of AZ#V\:To avoid the FC Error in the subsequent SQR() function, the value of CZ# must not exceed positive 1 (or apparent threshold of 1.00000000000004999..999)]:A guard may be placed here to: adjust the CZ# value to 1.0 in all cases of excess, or allow trivial excess to trigger an Error response.J^: IF CZ# > 1 THEN CZ# = 1 'Adjust to 1.0 in all cases_: IF CZ# > 1 THEN IF CZ# <= 1+1/3D13 THEN CZ# = CZ# ELSE ERROR 17 'CN Can't Continue`: IF CZ# > 1 THEN IF CZ# <= 1+1/3D13 THEN CZ# = CZ# ELSE ERROR 50 'IE Internal Error\a: IF CZ# > 1 THEN IF CZ# <= 1+1/3D13 THEN CZ# = CZ# ELSE ERROR 255'UE Undefined Error?b:ArcCosine (i.e., ArcCOS) is not provided in Tandy BASIC. ArcCosine is found via BASIC equivalent statements where the ArcCosine of a unitless number, such as UN#, is equal to -ATN ( UN# / SQR( 1 - UN# * UN#) ) + PI# / 2cAZ#(CZ#(1CZ#2))PI#2:Calculate AZimuth angle of sun (in radians)ݏd(HA#)1AZ#2PI#AZ#:Compensate Azimuth due to a positive hour anglen@0,"Date \ \ Time \ \";DS$,TS$;Vo"Equation of Time +##min ##sec";ET#6060,(ET#60(ET#6060));p"Sun Declined +##.###########"(166);SD#RD#;q301:"Sun Altitude +##.###########"(166);RL#;r"Sun Azimuth"(149)" ###.###########"(166);AZ#RD#;As"Lt+##.######"(166)" Lng+###.######"(166);LT#,LG#RD#;vt"Hour Angle +###.###########"(166);HA#RD#;x290:Display command line(XO%,YO%),0:erase prior shadow-line,(RL#)0250:atmospheric refraction compensated (i.e., optic) altitude of sun is below the horizonkY%YO%R%(AZ#):(XO%R%(AZ#),Y%),1:draw shadow-lineS%ͱ:If sound is allowed, beep to notify that shadow-line has changed(65450)0͊(,7)(TS$,7)250:0:K$:Stay here until operator makes a keystrike or a new 10-second interval commences. Go back upon new interval for update; capture keystrike and proceed forward.V%((1("QqGgUuEeSs",K$))2):V%0Ͳ11838,50:250:If not valid keystrike then loop back6V%1920,5:V%254,258,255,280,253:5-way branch based on valid keystrikeQS%1:290:250:SoundlS%0:290:250:QuietՔ@0,;:Y%1(2501):((2500));::@0,;:Equivalent CLS for any screen width; reuses variable Y%x"Time zone displacement with":"respect to Universal Time":"Coordinated (UTC) is +##.##";TZ!:"hours. This can be changed":"by editing line 540, where a""RESTORE7nn phrase points to":"a line of DATA in the range":"of 701 through 797. MRG700.DO";:260:250:UTC+/--:(XO%,YO%R%)(XO%,YO%R%):(XO%R%,YO%)(XO%R%,YO%),1"Center the gnomon exactly on the crosshair target that is seen in right-hand panel. It must stand perfectly upright on the LCD glass. During use the laptop must be placed so that the LCD glass is level.";:260::5945Y%032766:::Dwell a short time409:411::Enable scroll, set screen width to 40-column, and end program interpretationؗ":Subroutine to display appropriate line of command keystrikes/#408:@7(2500),;:Disable scrool, set print position to bottommost line of LCDV$S%ͣ"[Q]uiet ";::"[S]ound ";:~%"[G]nomon [U]TC"(141)" [E]nd";:+,:Subroutine to determine the visual sun altitude based on average conditions of atmospheric refractionJ-RL#AL#RD#:Refracted aLtitude (in degrees) is based on true ALtitude angle of sun.RL#85309:No compensation for 85 degrees < true sun altitude/TR#(RL#DR#):Tangent of Refracted altitudeE0RL#05RL#RL#(58.1TR#0.07TR#30.000086TR#5)3600:309:Compensation for 05 degrees < true sun altitude <= 85 degrees1RL#0.575RL#RL#(1735518.2RL#103.4RL#212.79RL#30.722RL#4)3600:309:Compensation for -0.575 degrees < true sun altitude <= 05 degrees2TR#0RL#7.0000000000001E64:To avoid the ?/0 Error in the subsequent TAN() function, if the value of RL# is 0 then it must be adjusted to be as small as possible above the value of 03RL#RL#(20.774TR#)3600:Compensation for true sun altitude <= -0.575 degreesD5:Atmospheric refraction compensated ALtitude angle of sun (in degrees)p:Subroutines for LCD control purposesڜ(27)"U";:Disengage LABEL line of screen, then pass to next program line for subroutine completionO408:@0,;:Y%1(2501):((2500));::@0,;:409::Equivalent CLS for any screen width; reuses variable Y%(27)"V";::Disable scrool, cursor position unchangedȝ(27)"W";::Enable scroll, cursor position unchanged(XO%,YO%)::reset the shadow-line origin pixel, which registers originF2500,40::Set screen width to 40-columnv2500,29::Set screen width to 29-columnT:Abort if not M10x laptop, elsewise retain variables TS$ & DS$, but make initial assignment for constants and other variables in a forced order (using dummy values if necessary) for sake of high-speed interpretation(72)ͱ:"This program is valid for Model 100 and Model 102 laptops only."::_PI#2(3D13):Forced order assignment. Constant Pi approximation for all laptop Models (100/102/200) based on value of 3D13 being a sufficiently close approximation to infinityŠDR#PI#180:Forced order assignment. Constant Degrees-to-Radians angular unit conversion factor+RD#180PI#:Forced order assignment. Constant Radians-to-Degrees angular unit conversion factorYR%0:LY%0:Forced order assignment by dummy value. Variables YeaR number & LeapYear_flagMN%0:DY%0:Forced order assignment by dummy value. Variables MoNth number & Day-of-Year number[T0#0:T1#0:Forced order assignment by dummy value. Variables Temporal_factor_0 & Temporal_factor_1TD!0:Forced order assignment by dummy value. Constant Time_Differential UC#0:Forced order assignment by dummy value. Variable Universal_time-of-day_CoordinatedXSD#0:Forced order assignment by dummy value. Variable Solar DeclinationLA#0:Forced order assignment by dummy value. Variable LAtitude of location (in radians)
LG#0:Forced order assignment by dummy value. Constant LonGitude of location_HA#0:Forced order assignment by dummy value. Variable Hour Angle (in radians)ǤSL#0:Forced order assignment by dummy value. Variable Sine of aLtitude angle of sun (in radians)'AL#0:Forced order assignment by dummy value. Variable ALtitude angle of sun (in radians)}CZ#0:Forced order assignment by dummy value. Variable Cosine of aZimuth of sunɥAZ#0:Forced order assignment by dummy value. Variable AZimuth of sun3RL#0:Forced order assignment by dummy value. Variable Refracted aLtitude angle of sun (in degrees)TR#0:Forced order assignment by dummy value. Variable Tangent of Refracted altitudeܦXO%2081:YO%31:Forced order assignment. Constants X-Origin & Y-Origin" R%YO%1:Forced order assignment. Constant Radius maximum limit
Y%0:Forced order assignment by dummy value. Variable Y ordinate, and also reused for general purposesET#0:Forced order assignment by dummy value. Variable Equation of Time (in seconds)ILT#0:Forced order assignment by dummy value. Constant LaTitude of location (in degrees)701:TZ!:Forced order assignment by default value. Constant Time Zone displacement&939:LT#:LG#:LG#LG#DR#:LaTitude (in degrees) & LonGitude (in radians) coordinates of locationR0K$"":Forced order assignment by dummy value. Variable Keystrike1V%0:Forced order assignment by dummy value. Variable Valid keystrike2S%1:Forced order assignment of default value. Variable Sound: 0=quiet, not0=sound is allowed.%R411:40-column screen widthwS406:Disengage LABEL line of screen, disable scroll, perform equivalent CLST@29,(152):@69," ":@109,"N":@149,"o":@189,"r":@229,"t":@269,"h":(174,56)(179,63),0,BF:(176,6)(176,15),1:place vertical North pointer on screenmU410:(XO%,YO%),0:register shadow-line origin, nul for the initial shadow-lineV412:29-column screen widthW2:Forced order of constants & variables is established, and constant PI# has aquired the value of PiX:Laptop-specific datumY -2.3859440304::LCD screen Angle of Tilt in Tandy M10x laptop as measured by Ron Wiesen (in degrees)w:List of Time Zone displacements. In line 540, change the RESTORE line number so it points to the appropriate line in following list. Displacement is +/- whole or fractional hours relative to the Prime Meridian. Range is -12.0 to +12.0.l 0::UTC, Burkina Faso, Canary Is., Cote D' Ivoire, Faroe Is., Gambia, Ghana, Guinea, Guinea Bissau, Iceland, Ireland, Isle of Man, Liberia, Mali, Mauritania, Madeira Is., Morocco, Portugal, Senegal, Shetland Is., Sierra Leone, Togo, U.K.|:UTC-0.25 -0.5:UTC-0.75خ -1.0::Azores, Cape Verde, Scoresbysund area of Greenland:UTC-1.25 -1.5:UTC-1.75# -2.0::South Georgia Is.3:UTC-2.25> -2.5N:UTC-2.75ů -3.0::Argentina, Brazil(NE&SE), French Guiana, Nuuk/Alluitsup Paa/central area of Greenland, Suriname, Uruguayկ:UTC-3.25 -3.5::Newfoundland time zone of Canada:UTC-3.75 -4.0::Atlantic time zone of Canada, Barbados, Bermuda, Bolivia, Brazil(NW&SW), Chile, Falkland Is., Grenada, Grenadines, Guadeloupe, Guyana, Labrador, New Brunswick, Nova Scotia, Paraguay, Thule area of Greenland, Virgin Is.
:UTC-4.25/ -4.5::Venezuela time zone?:UTC-4.75 -5.0::Eastern time zone of U.S. and Canada, Bahamas, Columbia, Cuba, Equador, Haiti, Jamaica, Panama, Peru±:UTC-5.25ͱ -5.5ݱ:UTC-5.75 -6.0::Central time zone of U.S. and Canada, Belize, Costa Rica, Easter Is., Galapagos Is., Guatemala, Honduras, Monterray/Mexico City/Cancun area of Mexico, Nicaragua, San Salvador, Saskatchawan Canada:UTC-6.25ʲ -6.5ڲ:UTC-6.758 -7.0::Mountain time zone of U.S. and Canada, Chihuahua/La Paz/Culiacan area of MexicoH:UTC-7.25S -7.5c:UTC-7.75ͳ -8.0::Pacific time zone of U.S. and Canada, Pitcairn Is., Tijuana/Mexicali/Nogales area of Mexicoݳ:UTC-8.25 -8.5:UTC-8.75- -9.0::Alaskan time zone of U.S., Gambier Is.=:UTC-9.25Y -9.5::Marquises Is.i:UTC-9.75 -10.0::Hawaiian time zone of U.S., Cook Is., French Polynesia, Line Is.ʴ:UTC-10.25ڴ:UTC-10.5:UTC-10.75& -11.0::Midway Is., Niue, Phoenix Is., Samoa, Tonga7:UTC-11.25G:UTC-11.5X:UTC-11.75z -12.0::same as line below +12.0::same as line above, Fiji, Gilbert Is., Marshall Is., New Zealand, Nauru, Tuvalu, Uelen/Anadyr area of Russia, Wake Is.:UTC+11.75 ":UTC+11.53:UTC+11.25 +11.0::Micronesia (E), Solomon Is., Vanuatu, New Caledonia, Tabor/Magadan area of Russia:UTC+10.75:UTC+10.5ƶ:UTC+10.25 +10.0::Capital Territory Australia, Guam, Micronesia (W), New South Wales Australia, Northern Mariana Is., Papua New Guinea, Queensland Australia, Saipan, Tasmania, Verkhoyansk/Khabarovsk area of Russia, Victoria Australia:UTC+9.75 +9.5::Northern Territory Australia, South Australia :UTC+9.25{ +9.0::Eastern Indonesia, East Timor, Japan, North Korea, Palau, South Korea, Yakutsk/Chita area of Russia:UTC+8.75:UTC+8.5:UTC+8.25V +8.0::Brunei, Central Indonesia, China, Hong Kong, Irkutsk/Lake Baykal area of Russia, Macau, Malaysia, Mongolia, Philippines, Singapore, Taiwan, Western Australiaf:UTC+7.75u:UTC+7.5:UTC+7.25 +7.0::Cambodia, Laos, Noril'sk/Kyzyl area of Russia, Western Indonesia, Thailand, Vietnam:UTC+6.75
+6.5::Myanmar:UTC+6.25 +6.0::Eastern Kazakhstan, Bangladesh, Bhutan, British Indian Ocean Territory, Omsk/Novosibirsk area of Russia +5.75::Nepalغ +5.5::Andaman/Nicobar, India, Sri Lanka :UTC+5.25q
+5.0::Maldives, Western Kazakhstan, Kyrgyzstan, Pakistan, Perm/Ekaterinburg area of Russia, Tajikistan, Turkmenistan, Uzbekistan:UTC+4.75 +4.5::Afghanistan
:UTC+4.25 +4.0::Armenia, Azerbaijan, Georgia, Oman, United Arab Emirates:UTC+3.75 +3.5::Iran%:UTC+3.25 +3.0::Bahrain, Djibouti, Eritrea, Ethiopia, Iraq, Kenya, Kuwait, Madagascar, Middle East & Moscow/Groznyy area of Russia, Qatar, Rwanda, Saudi Arabia, Somalia, Sudan, Tanzania, Uganda, Yemen:UTC+2.75:UTC+2.5:UTC+2.25 +2.0::Eastern Europe, Botswana, Burundi, Cyprus, Egypt, Greece, Israel, Jordan, Kaliningrad area of Russia, Lebanon, Lesotho, Libya, Malawi, Mozambique, South Africa, Swaziland, Syria, Turkey, Zambia, Zimbabwe:UTC+1.75:UTC+1.5$:UTC+1.25# +1.0::Central Europe, Albania, Algeria, Andorra, Angola, Balearic Is., Benin, Cabinda, Cameroon, Central African Rep., Chad, Congo, Corsica, Malta, Macedonia, Nambia, Niger, Nigeria, Norway, Gabon, Serbia, Sicily, Spain, Svalbard, Sweden, Tunisia3:UTC+0.75B:UTC+0.5R:UTC+0.25:List of LaTitude (in degrees) & LonGitude (in degrees) coordinates for various folks. In line 550, change the RESTORE line number so it points to the appropriate line in following list.P +45.387828,-075.758390::coordinates for Steve Adolph -39.930433,+175.047639::coordinates for Philip Avery +37.683856,-097.360856::coordinates for Jake Bickhard +33.183009,-117.368333::coordinates for Tim BordenK +32.825333,-079.986110::coordinates for Vic Boudolf [WA4JBG] +37.310544,-079.960478::coordinates for Brian Brindle [KG4NIQ] -37.814088,+144.963554::coordinates for Neal Collins +37.462709,-122.227326::coordinates for CometC +35.240048,-080.848405::coordinates for Chris Fezzler +36.967490,-086.440443::coordinates for Russell Flowers +26.978309,-082.149641::coordinates for Don Fox Sr.Ð +42.473604,-070.969059::coordinates for Art Goodwin at his office parking spaceQÑ +44.083674,-091.360518::coordinates for John GrafÒ -43.531650,+172.636741::coordinates for Daryn HanrightÓ +37.939496,-122.082196::coordinates for Richard Hanson [KZ0OMY]Ĕ +28.089654,-097.827800::coordinates for Rick Herndon [K5FNI]_ĕ +33.876072,-117.899707::coordinates for John R. HogerhuisĖ +38.559515,-121.323411::coordinates for Ron Hudsonė +42.234255,-074.237661::coordinates for Keith JohnsonŘ +31.621388,-097.741389::coordinates for Lee Kelley [KC5OID]Wř +34.828924,-098.246028::coordinates for Wes MedlinŚ +27.864620,-080.654771::coordinates for John Meshelany Jr.ś +32.722062,-111.690118::coordinates for Kevin MillerƜ +38.397697,-121.378503::coordinates for Eric NakanoQƝ +43.392240,-095.148312::coordinates for Russ Oechslinƞ +47.558648,-122.286130::coordinates for Chris Osburn [KD7DVD]Ɵ +40.115531,-075.027815::coordinates for Mitch ParkerǠ +42.273403,-088.556285::coordinates for Gary Phillips [KA9NZI]]ǡ +33.520688,-086.802362::coordinates for Bert Put [KG4BEC]Ǣ +58.865766,+015.000034::coordinates for Roger Schmidtǣ +43.639820,-079.431633::coordinates for Mike Stein [VE3IPK]Ȥ -34.854519,+138.660408::coordinates for Daryl Testerkȥ +49.967749,+001.344114::coordinates for Paul Treuthardt when in FranceȦ +50.878811,+004.361556::coordinates for Jan Vanden Bosscheȧ +38.546789,-121.436514::coordinates for Raymond Walden(ɨ +45.491247,-122.935579::coordinates for Gary Weberfɩ +34.922464,-082.306840::coordinates for Fred Whitakerɪ +35.640969,-082.564246::coordinates for John Whitton [KU2U]ɫ +28.398600,-080.748465::coordinates for Ron Wiesen [WD8PNL].ʬ +36.066901,-094.152848::coordinates for Garrett Withrow