Re: [PROJ] Sweref99 Cartesian

2022-04-21 Thread Roger Oberholtzer
Thanks for your help. I think I have now implemented what I need. My
users will verify the complete process in the coming days. Fingers are
crossed...

On Thu, Apr 21, 2022 at 11:52 AM Jivall Lotti  wrote:
>
> Yes, you can transform the position from the GNSS-receiver directly to XYZ 
> with cct +proj=cart +ellps=GRS80 . It does not make any sense to transform 
> from WGS84 to SWEREF 99 first. The difference between SWEREF 99 and WGS84 is 
> today about 8 dm, and your position from the GNSS-receiver has probably a 
> larger uncertainty,  so it does not matter if you use WGS84 or SWEREF 99 for 
> the virtual location. But in the GNSS-processing with the virtual RINEX-file 
> the coordinates are considered as accurate SWEREF 99-coordinates.
>
> Best Regards, Lotti
>
>
>
> Från: Roger Oberholtzer 
> Skickat: den 21 april 2022 11:27
> Till: Jivall Lotti 
> Kopia: PROJ 
> Ämne: Re: [PROJ] Sweref99 Cartesian
>
>
>
> On Thu, Apr 21, 2022 at 9:39 AM Jivall Lotti  wrote:
>
> Hi Roger,
>
> SWEREF 99 is a 3D geodetic reference system (the Swedish realisation of 
> ETRS89) and can be expressed as geocentric cartesian coordinates (X Y Z) , 
> geodetic coordinates (latitude, longitude and height) or a number of map 
> projections where SWEREF 99 TM is the national one (whole Sweden in one 
> zone). You can read more at Lantmäteriets webb page.
>
>
>
> You are right that SWEPOS virtual RINEX generator is requesting SWEREF 99 XYZ 
> (and I understand it might be easier for you to use PROJ instead of out 
> online transformation on the webb). All SWEPOS services are producing data in 
> SWEREF 99, as this is the national reference frame. It means that when you 
> process your GNSS-observations with the VRS reference data then you will get 
> the results in SWEREF 99. (Therefore you should not use the accurate 
> NKG-transformation from  ITRF2014 (WGS84) to SWEREF 99 – if your final 
> results should be presented in SWEREF 99!)
>
>
>
> Your original position from the GNSS-receiver is in WGS84 (current epoch) but 
> I guess just on a few meter level and actually you just need a very 
> approximate position to get your virtual reference near your own 
> measurements. The position you input to SWEPOS VRS generator will be 
> interpreted as SWEREF 99.
>
>
>
> Hope it is now more clear!
>
>
>
> I think so. So you mean if I provide the receiver's WGS84 lat/lng to, say,  
> cct +proj=cart +ellps=GRS80 , then the resulting locations should be adequate 
> for requesting a virtual station at that WGS84 location?
>
>
>
> --
>
> Roger Oberholtzer



-- 
Roger Oberholtzer
___
PROJ mailing list
PROJ@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/proj


Re: [PROJ] Sweref99 Cartesian

2022-04-21 Thread Jivall Lotti
Yes, you can transform the position from the GNSS-receiver directly to XYZ with 
cct +proj=cart +ellps=GRS80 . It does not make any sense to transform from 
WGS84 to SWEREF 99 first. The difference between SWEREF 99 and WGS84 is today 
about 8 dm, and your position from the GNSS-receiver has probably a larger 
uncertainty,  so it does not matter if you use WGS84 or SWEREF 99 for the 
virtual location. But in the GNSS-processing with the virtual RINEX-file the 
coordinates are considered as accurate SWEREF 99-coordinates.
Best Regards, Lotti

Från: Roger Oberholtzer 
Skickat: den 21 april 2022 11:27
Till: Jivall Lotti 
Kopia: PROJ 
Ämne: Re: [PROJ] Sweref99 Cartesian

On Thu, Apr 21, 2022 at 9:39 AM Jivall Lotti 
mailto:lotti.jiv...@lm.se>> wrote:
Hi Roger,
SWEREF 99 is a 3D geodetic reference system (the Swedish realisation of ETRS89) 
and can be expressed as geocentric cartesian coordinates (X Y Z) , geodetic 
coordinates (latitude, longitude and height) or a number of map projections 
where SWEREF 99 TM is the national one (whole Sweden in one zone). You can read 
more at Lantmäteriets webb 
page<https://www.lantmateriet.se/en/maps-and-geographic-information/gps-geodesi-och-swepos/Referenssystem/Tredimensionella-system/SWEREF-99/>.

You are right that SWEPOS virtual RINEX generator is requesting SWEREF 99 XYZ 
(and I understand it might be easier for you to use PROJ instead of out online 
transformation on the webb). All SWEPOS services are producing data in SWEREF 
99, as this is the national reference frame. It means that when you process 
your GNSS-observations with the VRS reference data then you will get the 
results in SWEREF 99. (Therefore you should not use the accurate 
NKG-transformation from  ITRF2014 (WGS84) to SWEREF 99 – if your final results 
should be presented in SWEREF 99!)

Your original position from the GNSS-receiver is in WGS84 (current epoch) but I 
guess just on a few meter level and actually you just need a very approximate 
position to get your virtual reference near your own measurements. The position 
you input to SWEPOS VRS generator will be interpreted as SWEREF 99.

Hope it is now more clear!

I think so. So you mean if I provide the receiver's WGS84 lat/lng to, say,  cct 
+proj=cart +ellps=GRS80 , then the resulting locations should be adequate for 
requesting a virtual station at that WGS84 location?

--
Roger Oberholtzer
___
PROJ mailing list
PROJ@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/proj


Re: [PROJ] Sweref99 Cartesian

