FollowMe & Tap´n´Go implementation in r449: success

News, Setup, Compiling, Flashing, Development

FollowMe & Tap´n´Go implementation in r449: success

Postby afernan » Mon Oct 26, 2015 3:35 pm

I´m trying to implement the FollowMe code into r449, based on Menno implementation for HoTT.
Files modified are attached. To see the changes search for the comment "//FollowMe " or compare with original ones.

I´m almost finished but I need some help in implementing this function used in aq_mavlink.c (line 211)
"mavlink_msg_extern_gps_position_send"

Code: Select all
   mavlink_msg_extern_gps_position_send(MAVLINK_COMM_0,1,navData.homeLeg.targetLat, navData.homeLeg.targetLon, navData.startAlt, ((RADIO_THROT+1024)-1000)*10 , navData.ceilingAlt*1e3, gpsData.velD*1e3, navData.homeLeg.targetLat*(double)1e7, navData.homeLeg.targetLon*(double)1e7, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);


I guess its an especific AQ mavlink funtion. Where should I define it? Should it be in "autoquad.xml" at
C:\devel\aq\lib\mavlink\message_definitions\v1.0 ?

Thanks for your help
Angel
Attachments
FollowMe set for r449.zip
(14.01 KiB) Downloaded 134 times
Last edited by afernan on Wed Nov 04, 2015 8:58 pm, edited 2 times in total.
afernan
 
Posts: 1214
Joined: Sat Jul 07, 2012 5:24 pm
Location: Madrid, Spain

Re: FollowMe implementation in r449

Postby joebar.rc » Wed Oct 28, 2015 10:10 am

This is only the send to telemetry (android) function. In the received command structure you define what to look for from the incoming mavlink commands and what to do.
(void mavlinkDoCommand(mavlink_message_t *msg) {)

and case MAVLINK_MSG_ID_EXTERN_GPS_POSITION: defines what to do based on the position of the follow device

Autoquad.xml is used in an aid to auto create the mavlink definition files. So basically .xml is used to create the mavlink external message definition file that you need to include. That is in this step not necessary because that file already exists.
joebar.rc
 
Posts: 1084
Joined: Fri Jun 22, 2012 8:59 am
Location: The netherlands

Re: FollowMe implementation in r449

Postby afernan » Wed Oct 28, 2015 1:45 pm

Thanks for your answer.
I get this error while compiling. Do I miss something?
Thanks
Code: Select all
aq_mavlink.c: In function 'mavlinkDo':
aq_mavlink.c:211:2: warning: implicit declaration of function 'mavlink_msg_extern_gps_position_send' [-Wimplicit-function-declaration]
aq_mavlink.c:211:2: warning: implicit conversion from 'float' to 'double' when passing argument to function [-Wdouble-promotion]
...
aq_mavlink.c: In function 'mavlinkRecvTaskCode':
aq_mavlink.c:842:8: error: 'MAVLINK_MSG_ID_EXTERN_GPS_POSITION' undeclared (first use in this function)
afernan
 
Posts: 1214
Joined: Sat Jul 07, 2012 5:24 pm
Location: Madrid, Spain

Re: FollowMe implementation in r449

Postby sandmen » Wed Oct 28, 2015 10:48 pm

sandmen
 
Posts: 997
Joined: Fri Jun 22, 2012 7:25 am

Re: FollowMe implementation in r449

Postby Max » Thu Oct 29, 2015 1:21 am

I always wondered why you don't use an existing standard message -- SET_POSITION_TARGET_GLOBAL_INT seems perfect. :?:

-Max
Max
 
Posts: 2814
Joined: Mon Aug 13, 2012 9:45 pm
Location: Near Ithaca, NY, USA

Re: FollowMe implementation in r449

Postby sandmen » Thu Oct 29, 2015 9:00 am

For "just" follow me, yes, you are right.
But, I'm not only doing "follow me" with this.
sandmen
 
Posts: 997
Joined: Fri Jun 22, 2012 7:25 am

Re: FollowMe implementation in r449

Postby afernan » Thu Oct 29, 2015 10:15 am

@Peter:
Thanks for the files. Now it compiles OK. I see the missing functions inside your MAVLINK library.
I´ll test in flight and report back. Any recomendation for the flight test? (...apart of the obvious).
Angel
afernan
 
Posts: 1214
Joined: Sat Jul 07, 2012 5:24 pm
Location: Madrid, Spain

Re: FollowMe implementation in r449

Postby sandmen » Thu Oct 29, 2015 11:10 am

take care for the external declaration from
- navUkfSetGlobalPositionTarget
- navSetHoldHeading
sandmen
 
Posts: 997
Joined: Fri Jun 22, 2012 7:25 am

Re: FollowMe implementation in r449

Postby afernan » Thu Oct 29, 2015 1:56 pm

I plan to use this external GPS in the ANDROID terminal to improve signal:
viewtopic.php?f=11&t=4680
Attachments
20151014_185036%20(2).jpg
Last edited by afernan on Sun Nov 15, 2015 3:56 pm, edited 1 time in total.
afernan
 
Posts: 1214
Joined: Sat Jul 07, 2012 5:24 pm
Location: Madrid, Spain

FollowMe & Tap´n´Go implementation in r449: success

Postby afernan » Wed Nov 04, 2015 8:57 pm

1st Flight Test: successfull !!
Working very well both Tap´n´Go and FollowMe in r449 modified. Attached fw for v6.1 DIMU QUATOS.

Mini guide:
Tap´n´Go: while in PH, touch the map for 1 sec. A yellow drop will indicate the point to flight. After a confirmation, the machine will fly at 3m/s at the same height it was. It works perfect.

Follow-Me: First, activate FollowMe in GCS settings. Then while in PH, activate FollowMe in the menu; a message will tell you that FolloMe is active all time supplying position and speed. If you walk it will follow you maintaining same height as initial position. You can overide position and height at any moment with Tx. Worked perfectly at first shot.

Now I´ll test with a better antena for the phone GPS signal improvement.

Thanks a lot to Peter and Menno for their contributions (really most of the work). Files modified are attached also. Remember you´ll need an special Mavlink library to compile (see previous link from Peter)

Keep tuned.
Attachments
WTF set of files.zip
(20.94 KiB) Downloaded 130 times
r449-6.x-dimu-QUATOS-WTF.zip
(4.63 MiB) Downloaded 138 times
Last edited by afernan on Sun Nov 15, 2015 3:57 pm, edited 1 time in total.
afernan
 
Posts: 1214
Joined: Sat Jul 07, 2012 5:24 pm
Location: Madrid, Spain

Next

Return to AQ Firmware

Who is online

Users browsing this forum: No registered users and 3 guests

cron