IPB

Welcome Guest ( Log In | Register )

9 Pages V  « < 6 7 8 9 >  
Reply to this topicStart new topic
Martian Cartography
kymani76
post Mar 12 2021, 03:01 PM
Post #106


Member
***

Group: Members
Posts: 349
Joined: 20-June 07
From: Slovenia
Member No.: 2461



On the subject of Percy's geoJSON precision. I've noticed that since the sol 20 update they started using 9 decimal places coordinates. This presupposes mm level positional accuracy.
The track line itself still uses 6 decimal places precision, or 0.1 m accuracy, which seems much more realistic. I guess mm "accuracy" comes from GIS data manipulation that uses
9 digit precison by default.
Go to the top of the page
 
+Quote Post
Andreas Plesch
post Mar 12 2021, 05:47 PM
Post #107


Member
***

Group: Members
Posts: 248
Joined: 25-February 21
From: Waltham, Massachussetts, U.S.A.
Member No.: 8974



QUOTE (kymani76 @ Mar 12 2021, 10:01 AM) *
On the subject of Percy's geoJSON precision. I've noticed that since the sol 20 update they started using 9 decimal places coordinates. This presupposes mm level positional accuracy.
The track line itself still uses 6 decimal places precision, or 0.1 m accuracy, which seems much more realistic. I guess mm "accuracy" comes from GIS data manipulation that uses
9 digit precison by default.


The yaw_deg property is also changed to just yaw.

Here is my updated map animation:

https://bit.ly/PercyMAP

I noticed that the provided elevation is about 1m higher than the MOLA DEM elevation at the current waypoint. Perhaps it marks the rover body but the rover reference frame is supposed to originate at ground level.
[CORRECTION] I may have mixed up the way points. The MOLA and reported elevation are actually very close, at -2568.9m


--------------------
--
Andreas Plesch, andreasplesch at gmail dot com
Go to the top of the page
 
+Quote Post
Greenish
post Mar 13 2021, 01:51 AM
Post #108


Member
***

Group: Members
Posts: 219
Joined: 14-November 11
From: Washington, DC
Member No.: 6237



Thanks for finding and posting this direct JSON link.
For those like me who like the data but aren't used to the tools for this format, I recently had the brilliant, if belated, idea to search for "JSON-to-CSV converter," and sure enough there are several easy ones (e.g.). Stuff like thisis just easier for me to understand in a table (before it's plotted):
CODE
RMC   site drive sol  dist_km dist_mi easting      northing     elev_geoid  elev_radii  radius       lon          lat          roll    pitch   yaw      tilt    Note
3_0     3   0     0   0.000   0.000   4354494.086  1093299.695  -2569.910   -4253.470   3391936.530  77.45088572  18.44462715  -1.182  -0.025  130.882  0.000   Site increment, no motion.
3_110   3   110   14  0.006   0.004   4354497.517  1093294.730  -2569.862   -4253.417   3391936.583  77.45094676  18.44454339   0.971  -0.267  -15.112  0.000   First localization!
3_386   3   386   15  0.043   0.027   4354502.424  1093329.801  -2569.935   -4253.583   3391936.417  77.45103403  18.44513505   1.683  -1.700   88.565  2.392   Used Mobility Report WID: 40151
3_578   3   578   16  0.070   0.044   4354528.468  1093338.387  -2569.287   -4252.973   3391937.027  77.45149727  18.44527990  -0.299   1.950   71.211  1.973   Used Mobility Report WID: 40161
3_770   3   770   20  0.091   0.057   4354548.640  1093330.590  -2568.930   -4252.597   3391937.403  77.45185605  18.44514836   0.966   0.966  127.838  1.165   Used Mobility Report WID: 40201

...I was thinking of asking if anyone could program this for the raw image metadata too... but now I can just get it on my own with a few clicks.
Go to the top of the page
 
+Quote Post
Andreas Plesch
post Mar 13 2021, 10:08 PM
Post #109


