{"text_format":"3","workbook":"xls","n_sheets":3,"sheets":["Sheet1","Functions","Examples"],"not_rendered":{"macros":1,"external_links":1,"defined_names":7},"read":"whole","date_system":"1900","formulas":"cached_only"}

{"sheet":"Sheet1","index":0,"n_rows":0,"n_cols":0,"rows_kept":0,"flags":["formulas_cached_only"]}

{"sheet":"Functions","index":1,"n_rows":118,"n_cols":4,"rows_kept":118,"flags":["formulas_cached_only"]}
["Geodetic Calculations (mainly for geocachers)",null,"Version:",40]
["Copyright (C) 2010  Per \"crumlin\" Pedersen <per@crumlin.dk>"]
[]
["This spreadsheet contains a number of functions, written in Basic, that will calculate distances and bearings on the surface of the earth."]
["Furthermore, it contains various functions useful to geocachers solving, and constructing, mystery caches."]
["The functions, outlined below, can be entered in a cell just like any other spreadsheet function, and will show the result in the cell."]
[]
["Geodetic functions:",null,"Geodetic formulas using T. Vincenty's functions for calculating distances and bearing on an ellipsoidal surface (such as the earth). The calculations should be very similar to those performed by a GPS unit."]
[null,"GeoPosition(Latitude ;Longitude [;Datum [;Format]])","Construct a position from latitude and longitude"]
[null,"GeoLatitude(Position)","Get the latitude from a position"]
[null,"GeoLongitude(Position)","Get the longitude from a position"]
[null,"GeoProjection(Position ;Distance ;Azimuth [;Format])","Project position with distance and bearing to get a new position"]
[null,"GeoReckoning(Position ;Distance ;Azimuth)","Project the bearing at position with a distance"]
[null,"GeoDistance(Position ;Position)","Calculate distance (meters) between two positions"]
[null,"GeoBearing(Position ;Position)","Calculate bearing (degrees) from one position to another"]
[null,"GeoLineIntersection(Position ;Azimuth ;Position ;Azimuth [;Format])","Calculate the position where two lines intersects"]
[null,"GeoArcIntersections(Position ;Distance ;Position ;Distance [;Instance [;Format]])","Calculate one of the positions where two circles intersect each other"]
[null,"GeoLineArcIntersections(Position ;Azimuth ;Position ;Distance [;Instance [;Format]])","Calculate one of the positions where a line is intersecting a circle"]
[null,"GeoCircumcenter(Position ;Position ;Position [;Format])","Calculate the position with equal distance from three other positions"]
[null,"GeoIncenter(Position ;Position ;Position [;Format])","Calculate the position with equal distance to sides in triangle"]
[null,"GeoCentroid(Position ;Position ;Position [;Format])","Calculate the gravity center of a triangle"]
[null,"GeoOrthocenter(Position ;Position ;Position [;Format])","Calculate the orthocenter"]
[null,"GeoIncenterRadius(Position ;Position ;Position [;Format])","Calculate the distance to the sides"]
[null,"GeoDeclination(Position [;Date])","Calculate the magnetic deviation at a given position (and time as decimal year)"]
[null,"GeoTransform(Position ;Datum [;Datum [;Format]])","Transform the position to another Datum, possibly from a specific Datum if not noted in the position."]
[null,"GeoClone(Position [;Format])","Copy a position (possibly in another format)"]
[null,"GeoThreeCirclesIntersect(Position1 ;Position2 ;Position3 ;Distance1 ;Distance2 ;Distance3 [;Format])","Find the best position within the given distance from three points. The three points must be in the same UTM zone."]
[null,"GeoTCIAverageDistance(Position1 ;Position2 ;Position3 ;Distance1 ;Distance2 ;Distance3 [;Format])","Get the average distance error from above calculation"]
["Spherical functions:",null,"Spherical formulas using trigonometric function are faster, but less precise, than above. "]
[null,"SphereDistance(Position ;Position)","Calculate haversin distance (meters) between two positions. The earth radius at the first position is used as radius for the sphere."]
[null,"SphereBearing(Position ;Position)","Calculate bearing (degrees) from one position on a sphere to another"]
[null,"SphereLineIntersection(Position ;Azimuth ;Position ;Azimuth [;Format])","Calculate the position where two lines intersects on a perfect sphere"]
["Sun & Moon:"]
[null,"SunRise(Position ;Date; [;Timezone [;Zenith]])","Calculate the time of sunrise at a given position on a given day"]
[null,"SunSet(Position ;Date; [;Timezone [;Zenith]])","Calculate the time of sunset at a given position on a given day"]
[null,"MoonRise(Position ;Date; [;Timezone [;Zenith]])","Calculate the time of moonrise at a given position on a given day"]
[null,"MoonSet(Position ;Date; [;Timezone [;Zenith]])","Calculate the time of moonset at a given position on a given day"]
["Functions to convert to human readable form:"]
[null,"GeoLength(Distance [;Unit])","Show distance in more readable unit (defaults to Metric)"]
[null,"GeoDirection(Azimuth)","Show bearing as direction (N, SW, ...)"]
[null,"GeoAzimuth(Azimuth [;Decimals [;Format]])","Show azimuth in chosen format"]
["UTM konversion:"]
[null,"GeoUtm(Position)","Calculate UTM coordinates from geodetic position"]
[null,"UtmGeo(Position [;Format])","Calculate geodetic position from UTM coordinates"]
[null,"UtmPosition(Zone ;Easting ;Northing [;Datum [;Format]])","Construct a position from UTM zone, easting and nothing"]
[null,"UtmZone(Position)","Get the UTM zone from a position"]
[null,"UtmEasting(Position)","Get the UTM easting from a position"]
[null,"UtmNorthing(Position)","Get the UTM northing from a position"]
["GPX:"]
[null,"GpxSave(Filname ;Waypoints ;Positions ;Descriptions [;Symbol])","Save a range of waypoint names, positions and descriptions to a GPX file"]
["Geocaching:"]
[null,"GcNumber(Cache)","Calculate the GC number from a cache number"]
[null,"GcValue(GC)","Calculate the cache number from a GC number"]
[null,"GcCharacterSum(Text [;Offset [;Modulo]])","Calculate the sum of all character values in a text"]
[null,"GcCharacterProduct(Text [;Offset [;Modulo]])","Calculate the product of all character values in a text"]
[null,"GcCharacterNumbers(Text [;Offset [;Modulo]])","Show character values of text"]
[null,"GcDigitSum(Text)","Calculate the sum of all digits in a text"]
[null,"GcDigitalRoot(Number)","Calculate the digital root of a number"]
[null,"GcBlackSpace(Text)","Strip whitespaces from string"]
[null,"GcLineWrap(Text ;Width)","Insert line break after each number of characters"]
[null,"GcWordWrap(Text ;Width [;PreserveLinefeed=False]))","Insert line break each time a word would otherwise exceed the with"]
[null,"GcReverse(Text)","Reverse order of characters in string"]
[null,"GcX(Text ;Index)","Extract the character at the index. If the index is a letter, for example ”A”, the index in the alphabet (=1) is used."]
[null,"GcEval(Text)","Calculates the matemathical expression in paranthesis and replace the result."]
[null,"GcLetterSort(Text)","Sort letters in text"]
[null,"GcLetterSub(Text1, Text2)","Return number of letters in one text that is not present in the other text.The number is negative when from the second text."]
[null,"GcPhoneKeys(Text [;Separator])","Get the keys used on a cell phone to generate the text, separated by 'Separator' when given"]
[null,"GcPhoneText(Keys)","Calculate the text presented when the given keys are entered on a cell phone"]
[null,"GcFromBase(Text ;Radix) GcToBase(Number ;Radix)","Conversion between floating point numbers in base 2-36"]
["Encryption:"]
[null,"GcRot13(Text)","(De)crypt hint"]
[null,"GcVigenereMessage(Cipher, Key)","Decrypt Vigenère"]
[null,"GcVigenereCipher(Message, Key)","Encrypt Vigenère"]
[null,"GcBealeMessage(Cipher; Book)","Decrypt Beale"]
[null,"GcBealeCipher(Message; Book)","Encrypt Beale"]
[null,"GcEnigma(CipherText [;GrundStellung [;UmkehrsWalze [;Walzenlage [;RingStellung [;SteckerVerbindungen]]]]])","En/De-crypt text with an three or four wheel Enigma machine"]
[null,"GcFormat(CipherText ;Grouping)","Formats text in groups"]
["Big Integers: (Highly experimental)"]
[null,"BigIntAdd(Addend ;Addend)","Calculate the sum of two big integers"]
[null,"BigIntSubtract(Minuend ;Subtrahend)","Calculate the difference between two big integers"]
[null,"BigIntMultiply(Multiplikand ;Multiplikand)","Calculate the product of two big integers"]
[null,"BigIntDivide(Dividend ;Divisor)","Calculate the quotient of two big integers"]
[null,"BigIntPower(Base ;Exponent)","Calculate the exponentation of two big integers"]
[null,"BigIntSqrt(Integer)","Calculate the square root of a big integer number"]
[null,"BigIntMod(Dividend ;Divisor)","Calculate the remainder of an integer division"]
[null,"BigIntModPow(Base ;Exponent ;Modulus)","Modular exponentiation"]
[null,"BigIntModInv(Integer ;Modulo)","Modular multiplikative inverse, -1 if none"]
[null,"BigIntGCD(Integer ;Integer)","Calculate the greatest common divisor"]
[null,"BigIntAnd(Integer ;Integer)","Calculate bitwise AND of two big integers"]
[null,"BigIntOr(Integer ;Integer)","Calculate bitwise OR of two big integers"]
[null,"BigIntXor(Integer ;Integer)","Calculate bitwise XOR of two big integers"]
[null,"BigIntNot(Integer [;Bits])","Inverts the bits in a big integer"]
[null,"BigIntToBase(Integer ;Radix)","Convert a base 10 big integer"]
[null,"BigIntFromBase(Integer ;Radix)","Convert a n arbitrary base number into base 10"]
["Parameters:"]
[null,"Position","Text string containing the position in one of the below formats. The position can end with the Datum in paranthesis."]
[null,"Format","Format for position i degrees ”D”, degrees and minutes ”DM”, degrees, minutes and seconds ”DMS”, as ”UTM” or as radians \"R\""]
[null,"Distance","Distance (in meters)"]
[null,"Azimuth","Direction from north (clockwise)"]
[null,"Zenith","The angle from zenith to use when calculating sunrise and sunset. Default is 90.83333333333 (90º50')"]
[null,"Timezone","The offset from UTC (in decimal). Default for calculating sunrise and sunset, is to calculate it from the longitude."]
[null,"Unit","Displayunit, \"Metric\" for m and km, \"Statute\" for miles and feet or \"Nautical\" for nm"]
[null,"Instance","Value (1 or 2) for the intersection to find when there are two"]
[null,"Latitude","Latitude (in radians). The angle between the equator and a position on the ellipsoid surface seen from the center"]
[null,"Longitude","Longitude (in radians). The angle between the 0-meridian and a position on the ellipsoid surface seen from the center"]
[null,"Zone","Zone number and letter"]
[null,"Easting","The east west distance (in meters) from the center of the zone which is 500000 meters"]
[null,"Northing","The distance from equator (in meters). Southern hemispheres have 1000000 added to the negative distance"]
[null,"Datum","Name of Datum, for example \"WGS-84\" or \"EUR-M\""]
[null,"Offset","Offset is the number that are subtracted from the character value (ASCII value) of each character. For example, the value of \"A\" is 65, subtracting 64 yield 1. 64 is the default value when not specified."]
[null,"Modulo","If the character value, after Modulo is subtracted, is still greater than Modulo, the value is subtracted. For example, the character value of \"a\" is 32 greater than the value of \"A\", so Modulo=32 can be used to convert lower case letters to upper case. The value 32 is default."]
[null,"GrundStellung","Initial setting of the wheels of an Enigma machine, for example ”AAA”"]
[null,"UmkehrsWalze ","The Reflector on an Enigma machine. Can be ”B” or ”C”"]
[null,"Walzenlage","The order of the wheels on an Enigma machine. Wheel 1 to 8, Beta or Gamma can be used as numeric or Roman, for example \"\"123\"\" or \"\"I II III\"\""]
[null,"RingStellung","The position of the ring on each wheel on an Enigma machine, for example \"\"AAA\"\" or ”01 01 01”"]
[null,"SteckerVerbindungen","The wires swapping characters on an Enigma machine. Must come in pairs and each character used only once, for example \"\"AB FU EH\"\""]
[null,"Integer, Addend, Minuend, Subrahend, Multiplikand, Divident, Divisor, Exponent, …","Big integers.\nNumbers can be entered as text, possible prepended with an apostrof (') to avoid spreadsheet conversion"]
[null,"Radix","Number system radix. 2-36 uses numbers (0-9) and characters (a-z). BigInt functions additionally use 64 for base64 encoding, 85 for ascii85 encoding and 256 for binary data."]

{"sheet":"Examples","index":2,"n_rows":13,"n_cols":3,"rows_kept":13,"flags":["formulas_cached_only"]}
[]
["Example from Geoscience Australia: http://www.ga.gov.au/geodesy/datums/vincenty_inverse.jsp"]
["Flinders Peak","37°57′03.72030″S, 144°25′29.52440″E ","S37º57'03.72\" E144º25'29.52\""]
["Buninyong","37°39′10.15610″S, 143°55′35.38390″E","S37º39'10.16\" E143º55'35.38\""]
["Distance","54972.271 meters","54972,271 m"]
["Forward Azimuth","306 ° 52 ' 5.37 ''","306º52'05\""]
["Reverse Azimuth","127 ° 10 ' 25.07 ''","127º10'25\""]
[]
["Reverse:"]
["Distance",54972.27113933561,"54972,271 m"]
["Bearing",306.8681592027711,"306º52'05\""]
["Buninyong",null,"S37º39'10.16\" E143º55'35.38\""]
["Reverse bearing",127.17363062891377,"127º10'25\""]