Meranie s GPS: Rozdiel medzi revíziami
Zo stránky SensorWiki
Bez shrnutí editace |
|||
Riadok 135: | Riadok 135: | ||
// to Arlington | // to Arlington | ||
5918.185064088764 | 5918.185064088764 | ||
=== Utilitky === | |||
Using Processing to read GPS data and displaying a map | |||
https://www.dfrobot.com/blog-198.html | |||
Prevodnik .gpx do csv (okrem ineho) | |||
Convert a GPS file to plain text or GPX | |||
https://www.gpsvisualizer.com/convert_input | |||
=== Vypocet vzdialenosti GPS Lat/Lon === | |||
Program for distance between two points on earth | |||
https://www.geeksforgeeks.org/program-distance-two-points-earth/ | |||
This routine calculates the distance between two points (given the | |||
latitude/longitude of those points). | |||
https://www.geodatasource.com/developers/c | |||
How do I calculate the distance between two points specified by latitude and longitude? | |||
https://stackoverflow.com/questions/27928/calculate-distance-between-two-latitude-longitude-points-haversine-formula | |||
alculate distance, bearing and more between Latitude/Longitude points | |||
https://www.movable-type.co.uk/scripts/latlong.html | |||
=== Presnost a analyza GPS === | |||
GPS Accuracy. Tools & Tips to Test Your Device | |||
https://lembergsolutions.com/blog/gps-accuracy-tools-tips-test-your-device | |||
https://www.researchgate.net/post/Using_a_phone_as_scientific_GPS_how_accurate_technical_specifications_Apps | |||
https://play.google.com/store/apps/details?id=precise.GPS.v2.free&hl=en_US | |||
https://play.google.com/store/apps/details?id=com.chartcross.gpstest&hl=en_US | |||
https://debrief.github.io/? - marine analysis? | |||
Verzia z 12:34, 26. apríl 2020
Modifikované cvičenie na DOMA:
Úloha:
Spravte základné testovanie presnosti GPS snímačov.
Zistite:
a) aká je statická presnosť vašeho GPS. Meranie v jednom bode vykonávajte nepretržite minimálne 6 hodín (napr. v noci) a získané údaje zakreslite do X-Y grafu. Určite aká je maximálna odchýlka, max. priemerná odchýlka a max. odchýlka priemeru od správnej hodnoty (ak sa vám podarí ju získať). Minimálny počet bodov je 36 (6x6). Ak budete pracovať vo dvojici, počet bodov je dvojnásobný.
b) aká je dynamická presnosť vašeho GPS. Prejdete 3x peši (behom) štvorec o hrane 250 m alebo 3x autom štvorec o hrane min. 1km
Výsledky zakreslíte do grafu. Aká je maximálna odchýlka medzi jednotlivými trasami? Aká je maximálna odchýlka v rohoch štvorca?
Meranie nemusíte robiť v reálnom čase, t.j. môžete si data zaznamenať, napr. do súboru a výpočty robiť potom neskôr.
Odovzdať treba:
- video na ktorom vidno ako experiment prebiehal
- grafické zobrazenie trajektórie v mape (mapy.cz, strava.com a pod.)
- referát s výpočtami a vyhodnotením presnosti
- ak ste použili vlastný softvér, tak zdrojáky (.pde alebo .m a pod.)
Vzorový program
Tipy:
Môže sa vám hodiť:
- Konvertor GPX do CSV (lebo .csv viete otvoriť v Exceli)
- Výpočet vzdialeností z Lat/Lon súradníc
Definície a označenie
Budeme počítať vzdialenosť medzi dvoma bodmi a . Zemepisné súradnice sú dané zemepisnou šírkou a zemepisnou dĺžkou (latitude, longitude) oboch bodov a . Na ich poradí pre účely výpočtu vzdialenosti nezáleží.
Orientácia zemepisných súradníc je daná tak, že Sever (N) a Východ (E) sa vyjadrujú kladným, Juh (S) a Západ (W) záporným číslom. Zemepisné súradnice sa obvykle vyjadrujú v stupňoch, pri výpočte ich treba previesť do takých jednotiek, v akých očakávajú argument goniometrické funkcie na kalkulačke alebo vo vašom algoritme (stupne, radiány). Okrem toho si treba uvedomiť, že minúty a sekundy sú zo 60, takže S31 30' je -31,5 stupňa. Prevod stupňov na radiány je jednoduchý: radians = degrees * PI / 180.
function degreesToRadians(degrees) { return degrees * PI / 180; }
Označíme si pomocné rozdiely v súradniciach nasledovne:
It is not important whether the result is positive or negative when used in the formulae below.
"Mean latitude" is labeled and calculated as follows:
Colatitude is labeled and calculated as follows:
- For latitudes expressed in radians:
- For latitudes expressed in degrees:
Unless specified otherwise, the radius of the earth for the calculations below is:
- = 6,371.009 kilometers = 3,958.761 statute miles = 3,440.069 nautical miles.
= Distance between the two points, as measured along the surface of the earth and in the same units as the value used for radius unless specified otherwise.
Flat-surface formulae
Podľa https://en.wikipedia.org/wiki/Geographical_distance
A planar approximation for the surface of the earth may be useful over small distances. The accuracy of distance calculations using this approximation become increasingly inaccurate as:
- The separation between the points becomes greater;
- A point becomes closer to a geographic pole.
The shortest distance between two points in plane is a straight line. The Pythagorean theorem is used to calculate the distance between points in a plane.
Even over short distances, the accuracy of geographic distance calculations which assume a flat Earth depend on the method by which the latitude and longitude coordinates have been projected onto the plane. The projection of latitude and longitude coordinates onto a plane is the realm of cartography.
The formulae presented in this section provide varying degrees of accuracy.
Spherical Earth projected to a plane
This formula takes into account the variation in distance between meridians with latitude:
- where:
- and are in radians;
- must be in units compatible with the method used for determining
- To convert latitude or longitude to radians use
This approximation is very fast and produces fairly accurate result for small distances Šablóna:Citation needed. Also, when ordering locations by distance, such as in a database query, it is much faster to order by squared distance, eliminating the need for computing the square root.
Tento algoritmus je už trocha zložitejší, pravdepodobne je to haversin formula
pozri https://www.movable-type.co.uk/scripts/latlong.html
https://stackoverflow.com/questions/365826/calculate-distance-between-2-gps-coordinates
function distanceInKmBetweenEarthCoordinates(lat1, lon1, lat2, lon2) {
var earthRadiusKm = 6371;
var dLat = degreesToRadians(lat2-lat1);
var dLon = degreesToRadians(lon2-lon1);
lat1 = degreesToRadians(lat1);
lat2 = degreesToRadians(lat2);
var a = Math.sin(dLat/2) * Math.sin(dLat/2) +
Math.sin(dLon/2) * Math.sin(dLon/2) * Math.cos(lat1) * Math.cos(lat2);
var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));
return earthRadiusKm * c;
}
Napríklad
istanceInKmBetweenEarthCoordinates(0,0,0,0) // Distance between same // points should be 0 0 distanceInKmBetweenEarthCoordinates(51.5, 0, 38.8, -77.1) // From London // to Arlington 5918.185064088764
Utilitky
Using Processing to read GPS data and displaying a map
https://www.dfrobot.com/blog-198.html
Prevodnik .gpx do csv (okrem ineho) Convert a GPS file to plain text or GPX
https://www.gpsvisualizer.com/convert_input
Vypocet vzdialenosti GPS Lat/Lon
Program for distance between two points on earth https://www.geeksforgeeks.org/program-distance-two-points-earth/ This routine calculates the distance between two points (given the latitude/longitude of those points). https://www.geodatasource.com/developers/c How do I calculate the distance between two points specified by latitude and longitude?
alculate distance, bearing and more between Latitude/Longitude points https://www.movable-type.co.uk/scripts/latlong.html
Presnost a analyza GPS
GPS Accuracy. Tools & Tips to Test Your Device https://lembergsolutions.com/blog/gps-accuracy-tools-tips-test-your-device
https://play.google.com/store/apps/details?id=precise.GPS.v2.free&hl=en_US https://play.google.com/store/apps/details?id=com.chartcross.gpstest&hl=en_US
https://debrief.github.io/? - marine analysis?