Member
***

Group: Members
Posts: 248
Joined: 25-February 21
From: Waltham, Massachussetts, U.S.A.
Member No.: 8974



I am trying to figure out the easting and northing values.

The landing site in the geojson is at

4354494.086 1093299.695

The USGS 25cm HiRISE mosaic and 1m DEM geotiffs and metadata use this equirectangular projection:

PROJCRS["Equirectangular Mars 2000 Sphere IAU",BASEGEOGCRS["D_Mars_2000_Sphere",DATUM["Mars_2000_(Sphere)",ELLIPSOID["Mars_2000_Sphere_IAU",3396190,0,LENGTHUNIT["metre",1]],ID["ESRI",106971]],PRIMEM["Reference_Meridian",0,ANGLEUNIT["degree",0.0174532925199433,ID["EPSG",9122]]]],CONVERSION["Equidistant Cylindrical",METHOD["Equidistant Cylindrical",ID["EPSG",1028]],PARAMETER["Latitude of 1st standard parallel",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8823]],PARAMETER["Longitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["easting",east,ORDER[1],LENGTHUNIT["metre",1,ID["EPSG",9001]]],AXIS["northing",north,ORDER[2],LENGTHUNIT["metre",1,ID["EPSG",9001]]]] - Projected

When I project the provided latitude/longitude coordinates with this equirectangular projection with QGIS/gdal I get:

4590877.824 1093299.695

The projected northing matches exactly the northing in the geojson but the easting is off by ca. 236 km.

My first idea would be that perhaps the provided easting is computed from a reference meridian other than 0 degrees.

Does anybody have an idea what the projection is that the provided easting refers to ?

[ 3396190 * PI * 2 / 360 * 4 = 237098.8

So a reference meridian at 4 degrees E would give easting numbers closer to the provided numbers. But that seems rather arbitrary. ]


--------------------
--
Andreas Plesch, andreasplesch at gmail dot com
Go to the top of the page
 
+Quote Post
Andreas Plesch
post Mar 13 2021, 11:20 PM
Post #110


Member
***

Group: Members
Posts: 248
Joined: 25-February 21
From: Waltham, Massachussetts, U.S.A.
Member No.: 8974



https://pds-imaging.jpl.nasa.gov/data/msl/M...CES_PDS_SIS.PDF

section 3.9.2 has a discussion on easting which I think provides a start of an explanation:

" These “easting” meters at a given latitude are related to true meters at the equator by the simple formula:

map_meters = true_meters / cos(φ)

where φ is the planetocentric latitude. "

[ hey, one can use html entities in the forum ♥ https://www.w3schools.com/html/html_symbols.asp ]

It looks like the provided meters are true meters (at the equator) and the projected easting has map meters since:

4590298.31635 = 4354494.086 / cos(18.4446271 degrees)

This is getting closer to 4590877.824, with still ca. 580m of a difference.

The gdal computed easting assumes a sphere with a radius of 3396190 m. Perhaps the reported true meter easting takes into account a local radius because these are also listed in the geojson, in the radius field.

The gdal computed easting and northing is consistent with the simple formulas given in section 4.4.2.4:

" planetocentric_latitude: Latitude of the point, measured using a planetocentric system.
Planetocentric coordinates are measured as angles from the center of the planet. Latitude (φ_pc) is
computed from northing (x) using the formula:
φ_pc = x / Re • 180 / PI
where Re is the ellipsoid radius, or 3396190 meters.

longitude: Longitude of the point. Longitude is computed from easting (y) using the formula:
θ = y / Re • 180 / PI
"

[ This is good and so simple that I can probably directly plot the traverse geojson on my equirectangular basemap ].

Since the northing matches, Re is 3396190 m. In addition to the correction to true meters from map meters easting, something else seems to be done to the easting. But what ?


--------------------
--
Andreas Plesch, andreasplesch at gmail dot com
Go to the top of the page
 
+Quote Post
markril
post Mar 14 2021, 05:13 AM
Post #111


Junior Member
**

Group: Members
Posts: 31
Joined: 10-August 12
Member No.: 6526



QUOTE (Andreas Plesch @ Mar 13 2021, 03:20 PM) *
4590298.31635 = 4354494.086 / cos(18.4446271 degrees)

This is getting closer to 4590877.824, with still ca. 580m of a difference.

Solving for the latitude using the target easting we get:

18.46629998 = acos(4354494.086 / 4590877.824) degrees

Curiously, this number shows up as the center latitude of an orthographic projection in this metadata file. The relevant snippet is this:

CODE
<mapproj>
<mapprojn>Orthographic</mapprojn>
<equirect>
<stdparll>18.4663</stdparll>
<longcm>77.4298</longcm>
<feast>0.0</feast>
<fnorth>0.0</fnorth>
</equirect>
</mapproj>

The TIFF file this refers to is described on this page as the Derived JPL Surface Operations Mosaic:

QUOTE
Derived JPL Surface Operations Mosaic: This mosaic was finalized at JPL specifically for surface operations and mapping. It use the same individual images provide here but optimized for visual purposes using slightly differing seamlines and a 120 pixel blend across the input images. It uses an orthographic map projection centered on the landing site (77.4298 Lon, 18.4663 Lat). Download GeoTIFF (3.2 GB LZW compressed)

Thanks for bringing this up because it looks likes this may have solved a problem I've been working on, too.

Mark

Go to the top of the page
 
+Quote Post
Andreas Plesch
post Mar 14 2021, 05:15 AM
Post #112


Member
***

Group: Members
Posts: 248
Joined: 25-February 21
From: Waltham, Massachussetts, U.S.A.
Member No.: 8974



Another way to look at it is to assume that the reported easting is from a equirectangular projection with a standard latitude not at the equator but close to the landing site. In fact, one can back out the standard latitude because the easting and the corresponding longitude are given:

arccos(4354494.086 / 4590877.824) is 18.4663 degrees for the standard latitude possibly used.

If this is the case all the waypoints should use the same standard latitude. Here is the table with the standard latitude computed for all waypoints:

CODE

sol easting northing lon lat Re easting at 0 lat. standard lat.
0 4354494.086 1093299.695 77.45088572 18.44462715 3396190 4590877.824 18.46629998
14 4354497.517 1093294.73 77.45094676 18.44454339 3396190 4590881.442 18.46630001
15 4354502.424 1093329.801 77.45103403 18.44513505 3396190 4590886.615 18.46629999
16 4354528.468 1093338.387 77.45149727 18.4452799 3396190 4590914.073 18.46630002
20 4354548.64 1093330.59 77.45185605 18.44514836 3396190 4590935.34 18.4663


And, in fact all waypoints do use the same standard latitude. The only question is why this particular latitude. Perhaps that was the original target. A little farther north, closer to the delta, would make sense.

The center of the landing ellipse seems very close.

The average of the ellipse latitudes is 18.46630439 (after not double counting the repeated start and end).

Close enough for me.

So I think the M20 localization uses an equirectangular projection with a standard latitude at 18.4663 degrees N. The reported easting is based on this projection.

[edit] Ah, thanks, Mark. That completely confirms it.


--------------------
--
Andreas Plesch, andreasplesch at gmail dot com
Go to the top of the page
 
+Quote Post
Andreas Plesch
post Mar 14 2021, 09:03 PM
Post #113


Member
***

Group: Members
Posts: 248
Joined: 25-February 21
From: Waltham, Massachussetts, U.S.A.
Member No.: 8974



QUOTE (markril @ Mar 14 2021, 12:13 AM) *
...
The TIFF file this refers to is described on this page as the Derived JPL Surface Operations Mosaic:


Glad we arrived at the same conclusion (at the same time !). I am using the TIFF you linked to as my base map. Confusingly, the geotiff embedded projection does have 0 as the Latitude of the 1st standard parallel, somewhat contrary to the description which mentions 'centering' on the landing ellipse:

Unknown CRS: PROJCRS["Equirectangular Mars 2000 Sphere IAU",BASEGEOGCRS["D_Mars_2000_Sphere",DATUM["Mars_2000_(Sphere)",ELLIPSOID["Mars_2000_Sphere_IAU",3396190,0,LENGTHUNIT["metre",1]],ID["ESRI",106971]],PRIMEM["Reference_Meridian",0,ANGLEUNIT["degree",0.0174532925199433,ID["EPSG",9122]]]],CONVERSION["Equidistant Cylindrical",METHOD["Equidistant Cylindrical",ID["EPSG",1028]],PARAMETER["Latitude of 1st standard parallel",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8823]],PARAMETER["Longitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["easting",east,ORDER[1],LENGTHUNIT["metre",1,ID["EPSG",9001]]],AXIS["northing",north,ORDER[2],LENGTHUNIT["metre",1,ID["EPSG",9001]]]] - Projected

And I do think the image data is supposed to be used with that 0 latitude projection because the ISIS .lbl and PDS .lbl also do not specify a standard parallel away from the equator.

It would be possible to reproject (or gdalwarp) the mosaic to the off-equator equirectangular projection and that would yield a less distorted map more appropriate for the region. In effect, it would mean squeezing the x dimension by about 5.15%. But I do not think I am going to do that because it introduces some data loss compared to the existing mosaic.


--------------------
--
Andreas Plesch, andreasplesch at gmail dot com
Go to the top of the page
 
+Quote Post
markril
post Mar 15 2021, 07:17 AM
Post #114


Junior Member
**

Group: Members
Posts: 31
Joined: 10-August 12
Member No.: 6526



QUOTE (Andreas Plesch @ Mar 14 2021, 01:03 PM) *
Glad we arrived at the same conclusion (at the same time !). I am using the TIFF you linked to as my base map. Confusingly, the geotiff embedded projection does have 0 as the Latitude of the 1st standard parallel, somewhat contrary to the description which mentions 'centering' on the landing ellipse:

There are two images referenced on that page. The primary image and subject of that page is the equirectangular projection prepared by the USGS:

JEZ_hirise_soc_006_orthoMosaic_25cm_Eqc_latTs0_lon0_first.tif

I agree, the metadata seems to indicate that the 0.25 meters/pixel applies to the equator:

CODE
  Group = Mapping
    TargetName           = Mars
    EquatorialRadius     = 3396190.0 <meters>
    PolarRadius          = 3396190.0 <meters>
    LatitudeType         = Planetocentric
    LongitudeDirection   = PositiveEast
    LongitudeDomain      = 180
    MinimumLatitude      = 18.3067994496865651
    MinimumLongitude     = 77.2229330769714153
    MaximumLatitude      = 18.6693150068777456
    MaximumLongitude     = 77.5839640209350847
    ProjectionName       = Equirectangular
    CenterLongitude      = 0.0
    CenterLatitude       = 0.0
    CenterLatitudeRadius = 3396190.0
    UpperLeftCornerX     = 4577366.0
    UpperLeftCornerY     = 1106618.0
    PixelResolution      = 0.25 <meters/pixel>
    Scale                = 237098.790093224874 <pixels/degree>
  End_Group

The following relations hold:

UpperLeftCornerX = MinimumLongitude * Scale * PixelResolution
UpperLeftCornerY = MaximumLatitude * Scale * PixelResolution
Scale = EquatorialRadius (or PolarRadius or CenterLatitudeRadius) * 2 * Pi / PixelResolution / 360

So, UpperLeftCornerX appears to be an easting based on the equator and not what the JPL operations team is using in the M20_waypoints.json feed. At our latitude of interest (~18.4663 degrees), the horizontal resolution becomes 0.25*cos(18.4663) = 0.237 meters/pixel. So the pixels aren't quite square. It seems desirable to use easting and northing "meters" that are close to equal where you'll be driving your rover so that's where this image comes in:

JEZ_hirise_soc_007_orthoMosaic_25cm_Ortho_blend120.tif

An orthographic projection centered on the target landing site (77.4298 Lon, 18.4663 Lat) where "meters" are nearly equal around the landing site. I suppose they chose orthographic projection (over equirectangular) because any distortion in "meters" as you move from the center of projection will apply to both easting and northing in a symmetrical manner instead of just one dimension as you would have with an equirectangular projection.

The second image seems to be superior from what I've seen, so in order to use it for Google Earth tiles, I'll have to resample it with something like bicubic interpolation to obtain an equirectangular projection with center latitude of 18.4663 degrees.

QUOTE
It would be possible to reproject (or gdalwarp) the mosaic to the off-equator equirectangular projection and that would yield a less distorted map more appropriate for the region. In effect, it would mean squeezing the x dimension by about 5.15%. But I do not think I am going to do that because it introduces some data loss compared to the existing mosaic
.
I'm sure there's already been a little squeezing (and stretching) here and there in order to get these projections from the original HiRISE images, so what's a little more? biggrin.gif

Mark
Go to the top of the page
 
+Quote Post
kymani76
post Mar 15 2021, 02:36 PM
Post #115


Member
***

Group: Members
Posts: 349
Joined: 20-June 07
From: Slovenia
Member No.: 2461



There is really no mystery here, only an age old geographical problem. Compromises need to be made in order to render spherical planetary surface onto a 2d surface.

First we need to see how HiRise images are produced. Camera images the surface of Mars while in orbit around the planet looking straight down, so images are really in orthographic (OR) projection. But as images cover very small part of spherical surface of the planet, it is possible to approximate it as a 2d picture in equirectangular (EQ) projection with central longitude and latitude near the center of the imaged area (in essence we treat this area as it would be flat). That's why different HiRise images come all with the same EQ projection, but varying central longitudes and latitudes. EQ projection also has true scale latitude defined, which means only at this latitude scale will be in true meters. On this map straight lines looking to be of the same length but located at different latitudes would have different lengths in reality. Also lines are that are always straight in EQ projection will be curved in reality (except at central long/lat point).

To get straight lines straight in reality as well as on the map you have to choose orthographic projection with central long/lat at the center of the area of interest. That's way Perseverance's HiRise mosaic used for driving comes in
OR projection with central long/lat at 77.4298/18.4663. This particular coordinate is at the center of HiRise mosaic as well as very near to a predicted landing spot. So what you get is a map with approximates very well the spherical surface as
a 2d Cartesian space. In essence you get x/y grid defined with parallel longitudes and latitudes. So when planning rover's traverse you can simply plot a straight line from point A to B and be sure the this line is also straight on the surface of Mars.
Pretty important when navigating a 2.2 billion dollar rover on Mars.

Coming back to geoJSON data and why it uses ER projection coordinates. Well OR projection really doesn't have a true scale, so if you want to measure a distance in meters you have to reproject it into ER with appropriate true scale latitude. Only then will your measurment be in true scale meters. Thats's why easting and northing in geoJSON file are given in ER projection with central long/lat at 77.4298/18.4663.

I hope this helps.

Attached Image

Mars in OR projection with central long/lat at 77.4298/18.4663. Note that extent of Perseverance's mosaic (yellow rectangle) is totally rectangular in this projection.
Go to the top of the page
 
+Quote Post
Phil Stooke
post May 13 2021, 02:29 AM
Post #116


Solar System Cartographer
****

Group: Members
Posts: 10153
Joined: 5-April 05
From: Canada
Member No.: 227



Here are some maps of the Pathfinder site. One overview and three detailing the traverse of Sojourner. Take a look at the maps of Sojourner's travels in any other source - journal articles and the mission website... there's something lacking. The only one that looks good is a big polar projection, but it's simplified. The 'A' boxes are APXS analysis sites.

Phil
Attached Image
.
Attached Image



--------------------
... because the Solar System ain't gonna map itself.

Also to be found posting similar content on https://mastodon.social/@PhilStooke
Maps for download (free PD: https://upload.wikimedia.org/wikipedia/comm...Cartography.pdf
NOTE: everything created by me which I post on UMSF is considered to be in the public domain (NOT CC, public domain)
Go to the top of the page
 
+Quote Post
Phil Stooke
post May 13 2021, 02:31 AM
Post #117


Solar System Cartographer
****

Group: Members
Posts: 10153
Joined: 5-April 05
From: Canada
Member No.: 227



And 2 more:
Attached Image
.
Attached Image



Phil


--------------------
... because the Solar System ain't gonna map itself.

Also to be found posting similar content on https://mastodon.social/@PhilStooke
Maps for download (free PD: https://upload.wikimedia.org/wikipedia/comm...Cartography.pdf
NOTE: everything created by me which I post on UMSF is considered to be in the public domain (NOT CC, public domain)
Go to the top of the page
 
+Quote Post
Phil Stooke
post May 13 2021, 02:37 AM
Post #118


Solar System Cartographer
****

Group: Members
Posts: 10153
Joined: 5-April 05
From: Canada
Member No.: 227



And a last one - should have been first, really.
Phil
Attached Image



--------------------
... because the Solar System ain't gonna map itself.

Also to be found posting similar content on https://mastodon.social/@PhilStooke
Maps for download (free PD: https://upload.wikimedia.org/wikipedia/comm...Cartography.pdf
NOTE: everything created by me which I post on UMSF is considered to be in the public domain (NOT CC, public domain)
Go to the top of the page
 
+Quote Post
Phil Stooke
post May 16 2021, 10:22 PM
Post #119


Solar System Cartographer
****

Group: Members
Posts: 10153
Joined: 5-April 05
From: Canada
Member No.: 227



Some Phoenix maps.
Phil
Attached Image

Attached Image



and a third one:
Attached Image



--------------------
... because the Solar System ain't gonna map itself.

Also to be found posting similar content on https://mastodon.social/@PhilStooke
Maps for download (free PD: https://upload.wikimedia.org/wikipedia/comm...Cartography.pdf
NOTE: everything created by me which I post on UMSF is considered to be in the public domain (NOT CC, public domain)
Go to the top of the page
 
+Quote Post
Antdoghalo
post May 20 2021, 09:42 PM
Post #120


Member
***

Group: Members
Posts: 226
Joined: 13-October 09
From: Olympus Mons
Member No.: 4972



Stookes Pathfinder HiRISE/Pano reprojection
Attached thumbnail(s)
Attached Image
Attached Image
 


--------------------
"Thats no moon... IT'S A TRAP!"
Go to the top of the page
 
+Quote Post

9 Pages V  « < 6 7 8 9 >
Reply to this topicStart new topic

 



RSS Lo-Fi Version Time is now: 27th April 2024 - 06:34 AM
RULES AND GUIDELINES
Please read the Forum Rules and Guidelines before posting.

IMAGE COPYRIGHT
Images posted on UnmannedSpaceflight.com may be copyrighted. Do not reproduce without permission. Read here for further information on space images and copyright.

OPINIONS AND MODERATION
Opinions expressed on UnmannedSpaceflight.com are those of the individual posters and do not necessarily reflect the opinions of UnmannedSpaceflight.com or The Planetary Society. The all-volunteer UnmannedSpaceflight.com moderation team is wholly independent of The Planetary Society. The Planetary Society has no influence over decisions made by the UnmannedSpaceflight.com moderators.
SUPPORT THE FORUM
Unmannedspaceflight.com is funded by the Planetary Society. Please consider supporting our work and many other projects by donating to the Society or becoming a member.