Is there a quick (equation) way to calculate the solar zenith angle if the solar azimuth angle is known? - geometry

I'm reviewing solar geometry calculations regarding to shading problems and, in the basic case, one wants to know whether a point will be shaded by another point at certain distance, height, azimuth angle made by both points regardint the N-S line and date.
The problem essentially reduces to calculate the solar zenith angle for that specified day when the solar azimuth angle is equal to the azimuth angle made by the points and compare it to the altitude angle made by both points (if the altitude angle is greater than the zenith angle, the point is shaded).
My issue is that equations in literature calculate the zenith first according to location and datetime, and then the solar azimuth as a function of the zenith. Both are correlated, but trying to solve the equations as functions of the solar azimuth seems to be analytically intractable (online equation solvers don't give answers).
I either want to know whether is a equation of the zenith as a function of the solar azimuth or if there is an analytical solution for the equation:
a sin(x) + b cos(x) = c
I tried solving the solar azimuth equation as a function of the zenith, and ran into a equation of the basic form a sin(x) + b cos(x) = c, which apparently has no analytical answer.

Related

Distance Metric different units

I am trying to cluster a radar database. The observations of a radar are given in Azimuth angle and range. For processing speed reasons I do not want to transform this polar data into a Cartesian system.
A normal Euclidean distance metric needs the same unit in x- and y-direction. I need to find the distance in azimuth direction and in range direction. Basically, you can imagine the Euclidean distance metric working in a circle and my solution should work in an ellipse.
A simple solution to the problem is in the attached image the red example.
Sketech of ellipse radius
I take from a centre point the distance in both directions.
I am searching for a solution that is more advanced like the blue example where I have all the points in an elliptical search.
EDIT:
I asked the same question a bit different formulated in the mathematics forum, maybe that helps you to understand my problem better. https://math.stackexchange.com/questions/3635438/epsilon-neighbourhood-for-polar-data

Cartesian to Latitude/Longitude

I have a 3D model of a 10km x 10km topographic map which I've imported from sketch-up , the model is just a bunch of X,Y,Z points (where X+ is the north and Z+ is straight up, perpendicular to the ground)
I know the Latitude Longitude values of the (0,0,0) point. So given a X,Y,Z point how do I get its Latitude Longitude values?
I need to be pretty accurate so you can't assume the earth is a perfect sphere (you can however assume it's an ellipsoid)
For best accuracy you need to know what map projection the map was drawn in. You should be able to find that out from the map. For example in the UK the Ordnance Survey maps use the OSGB36 datum, and the projection is Transverse mercator. The projection tells you how to convert geographic (lat,long for the datum ellipsoid) coordinates to map coordinates (easting and northing) and how to do the reverse calculation, which is pretty much what you want.
If you don't know the projection, the next best thing would be if you could find out -- again from the map, they are often written on it -- the scale-factor and convergence of the projection at some points on the map. The point is that there is usually a slowly spatially varying difference between map north (the direction the north axis points in) and true north (the direction of the north pole from a point, the direction of the latitude axis) and there is always a slowly spatiallty varying scale factor, the ratio of a distance in map coordinates and the true distance. Note that this not the same thing as the scale of the printed map (an inch to a mile or whatever), it is a property of the projection.
Over a 10km square, it would be reasonably accurate to treat both the scale and convergence as constants. Then given an x,y point you compute the map bearing from 0,0 using
b = atan2(x,y)
and convert this to a true bearing by subtracting the convergence.
You also compute the map distance by
r = hypot(x,y)*S
where S is the scale of the map, e.g. if your a change of 1 in x coordinates represents a distance of 100m, S is 100
and convert r to a true distance by dividing by the scale-factor.
Finally you want to compute the lat,long a given distance and bearing from a given point (the lat,long of 0,0). An accurate way to do this is to use Vincenty's formulae.
One thing to note here is that the scale and convergence, if quoted on the map will be relative to the ellipoid used in construction of the map, so you will be computing lat,long coordinates for that ellipsoid.

Finding two points' center of mass on a sphere (k-means on a sphere)

