At last I installed SITL under windows cygwin. On my PC runs simulation of vehicle (copter). This simulator sends mavlink over serial port via 433mhz radio link to AT (running on pixhawk) and this AT is connected back to the same PC via USB cable and bind to MissionPlanner. In MP I can see both - AT and simulated vehicle - so far so good. Now I want to test AT how it points to simulated vehicle. But GPS coordinates of AT are taken from real GPS and simulated vehicle has its own coordinates and of course these two are completely different positions. So I need somehow to set ATs GPS position to the specific location, where the simulated vehicle is. Is there a way to overwrite ATs real GPS position to my specific (e.g. where the simulated vehicle starts)?
Why not just set the simulator to have a local position? http://ardupilot.org/dev/docs/using-sitl-for-ardupilot-testing.html#using-sitl-for-ardupilot-testing
well that is not the solution for me since I’m testing it inside building and GPS signal is therefore weak. Position of AT jumps from here to there and 3d fix is often lost. If the AT would be outside that is ok but it is not.
There is no way how to preset GPS position of AT and tell him to ignore real GPS data?
The only way I know of would be setting the parameter for gps type to “MAV” and injecting a fake gps message using ROS, or a small program generating emulated data and putting it into mavlink messages (HIL_GPS or GPS_INPUT).
There may be a python script or ROS package to do this already, but I’m not aware of it. Sorry.
Can you raise an issue in GitHub for this?
Thinking about it, it might be useful to be able to just set a static location (perhaps as an offset from the vehicle home?) for the tracker as a mode option, and not need a separate gps.
Actually we do support this by setting the START_LATITUDE and START_LONGITUDE parameters.
Does not seem to be documented on the wiki however
Thanks for interest Randy. Anyway I tested this too, but it didn’t help Tested AT was of version 0.8 guess, but not sure about it, perhaps I already upgraded to v1.0
When I set these params, in MissionPlanner the position was still taken from real GPS of AT.
Isn’t there yet another parameter that e.g. set the type of positioning (GPS, static or so)?
Ok, it will only use those parameters if there is no GPS. There parameter description is this:
Combined with START_LATITUDE this parameter allows for an initial position of the tracker to be set. This position will be used until the GPS gets lock. It can also be used to run a stationary tracker with no GPS attached.
Well these START_LAT/LON parameters doesn’t work for me. When I set them to desired Lat/Lon and disconnected real GPS, got position 0.0000000 0.0000000 in MissionPlanner . My AT is of version 1.0.
But when downgraded to 0.8 the position is set correct to preset values from parameters START_LAT/LON It works, thanks
Failed to update home location (2)
Can't see any vehicle in MP when connected to AT
Ok, start position is working now, thanks Randy.
How do you connected SITL with real AT ?? I use MP on windows, my vehicle runs in SITL (Ubuntu - VM) and AT is connected via USB cable, all in the same PC. Thanks in advance !!!