ThomasM
(Tom)
February 25, 2019, 9:39pm
1
Hi everyone,
I want to simulate a GPS connection through MAVlink without using mavros. I want to be able to run the program from an arduino and feed it straight into a serial port as a fake receiver.
Tried searching a lot for this problem but haven’t found anything specific. Just wondering if anyone has done it before or could give me some more information? I’ve already tried using the c_uart examples of the MAV message but mainly returned zeros when it was running.
I’m using a hexacopter with a pixracer
You’re after GPS_INPUT:
<field type="uint64_t" name="time_usec" units="us">Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number.</field>
<field type="float" name="wind_x" units="m/s">Wind in X (NED) direction</field>
<field type="float" name="wind_y" units="m/s">Wind in Y (NED) direction</field>
<field type="float" name="wind_z" units="m/s">Wind in Z (NED) direction</field>
<field type="float" name="var_horiz" units="m/s">Variability of the wind in XY. RMS of a 1 Hz lowpassed wind estimate.</field>
<field type="float" name="var_vert" units="m/s">Variability of the wind in Z. RMS of a 1 Hz lowpassed wind estimate.</field>
<field type="float" name="wind_alt" units="m">Altitude (MSL) that this measurement was taken at</field>
<field type="float" name="horiz_accuracy" units="m">Horizontal speed 1-STD accuracy</field>
<field type="float" name="vert_accuracy" units="m">Vertical speed 1-STD accuracy</field>
</message>
<message id="232" name="GPS_INPUT">
<description>GPS sensor input message. This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system.</description>
<field type="uint64_t" name="time_usec" units="us">Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number.</field>
<field type="uint8_t" name="gps_id">ID of the GPS for multiple GPS inputs</field>
<field type="uint16_t" name="ignore_flags" enum="GPS_INPUT_IGNORE_FLAGS" display="bitmask">Bitmap indicating which GPS input flags fields to ignore. All other fields must be provided.</field>
<field type="uint32_t" name="time_week_ms" units="ms">GPS time (from start of GPS week)</field>
<field type="uint16_t" name="time_week">GPS week number</field>
<field type="uint8_t" name="fix_type">0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK</field>
<field type="int32_t" name="lat" units="degE7">Latitude (WGS84)</field>
<field type="int32_t" name="lon" units="degE7">Longitude (WGS84)</field>
<field type="float" name="alt" units="m">Altitude (MSL). Positive for up.</field>
ThomasM
(Tom)
February 25, 2019, 10:07pm
3
Hi, how do I write a MAVlink message? I’m very new to arducopter and MAVlink
there is a thread here that explains mavlink using arduino. just search for it.
ppoirier
(ppoirier)
February 26, 2019, 2:37am
5
Take a look at Pozyx
http://ardupilot.org/copter/docs/common-pozyx.html
Its using an Arduino for GPS spoofing
1 Like