'Name: sphere-angle.ave 'Function: Calculate angle (ABC) made from three points (A,B,C) basing on a sphere. 'Author: Maxim Dubinin ' sim@gis-lab.info 'Created 16:42 31.05.2006 'Last Update: 16:42 31.05.2006 'Notes: This script is used in Argos-tools. For calculating another script called Great-circles is needed. pntlist = SELF 'distance calculation using greate cirlces (separate script) pnts = {pntlist.get(0), pntlist.get(1), pntlist.get(3),pntlist.get(4)} 'AB c = av.run("MD.ARGOS.GreatCirclesDist", pnts).Get(1) pnts = {pntlist.get(1), pntlist.get(2), pntlist.get(4),pntlist.get(5)} 'BC a = av.run("MD.ARGOS.GreatCirclesDist", pnts).Get(1) pnts = {pntlist.get(0), pntlist.get(2), pntlist.get(3),pntlist.get(5)} 'AC b = av.run("MD.ARGOS.GreatCirclesDist", pnts).Get(1) B = (((b.cos) - ((a.cos)*(c.cos)))/((a.sin)*(c.sin))).ACos.AsDegrees return B