I want to calculate the speed of the Hunga Tunga shockwave when it travelled the earth. I have the air pressure values from a local weather station for 15 and 16 January where the spikes of the Hunga Tunga eruption are clearly visible. My question: I need the distance from my weather station to the Hunga Tunga volcano without looking it up on the web. Tried to calculate the distance with the Haversine formula...but the atan2 block doesn't work for me.
Because we measure angles clockwise from north rather than counterclockwise from east, we end up using atan2(x,y) rather than atan2(y,x). See if reversing the two inputs fixes it for you.
That didn't work, no it's not a homework assignment. I put the same code in python witch gives me 16673.39 km as distance. In Snap due the atan2 function I get 21434 km distance. Is the Snap atan2 function some special kind of function? in stead atan2(y,x)?
Apart from reversing x and y, which I thought it did but that's not what the code seems to say, the only other thing that should make it special is that we use degrees rather than radians.