2022-04-21 Thread Roger Oberholtzer
On Thu, Apr 21, 2022 at 9:39 AM Jivall Lotti  wrote:

> Hi Roger,
>
> SWEREF 99 is a 3D geodetic reference system (the Swedish realisation of
> ETRS89) and can be expressed as geocentric cartesian coordinates (X Y Z) ,
> geodetic coordinates (latitude, longitude and height) or a number of map
> projections where SWEREF 99 TM is the national one (whole Sweden in one
> zone). You can read more at Lantmäteriets webb page
> .
>
>
>
>
> You are right that SWEPOS virtual RINEX generator is requesting SWEREF 99
> XYZ (and I understand it might be easier for you to use PROJ instead of out
> online transformation on the webb). All SWEPOS services are producing data
> in SWEREF 99, as this is the national reference frame. It means that when
> you process your GNSS-observations with the VRS reference data then you
> will get the results in SWEREF 99. (Therefore you should *not* use the
> accurate NKG-transformation from  ITRF2014 (WGS84) to SWEREF 99 – if your
> final results should be presented in SWEREF 99!)
>
>
>
> Your original position from the GNSS-receiver is in WGS84 (current epoch)
> but I guess just on a few meter level and actually you just need a very
> approximate position to get your virtual reference near your own
> measurements. The position you input to SWEPOS VRS generator will be
> interpreted as SWEREF 99.
>
>
>
> Hope it is now more clear!
>

I think so. So you mean if I provide the receiver's WGS84 lat/lng to, say,  cct
+proj=cart +ellps=GRS80 , then the resulting locations should be adequate
for requesting a virtual station at that WGS84 location?

-- 
Roger Oberholtzer
___
PROJ mailing list
PROJ@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/proj


Re: [PROJ] Sweref99 Cartesian

2022-04-20 Thread Jivall Lotti
Hi Roger, 
I am not sure what you mean by "Sweref99_tm Cartesian values", but I think you 
mean SWEREF99 geocentric cartesian coordinates (with respect to the centre of 
the earth and the Z-axis in line with the rotation axis and X-axis through 
Greenwich). If so you can use the following command: 

echo  21 69  0.000 2022.0 | cct +proj=cart +ellps=GRS80 
which gives :  2140155.9896821528.9138  5931972.9199 2022.

Note that cct is used instead of proj, and then you need also to give an epoch. 
In this case when just transforming between lat long ellh to X Y Z , it does 
not matter which epoch you give. But in case you transform from or to a dynamic 
reference system like ITRF then this epoch is important. Usually you give the 
epoch of the measurement. 

You can also use the EPSG-codes if you prefer:
echo  69 21  0.000 | cs2cs EPSG:4326 EPSG:4976
with the result: 2140155.99  821528.91 5931972.92
Note that the input latitude and longitude are in different order than for proj 
and cct!

or use the code for WGS84 (which has the zero-transformation to SWEREF99 in 
EPSG):
echo  69 21  0.000 | cs2cs EPSG:4326 EPSG:4976
2140155.99  821528.91 5931972.92

In many case you can consider SWEREF99=ETRS89=WGS84, which also is done with 
the transformation in the EPSG-database. This approximation is OK if you can 
accept an error up to 1 m. In case you need an accurate transformation (sub-cm) 
from ITRF2014/WGS84 to SWEREF 99 ( in geocentric cartesian coordinates) you can 
use the NKG:ITRF2014_TO_SE (implemented in PROJ from version 7.2.1): 

echo  2140155.9896821528.9138  5931972.9199 2022.| cct 
NKG:ITRF2014_TO_SE
2140156.5941821528.5956  5931972.5885 2022.


Hope it helps!

Best Regards, 

Lotti Jivall
Geodesist

LANTMÄTERIET
EMAIL      lotti.jiv...@lm.se
TELEPHONE       026-63 37 40
MOBILE       072-222 56 14
ADDRESS        Lantmäteriet, Geodetisk infrastruktur, 801 82 Gävle
WEBB          www.lantmateriet.se
www.linkedin.com/company/lantmateriet
www.facebook.com/lantmateriet
www.instagram.com/lantmateriet


-Ursprungligt meddelande-
Från: PROJ  För Roger Oberholtzer
Skickat: den 20 april 2022 15:24
Till: PROJ 
Ämne: [PROJ] Sweref99 Cartesian

We have been using proj to get Sweref99_tm (EPSG:3006) from WGS84
(EPSG:4326) values we collect from a GPS receiver. All is working great.

We have had a request to provide Sweref99_tm Cartesian values. I have looked at 
https://proj.org/operations/conversions/cart.html#cart but I'm unclear how to 
do this in the context of Sweref99_tm.

If I don't use the EPSG codes, I get the expected Sweref99_tm values with:

proj +proj=tmerc +ellps=GRS80 +k=0.9996 +x_0=50 +y_0=0 +lon_0=15.0
+lat_0=0.0

Would it just be changing +proj=tmerc to +proj=cart ?

I get values. But I don't know if they are correct.

echo 21.00 69.00 0.000 | proj +proj=tmerc +ellps=GRS80
+k=0.9996 +x_0=50 +y_0=0 +lon_0=15.0 +lat_0=0.0
739639.19   7666089.70 0.000


echo 21.00 69.00 0.000 | proj +proj=cart +ellps=GRS80
+k=0.9996 +x_0=50 +y_0=0 +lon_0=15.0 +lat_0=0.0
2279859.27  239622.87 0.000

Also, can this be done when specifying the EPSG:3006 code directly?


--
Roger Oberholtzer
___
PROJ mailing list
PROJ@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/proj
___
PROJ mailing list
PROJ@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/proj