RE: [drones-discuss] How to get target(desire) position in circle mode?

80 views
Skip to first unread message
Message has been deleted

Randy Mackay

unread,
May 27, 2015, 11:10:29 PM5/27/15
to drones-...@googlegroups.com

Jason,

 

     It’s difficult to get it in lat/lon coordinates but the NTUN message will provide it as offsets from home.  Both desired and actual should be there.

 

-Randy

 

From: drones-...@googlegroups.com [mailto:drones-...@googlegroups.com] On Behalf Of Jason Lin
Sent: 28-May-15 1:25 AM
To: drones-...@googlegroups.com
Subject: [drones-discuss] How to get target(desire) position in circle mode?

 

Hi all,

 

I fly my quadcopter with circle mode,

 

then I plot the gps data(lon/lat) in the log with Matlab like this:

Where can I get the target position or desire position data ? I want plot it on the graph to compare with the actual lon/lat like the above graph.

 

Regards , 

Jason

 

 

 

--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

Randy Mackay

unread,
May 28, 2015, 10:36:20 PM5/28/15
to drones-...@googlegroups.com

Jason,

 

    It’s actually in cm from the ekf origin (which is very close to the home location).  The x will be in the latitude direction, y in the longitude direction.  So it’s similar to lat/lon but it’s offset from the home location (or ekf origin) and it doesn’t have the troublesome scaling that lat/lon coordinates have.

 

-Randy

 

From: drones-...@googlegroups.com [mailto:drones-...@googlegroups.com] On Behalf Of Jason Lin


Sent: 29-May-15 1:25 AM
To: drones-...@googlegroups.com

Subject: Re: [drones-discuss] How to get target(desire) position in circle mode?

 

Thank you , Randy,

 

I found this in AC_Circle.cpp
// calculate target position

Vector3f target;

            target.x = _center.x + _radius * cosf(-_angle);

            target.y = _center.y - _radius * sinf(-_angle);

            target.z = _pos_control.get_alt_target();

 

The target.x/y is the  lat/lon coordinates

 

 

Jason


Randy Mackay 2015528日星期四 UTC+8上午111029秒寫道:

Jason,

 

     It’s difficult to get it in lat/lon coordinates but the NTUN message will provide it as offsets from home.  Both desired and actual should be there.

 

-Randy

 

From: drones-...@googlegroups.com [mailto:drones-...@googlegroups.com] On Behalf Of Jason Lin
Sent: 28-May-15 1:25 AM
To: drones-...@googlegroups.com
Subject: [drones-discuss] How to get target(desire) position in circle mode?

 

Hi all,

 

I fly my quadcopter with circle mode,

 

then I plot the gps data(lon/lat) in the log with Matlab like this:

Jason Lin

unread,
May 29, 2015, 12:46:51 AM5/29/15
to drones-...@googlegroups.com
Randy,

Thank you very much , I understand!

Thanks for your explanation!

Randy Mackay於 2015年5月29日星期五 UTC+8上午10時36分20秒寫道:
Reply all
Reply to author
Forward
0 new messages