# Calculation xy in the QM33120WDK1

The following SDK was used in QM33120WDK1.
QM33 DK Software, Sources, Tools and Developer Guide
Should I use the following way to calculate x,y or other ways?
x = D_cm * cos(LAoA_deg)
y = D_cm * sin(LAoA_deg)

In the old SDK, the calculation is as below picture [1]-1 shows.
It gives the result output, [1]-2, with x,y coordinate.
In the new SDK, it gives the result output, [2]-2, with only D_cm and LAoA_deg.
The question here is to calculate x, y relative to the anchor by using the output from new SDK.

[1]-1
Old SDK: DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\Slotted_TWR_Demo_ARM\nRF52840_DK\Sources\twr_demo.zip\twr_demo\NRF_Juniper\twr_demotwr_demo_nRF52840.emProject

[1]-2

``````JS0089{"TWR": {"a16":"10AB","R":151,"T":5004,"D":61,"P":53,"P'":66,"Xcm":20,"Ycm":58,"Pdiffnm":5850636,"O":548,"V":49152,"X":0,"Y":0,"Z":1900}}
r_m = 63
tofi= 135

JS0089{"TWR": {"a16":"10AB","R":152,"T":4974,"D":63,"P":42,"P'":42,"Xcm":14,"Ycm":61,"Pdiffnm":4106218,"O":545,"V":49152,"X":0,"Y":0,"Z":1900}}
r_m = 60
tofi= 128

JS0089{"TWR": {"a16":"10AB","R":153,"T":5065,"D":60,"P":54,"P'":65,"Xcm":19,"Ycm":56,"Pdiffnm":5896202,"O":545,"V":49152,"X":0,"Y":0,"Z":1900}}
r_m = 64
tofi= 137

JS0089{"TWR": {"a16":"10AB","R":154,"T":5035,"D":64,"P":53,"P'":55,"Xcm":19,"Ycm":61,"Pdiffnm":5325173,"O":557,"V":49152,"X":0,"Y":0,"Z":1900}}
r_m = 63
tofi= 135

JS0089{"TWR": {"a16":"10AB","R":155,"T":5004,"D":63,"P":41,"P'":66,"Xcm":18,"Ycm":60,"Pdiffnm":5232611,"O":545,"V":49152,"X":0,"Y":0,"Z":1900}}
r_m = 63
tofi= 135

JS0089{"TWR": {"a16":"10AB","R":156,"T":5004,"D":63,"P":47,"P'":48,"Xcm":16,"Ycm":61,"Pdiffnm":4596077,"O":545,"V":49152,"X":0,"Y":0,"Z":1900}}
r_m = 62
tofi= 133
``````

[2]-2

``````{"Block":3678, "results":[{"Addr":"0x0000","Status":"Ok","D_cm":34,"LPDoA_deg":41.35,"LAoA_deg":15.50,"LFoM":205,"RAoA_deg":0.00,"CFO_100ppm":-573}]}
``````

Hi , I’m working in an indoor localization system using the QM33120WDK1 kit and I need to extract the data from the kit to use in Python code without the Qorvo one GUI, I tried with COM serial port directly but I couldn’t, please which can help me

I tried the following way to calculate x, y.
x = D_cm * cos(LAoA_deg)
y = D_cm * sin(LAoA_deg)

The result is as follows, which is definitely wrong.
The whole setting is stable as [2], but I used QM33120WDK1 at both side(anchor and tag).
Could anyone know how how to calculate x,y from the paramters that generated from output result [3] of QM33120WDK1 with the latest code ( QM33 DK Software, Sources, Tools and Developer Guide) or just let me know which document has the relevant equation ?

[1]

[2]

[3]

``````{"Block":3679, "results":[{"Addr":"0x0000","Status":"Ok","D_cm":40,"LPDoA_deg":41.87,"LAoA_deg":15.69,"LFoM":215,"RAoA_deg":0.00,"CFO_100ppm":-560}]}