Geodesics | Solution of geodesic problems on the ellipsoid
kandi X-RAY | Geodesics Summary
kandi X-RAY | Geodesics Summary
Distances between points on an ellipsoidal earth model.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Calculate the distance
- Check the distance .
- Get the distance .
- Return the bearing .
- Returns true if the binding is finished .
- Get longitude .
- Get the latitude .
Geodesics Key Features
Geodesics Examples and Code Snippets
Community Discussions
Trending Discussions on Geodesics
QUESTION
I am trying to solve a system of geodesics orbital equations using python. They are coupled ordinary equations. I've tried different approaches, but they all yielded me a wrong shape (the shape should be some periodic function when plotting r and phi). Any idea on how to do this? Here are my constants
...ANSWER
Answered 2020-Mar-26 at 05:32It seems like you are looking at the spacial coordinates in an invariant plane of the geodesic equations of an object moving in Schwarzschild gravity.
One can use many different methods, which preserve as much of the underlying geometric structure of the model as possible, like symplectic geometric integrators or perturbation theory. However, I suspect that the default method for solve_ivp() is 4th order Runge-Kutta, which is a fairly good, direct and simple method.
Warnng: your initial condition for Y
equals Schwarzschild's radius, so these equations may fail or require special treatment (especially the time component of the equations, which you have not included here!) It may be that you have to switch to different coordinates, that remove the singularity at the even horizon. Moreover, the solutions may not be periodic curves, but quasi-periodic, so they may not close up nicely.
For a quick and dirty treatment, but possibly a fairly accurate one, I would differentiate the first equation
QUESTION
In trying to use the midpoint method to create geodesics on a surface, but I am not comfortable with the Matlab syntax needed to iteratively update a matrix containing points on a surface embedded in R3, and, therefore, composed of 3 rows and n columns with the first element given as, say, A[:,1], and the last element, A[:,n].
Initially two points would be chosen on the XY plane along a line. Multiple points along the line segment on the XY plane running through A[:,1] and A[:,n] would be projected onto the surface using a function f(x,y), so that we would end up with the initial matrix with the first row containing a number of coordinates in the X axis; the second row, the coordinates in the Y axis; and the third row, the height of the curve at each point of f(x,y). Each column is one point.
So if the first two columns are A[:,1] and A[:,2], I would like to obtain an updated matrix where the first column would be unchanged, A[:,1], and the second column would be the entrywise average of A[:,1] and A[:,2]. In other words, the first entry of the column (x) will be the average of the first entry of the first and second columns; same for the second (y) and third (z) entries. At the other end the matrix would end with the average of A[:,n - 1] and A[:,n] in the penultimate column, and A[:,n] in the very last column.
Then a minimization step would take place to project each column to the surface f(x,y), and the same process of averaging would start again.
Note that with every step the matrix would grow by one column.
Logically, this process would be within a loop in a function.
I would like to ask how to iteratively achieve the averaging step, which, for example would in the first step go from
...ANSWER
Answered 2020-Feb-13 at 19:31The following line updates A
based on your description. However, since A
's number of column increases (as you already know), you'd better preallocate it and slightly adjust the following assignment (which would go in the for
loop).
QUESTION
I have a square matrix D
(currently represented as a numpy array of shape (572, 572)) plausibly corresponding to pairwise distances between points along the surface of a roughly cylindrical object. I.e., the value D[i,j]
corresponds to the minimal length of any path along the surface of that hollow cylinder. How do I construct a 3-dimensional (or n-dimensional) embedding of those 572 points into euclidean space which preserves those geodesic distances?
Algorithms like locally linear embedding and isomap are able to take that matrix of pairwise geodesic distances and output an embedding so that the pairwise euclidean distances are the same as the original geodesics. While this is not the same task in general, in the case where the output happens to approximate a hypercube in some dimension the desired transformation has actually happened (consider the swiss roll) since the embedding is itself a manifold, so euclidean distance corresponds to geodesic distance.
This is not the case for even slightly more complicated objects like cylinders. By treating geodesic distances as euclidean, antipodal points on the desired cylinder are mapped to locations much further from each other than desired, and the corresponding global optimization problem will often result in a branching structure with ends of the branches corresponding to maximally distant antipodal points, amplifying small perturbations in the random sampling of the cylinder. In general, naive applications of these algorithms doesn't seem to solve the problem at hand.
Another somewhat fruitful (though expensive) approach has been a brute monte carlo technique. I generate random samples from tubelike objects with varying parameters till I find a set of parameters generating geodesic distance matrices similar to mine, up to a permutation (which is dealt with not too inefficiently by solving the linear system converting that distance matrix to mine and testing to see if the result is near a permutation matrix). Then a near-optimal mapping from my 572 points onto that object preserving pairwise distances is performed by finding the nearest permutation matrix to the aforementioned near-permutation matrix.
This is yielding plausible results, but it presupposes the shape of the data and is horrendously expensive. I've performed some of the more obvious optimizations like working with small random samples instead of the entire data set and using gradient-based techniques for parameter estimation, but a more general-purpose technique would be nice.
CaveatsThis problem of course does not have a unique solution. Even assuming that manifolds can be unambiguously identified in 3-space from a finite uniform sampling, just squishing a cylinder yields a shape with the same geodesics and different euclidean distances (hence a different embedding). This does not bother me any more than LLE and Isomap yielding differing solutions, and I would be fine with any plausible answer.
With regards to uniquely identifying manifolds from a finite sample, for the sake of argument I would be fine just using the dist_matrix_
attribute from a fitted Isomap
class from the scikit-learn
package without any special parameters to find the geodesics. That performs an unnecessary MDS
step, but it isn't terribly expensive, and it works out of the box. We would then like an embedding which minimizes the frobenius distance between the original geodesic distance matrix and the dist_matrix_
attribute.
ANSWER
Answered 2018-Jun-07 at 17:47While I had initially ruled out locally linear embedding and other similar techniques, that seems to have been in haste. Since manifolds are in fact locally linear, a sufficiently well-sampled, sufficiently nice manifold has the property that its small geodesic distances are approximately the same as their corresponding euclidean distances.
With that in mind, any reconstruction which treats the nearest geodesic neighbors as the nearest euclidean neighbors and approximates the euclidean distance via the geodesic distance will approximately preserve global geodesic distance, up to an accumulated error term. This means that all the standard algorithms which only use local distances have the ability to provide an approximately correct embedding. These include and are not limited to
- Locally Linear Embedding
- Isomap
- Spectral Embedding
Some classical embedding algorithms will not work correctly in this application since they attempt to preserve all distances, and the large geodesics are probably poor representations of euclidean distance. For example, multidimensional scaling is a poor fit without modifications.
Note The reason LLE seemed to yield poor results in my preliminary analysis is that one of my assumptions was violated -- the manifold being sufficiently well-sampled. I was applying it to simple shapes with known desired behavior, but I mistakenly used too few points to ensure a quick feedback loop in my analysis. Better-sampled manifolds behave exactly as they're supposed to.
QUESTION
I'm generating html files from python (mainly using geopandas module) containing highmaps objects.
(The code is too long to fit here in stackoverflow as geojson are included in html files : please don't check the included code but refer to the fiddles instead).
The map datas are :
one geojson (directly generated from geopandas, using the .to_json() method), loaded in Departements serie as map serie. It is directly stored in the html file, using mapData option. Both crs and hc-transform properties are set manually using python.
one array of points (fields beeing lon, lat and name), manually generated using python ; this is loaded in cities serie as mappoint serie.
Both series are prealably converted in the same geodesic system using geopandas (which I think uses pyproj4 dll somewhere).
I got geodesics systems as proj4 strings from spatialreference, that is:
EPSG 2154 (official french system) : "+proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"
WGS84 (= epsg 4326) : "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"
When I convert all datas in WGS 84, I get correct results (though the map looks distorded for French users) : see this fiddle.
When I convert all datas in 2154, I get serious errors (as you can see, cities are displayed erraticly, which seems to include some latitude inversion as well) ; see this fiddle.
When I keep all datas in WGS 84 and just set the hc-transform to epsg2154, I still have strange results, though I think this is the correct way referenced in the doc (I'm not 100% certain of that, as those are maps generated using distant geojson datas and I'm not used to program in javascript)...
I also tried using the x/y properties for the mappoint serie (instead of lon/lat) but this does not improve the result (though I checked datas in QGis and these coordinates are 100% right).
How should I do this ?
Code sample (please refer to fiddles for working example with geojson) :
...ANSWER
Answered 2018-Aug-28 at 16:51Ok, so this is an akward solution : I still don't understand how this could solve the problem, but it works... [EDIT : this is indeed the correct solution for the time beeing, see EDIT at the end of the post]
What I did was :
use the proj4 string for ESPG2154 as previously said : "+proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"
set the mapData with xy coordinates in EPSG2154's system : [761574.9000000217, 6918670.299997976], [761648.2000000217, 6918469.799997974], ...
set the hc-transform/crs on the mapData as previously said : 'hc-transform': {'default': {'crs': '+proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs'}}, 'crs': '+proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs'
set the mappoint datas using x/y instead of lat/lon, without any 'hc-transform' or crs, but with y coordinates inverted : data: [{'x': 727759.0000000142, 'y': -6884382.999997055, 'name': 'Chateau-Thierry'}, ...]
Note that :
- I inverted the y coordinates, for the mappoint datas, and that these are not the correct coordinates in any sense ;
- I also set yAxis to reversed: true, which should not be the default value as stated in the API's doc. But in fact it doesn't change anything if you remove this line or not : somehow, using multiple series including one mapData seems to be changing the default property (at least when using proj4 in this configuration). In fact, if you put it to reversed:false, you won't have any correct results, even if you don't invert the y coordinate as stated before.
I think this is some kind of undocumented bug (I might be wrong still), I will try to refer if to highcharts'staff...
See complete functional exemple in this fiddle.
QUESTION
I retrieve data from the net containing real geodesic expressions, by that I mean degrees, minutes and seconds with Unicode symbols: U+00B0, U+2032 and U+2033
, named Degree, Prime and Double Prime. Example:
ANSWER
Answered 2018-Jan-31 at 06:38You may try this regex to split the string:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Geodesics
PHP requires the Visual C runtime (CRT). The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable for all these PHP versions, see visualstudio.microsoft.com. You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds. The CRT installer supports the /quiet and /norestart command-line switches, so you can also script it.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page