Please, help me to solve subproblem in my programming task (k-means clustering on a sphere).
Suppose the Earth is a sphere. And there are two points (we know their latitudes and longitudes) with masses m_1 and m_2 on it.
The problem is to find latitude and longitude of these two points' center of mass on a sphere, if the distance is measured as the great-circle distance.
You want to find a point that lies on the great circle arc at distance
l = L * m1 / (m1 + m2)
from the first point, where L is full distance between points.
You can use or
spherical linear interpolation : translate spherical coordinates to Descartes' coordinate system, work with vectors, translate back
or
geodesic approach - find bearing from the first point to the second, find distance L, and move distance l with bearing found. All formulae are at this page: Destination point given distance and bearing from start point

How to find points in a certain distance to a Latitude/Longitude Coordinate

I'm working with Latitude/Longitude Coordinates and i'm trying to find an equation for a circle on the surface that includes all points that have a certain distance(on the surface) from the center.
It's important that this should work also with very big distances (for example half the perimeter of the earth), so the flat-earth approximation probably won't work, but assuming it's a perfect sphere is okay.
Can anybody help?
Thanks in advance!
I have this very same problem.
What I do is to convert the latitude and longitude to Cartesian coordinates fixed at the center of the Earth (which I assume is spherical).
I interpret these coordinates as a mathematical vector.
I also convert the desired "distance from center of circle"
to an angle at the center of the Earth,
that is, if the distance is d then the angle is alpha = d/R
where R is the Earth's radius.
I then find three vectors.
The first vector, v1, is just cos(alpha) times my original vector,
that is, it points from the center of the Earth to the center of my circle
and it has length R*cos(alpha).
The other two vectors, v2 and v3, have length R*sin(alpha),
and they are both perpendicular to v1 and to each other.
I can then get any point on the desired circle by taking
v1 + cos(beta)*v2 + sin(beta)*v3
where beta can range from 0 to 2*pi.
Finally, if I want the latitude and longitude of that point,
I convert it back from Cartesian coordinates.
If you never actually care about the Cartesian coordinate model but will
instead use only the latitudes and longitudes that result,
you can simplify the procedure slightly by assuming R == 1.
You can then simplify the formulas so that you never have to define
the variable R.
The coordinate conversions in either direction can be fairly straightforward.
An easy way to find vector v2 is to take the x and y coordinates of v1
(ignoring z), rotate the resulting vector 90 degrees in the x-y plane
(so if you started with (x,y,z), the new vector is (-y,x,0)),
and then scale the vector to the desired size.
Of course if the x and y coordinates of v1 are zero then you can
let v2 be any vector in the x-y plane.
To get v3 you can take the cross product of v1 and v2 and scale
as desired.

Decimal "constant" for lat and long in miles

Understanding that it would only be an estimate...
How what decimal constant would be able to be used to find a point X Miles away from a point in latitude and longitude to facilitate creating a lat long bounding box.
Unfortunately there is no such simple constant. As you go farther north, the "walking distance" between lines of longitude becomes smaller and smaller. If you were right next to the north pole, you could walk in a circle around it, covering almost no distance at all, and yet you'd still have touched every line of longtiude.
What you need is the great-circle distance between two points on a sphere.
Not sure what you are trying to do. You want a create a bounding box based on distance from a point? Are you looking for a way to calculate new lat/long from given lat/long using a distance in miles?
You can use the manhattan function to get an approximation of distance (realizing that lat/long are based on a spheroid approximating the earth, and truly calculating this requires more math), calculating x and y values with a forumla to follow
Manhattan function:
sqrt(x*x + y*y)
X and Y from Lat/Long:
x = 69.1 * (lat2 - lat1)
y = 53 * (lon2 - lon1)
Still, that method is pretty error-prone.
There's the great circle distance formula too, gotta use some trig for it, but it's probably worth it since you can get pretty good error in approximation depending upon what part of the spheroid (e.g. the lat/long) you start at.
Check out this page:
http://www.meridianworlddata.com/Distance-Calculation.asp

Resources