Open Peque opened 1 week ago
There are two coordinate systems: lat/long for location, and a local coordinate system to describe objects relative to a lat/long base point. The plan is that longitude would be positive to the east of the prime meridian. The local coordinate system is defined by a transformation vector so it can be oriented as desired, e.g., standard East-North x-y, a rotation from East-North, etc.
Thanks @cwhanse.
I'm assuming the file I should take for reference is PVCollada_2.09.xlsx. From there, and from the examples provided in this repo, I think the latitude+longitude definition is clear:
<project>
<latitude>10.1</latitude>
<longitude>15.3</longitude>
</project>
However, how can the transformation vector be defined? In particular, for a case where I would like to define standard East-North x-y. Note that I would not want to translate the local coordinates, which are already centered around (0, 0)
, just make sure the orientation is interpreted correctly when opening the file.
Also, if undefined, is there a "default" value according to the spec?
The translation element defined for PVCollada is meant to be the vector from the global lat/long to the origin of the local coordinate system.
PVCollada won't define its own local coordinate system, it will use the Collada specification. COLLADA uses a right-hand coordinate system, with flexibility to set the "up axis" and coordinate unit (see
@cwhanse Thanks for the clarification. Yeah, COLLADA seems to be clear about the use of the up axis. Leaving a screenshot here just for future reference. :blush:
Does PVCollada define somewhere explicitly the correspondence between "Right axis" being East and "In axis" being South? Or, equivalently, that for a Z-up axis configuration, a +x translation means East with respect to the lat+lon coordinates and +y translation means North with respect to the lat+lon.
Other than finding the "right-hand" coordinate specification, I didn't find a mapping of Collada coordinates to compass directions, in the Collada spec. We can clarify that for PVCollada the standard x-axis points east.
@cwhanse Yeah, Collada does not seem to care about geographic coordinates (I guess that's why you also had to define latitude and longitude as part of PVCollada).
I think clarifying in PVCollada that x-axis points East is necessary in order to ensure that all platforms are able to interchange files without unexpected rotation issues. :blush:
Does PVCollada define a convention for North/East orientations?
I would assume +Y would be pointing to North, and +X would be pointing to East (+Z would be pointing "up" perpendicular to the floor), but not sure if this is really part of the specification.
If not, I would suggest that convention (if this could be part of the specification). The reasoning being that the Mercator projection is probably the most popular and, when viewing maps with this projection, +Y is pointing to North, +X pointing to East and +Z coming "out of the screen", assuming the usage of the also popular way of visualizing Cartesian coordinate systems (where +Y is always "up" on the screen/paper and +X is "right").