Setting a custom waypoint in CRIUS NAV 06

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
jaumemiralles
Posts: 12
Joined: Tue Mar 22, 2016 5:41 pm

Setting a custom waypoint in CRIUS NAV 06

Post by jaumemiralles »

Hello!

I want to set a custom waypoint in a lat/lon manner and navigate towards it...

in gps.cpp file we have
void GPS_I2C_command(uint8_t command, uint8_t wp) { ........ }
It is seen that 'wp' is the number between 0 and 15 of the register hold by GPS module, not a lat/lon value... ok let's set the value...

in 'def.h' file we have
#define I2C_GPS_COMMAND_START_NAV 0x02 // get the WP from the command and start navigating toward it
#define I2C_GPS_COMMAND_SET_WP 0x03 // copy current position to given WP
In first case i can point a register, but i can't set the point.
In second case i can set the register but only copying a current position, not my desired destination.

What would be the way to set my custom lat/lon in a waypoint register without being the current position?

Thanks!

gregd72002
Posts: 103
Joined: Fri Dec 12, 2014 5:16 pm

Re: Setting a custom waypoint in CRIUS NAV 06

Post by gregd72002 »

Hi, have you tried using MSP_SET_WP?
As in here: http://www.multiwii.com/wiki/index.php? ... l_Protocol
AFAIK the structure might be slightly different. As far as I remember it is:
uint8_t wp_no;
uint8_t action;
int32_t lat;
int32_t lon;
uint32_t alt_hold;
int16_t param1;
int16_t param2;
int16_t param3;
uint8_t flag;

Just remember that wp_no=0 is the home position so you want to use wp_no=1 or greater.

Post Reply