DJI Mavic, Air and Mini Drones
Friendly, Helpful & Knowledgeable Community
Join Us Now

Mavic Mini Wind Calcs

BudWalker

Well-Known Member
Premium Pilot
Joined
Oct 24, 2016
Messages
2,079
Reactions
1,494
Age
75
Location
Arroyo Grande, California
There have been several incidents lately where the analysis could have been helped by knowing the wind field. Like some of the other platforms the Mavic Mini has some wind calcs data in the .DAT. I've managed to crack some of that wind data and it can be utilized in CsvView/DatCon 3.7.1. Normally, I would wait until more is understood about the wind data before publishing it in a version. But, I'm speculating some of the members who have taken an interest in Mavic Mini incident analysis would like to know more and be involved at this stage.

@slup , @new2mavic , @Doppler , and maybe some others.

To obtain version 3.7.1 go to
CsvView Downloads
DatCon Downloads

Here's what I know about the MM wind data.

1. Wind:velocity - appears to be meters/sec

2. Wind:valid - 1 if the calcs are yielding a valid value, 0 otherwise. This signal appears both as a number and as a state signal
1579364314867.png
3. g_status_wind_x and g_status_wind_y appear to be the ground referenced North and East wind components.

4. force_est_c_x, force_est_c_y, vel_c_x and vel_c_y are unknown. Let me know if you can figure these out.

5. battery_vol_mv looks like just the battery voltage. I suspect the reason it exists in the wind record has to do with the MM not being able to overcome the wind when the battery voltage falls below a certain threshold. Lemme know if can figure this one out.

@sar104
 
I have done some test flights with my Mini just to check what the data fields in the group “wind” mean. This is my thinking so far :

Wind:Alti : no idea what it is. It assumed a large valve whenever the craft was flying forward and into the wind

Wind:velocity
: velocity of the wind in m/s

Wind:VelLevel : takes values 0, 1, 2 no idea what it is.

Wind:Valid / valid : no idea what it is. It’s a state variable taking values 0(false) and 1(true)

Wind:g_status_wind_x : speed of the North component of wind in m/s, -ve for northerly wind

Wind:g_status_wind_y : speed of the East component of wind in m/s, -ve for easterly wind

Wind:force_est_c_x : component of the drag along the longitudinal axis of the craft , unit unknown. –ve when the air flow over the craft is from front to back

Wind:force_est_c_y : component of the drag along the lateral axis of the craft , unit unknown. –ve when the air flow over the craft is from right to left

Wind:vel_c_x : component of the ground speed of the craft along the longitudinal axis in m/s. +ve when the craft is flying forward

Wind:vel_c_y : component of the ground speed of the craft along the lateral axis in m/s. +ve when the craft is sliding right

Wind:battery_vol_mv : battery voltage in volt.



Test flight 1

It was conducted next to a government weather station. The flying altitude was level with the anemometer of the station ( 50 m above sea level ). The 10-min average wind speed reported by the station was 19 ~ 24 km/h and the wind direction was around 15 degree ( NNE ) for the time period of the flight.

The flight plan :
  • Sport mode
  • Nose facing the wind, full speed forward for 200m
  • Orientation unchanged, full speed backward to return home
  • Right side of the craft facing the wind, slide right at full speed for 200m
  • Same orientation, slide left at full speed to return home
  • Repeat 2 ~ 5 a few times

Variation of force_est_c_x , force_est_c_y, vel_c_x and vel_c_y as the craft change the flying speed and direction :

1580831820586.png



The following chart compares the magnitude of vel_c_x , vel_c_y and CUSTOM.hSpeed[m/s]. The result shows that vel_c_x , vel_c_y are ground speeds of the craft

1580831857291.png




Test flight 2

The purpose is to find how force_est_c_x varies with vel_c_x and force_est_c_y with vel_c_y when there is negligible wind

The flight plan :
  • Sport mode
  • Fly forward and then backward in full speed
  • Slide to the right and then to the left at full speed
  • Repeat 2~3 in Cinematic mode
  • Repeat 2~3 in Position mode
The following is a scattered plot of the magnitude of force_est vs vel. It can be seen that force_est increases nonlinearly with vel. The relationship looks like drag = c * velocity ^n

1580831911871.png

1580831955122.png


The .TXT and .DAT of the two test flights are attached :

Test flight 1 ( windy ) :
DJIFlightRecord_2020-01-30_[10-33-16].txt
2020-01-30_10-32-48_FLY050.DAT

Test flight 2 ( no wind ) :
DJIFlightRecord_2020-02-03_[11-25-50].txt
2020-02-03_11-24-44_FLY054.DAT
 

Attachments

  • 2020-01-30_10-32-48_FLY050.DAT
    7.4 MB · Views: 11
  • DJIFlightRecord_2020-01-30_[10-33-16].txt
    1.4 MB · Views: 9
  • 2020-02-03_11-24-44_FLY054.DAT
    4.8 MB · Views: 6
  • DJIFlightRecord_2020-02-03_[11-25-50].txt
    852.4 KB · Views: 8
Last edited:
I have done some test flights with my Mini just to check what the data fields in the group “wind” mean. This is my thinking so far :

Wind:Alti : no idea what it is. It assumed a large valve whenever the craft was flying forward and into the wind

Wind:velocity : velocity of the wind in m/s

Wind:VelLevel : takes values 0, 1, 2 no idea what it is.

Wind:Valid / valid : no idea what it is. It’s a state variable taking values 0(false) and 1(true)

Wind:g_status_wind_x : speed of the North component of wind in m/s, -ve for northerly wind

Wind:g_status_wind_y : speed of the East component of wind in m/s, -ve for easterly wind

Wind:force_est_c_x : component of the drag along the longitudinal axis of the craft , unit unknown. –ve when the air flow over the craft is from front to back

Wind:force_est_c_y : component of the drag along the lateral axis of the craft , unit unknown. –ve when the air flow over the craft is from right to left

Wind:vel_c_x : component of the ground speed of the craft along the longitudinal axis in m/s. +ve when the craft is flying forward

Wind:vel_c_y : component of the ground speed of the craft along the lateral axis in m/s. +ve when the craft is sliding right

Wind:battery_vol_mv : battery voltage in volt.



Test flight 1

It was conducted next to a government weather station. The flying altitude was level with the anemometer of the station ( 50 m above sea level ). The 10-min average wind speed reported by the station was 19 ~ 24 km/h and the wind direction was around 15 degree ( NNE ) for the time period of the flight.

The flight plan :
  • Sport mode
  • Nose facing the wind, full speed forward for 200m
  • Orientation unchanged, full speed backward to return home
  • Right side of the craft facing the wind, slide right at full speed for 200m
  • Same orientation, slide left at full speed to return home
  • Repeat 2 ~ 5 a few times

Variation of force_est_c_x , force_est_c_y, vel_c_x and vel_c_y as the craft change the flying speed and direction :

View attachment 93076



The following chart compares the magnitude of vel_c_x , vel_c_y and CUSTOM.hSpeed[m/s]. The result shows that vel_c_x , vel_c_y are ground speeds of the craft

View attachment 93077




Test flight 2

The purpose is to find how force_est_c_x varies with vel_c_x and force_est_c_y with vel_c_y when there is negligible wind

The flight plan :
  • Sport mode
  • Fly forward and then backward in full speed
  • Slide to the right and then to the left at full speed
  • Repeat 2~3 in Cinematic mode
  • Repeat 2~3 in Position mode
The following is a scattered plot of the magnitude of force_est vs vel. It can be seen that force_est increases nonlinearly with vel. The relationship looks like drag = c * velocity ^n

View attachment 93078

View attachment 93079


The .TXT and .DAT of the two test flights are attached :

Test flight 1 ( windy ) :
DJIFlightRecord_2020-01-30_[10-33-16].txt
2020-01-30_10-32-48_FLY050.DAT

Test flight 2 ( no wind ) :
DJIFlightRecord_2020-02-03_[11-25-50].txt
2020-02-03_11-24-44_FLY054.DAT
?
 
  • Like
Reactions: E90RAW
I have done some test flights with my Mini just to check what the data fields in the group “wind” mean. This is my thinking so far :

Wind:Alti : no idea what it is. It assumed a large valve whenever the craft was flying forward and into the wind

Wind:velocity : velocity of the wind in m/s

Wind:VelLevel : takes values 0, 1, 2 no idea what it is.

Wind:Valid / valid : no idea what it is. It’s a state variable taking values 0(false) and 1(true)

Wind:g_status_wind_x : speed of the North component of wind in m/s, -ve for northerly wind

Wind:g_status_wind_y : speed of the East component of wind in m/s, -ve for easterly wind

Wind:force_est_c_x : component of the drag along the longitudinal axis of the craft , unit unknown. –ve when the air flow over the craft is from front to back

Wind:force_est_c_y : component of the drag along the lateral axis of the craft , unit unknown. –ve when the air flow over the craft is from right to left

Wind:vel_c_x : component of the ground speed of the craft along the longitudinal axis in m/s. +ve when the craft is flying forward

Wind:vel_c_y : component of the ground speed of the craft along the lateral axis in m/s. +ve when the craft is sliding right

Wind:battery_vol_mv : battery voltage in volt.



Test flight 1

It was conducted next to a government weather station. The flying altitude was level with the anemometer of the station ( 50 m above sea level ). The 10-min average wind speed reported by the station was 19 ~ 24 km/h and the wind direction was around 15 degree ( NNE ) for the time period of the flight.

The flight plan :
  • Sport mode
  • Nose facing the wind, full speed forward for 200m
  • Orientation unchanged, full speed backward to return home
  • Right side of the craft facing the wind, slide right at full speed for 200m
  • Same orientation, slide left at full speed to return home
  • Repeat 2 ~ 5 a few times

Variation of force_est_c_x , force_est_c_y, vel_c_x and vel_c_y as the craft change the flying speed and direction :

View attachment 93076



The following chart compares the magnitude of vel_c_x , vel_c_y and CUSTOM.hSpeed[m/s]. The result shows that vel_c_x , vel_c_y are ground speeds of the craft

View attachment 93077




Test flight 2

The purpose is to find how force_est_c_x varies with vel_c_x and force_est_c_y with vel_c_y when there is negligible wind

The flight plan :
  • Sport mode
  • Fly forward and then backward in full speed
  • Slide to the right and then to the left at full speed
  • Repeat 2~3 in Cinematic mode
  • Repeat 2~3 in Position mode
The following is a scattered plot of the magnitude of force_est vs vel. It can be seen that force_est increases nonlinearly with vel. The relationship looks like drag = c * velocity ^n

View attachment 93078

View attachment 93079


The .TXT and .DAT of the two test flights are attached :

Test flight 1 ( windy ) :
DJIFlightRecord_2020-01-30_[10-33-16].txt
2020-01-30_10-32-48_FLY050.DAT

Test flight 2 ( no wind ) :
DJIFlightRecord_2020-02-03_[11-25-50].txt
2020-02-03_11-24-44_FLY054.DAT
Nice work!
I think the Wind:vaid signal is an indication that the FC thinks the wind data is valid. Wind:valid is also presented as a StateSignal
1580841138878.png
For a while I was working on doing wind calculations based on tilt angle. The calculations were accurate only when the AC isn't accelerating in X, Y or Z. Also, the tilt angle needs to be steady. I suspect the MM wind calcs also require something like this.

Looking at your FLY050 The pink background are where the wind calcs are invalid
1580841580533.png
It can be seen that the wind data is invalid when the MM is accelerating.
 
That's the direction that the wind is blowing to, but wind direction is always quoted as direction from which the wind is blowing, giving:

atan2(–g_status_wind_y, –g_status_wind_x)
Right, it's either atan2(–g_status_wind_y, –g_status_wind_x) or
atan2(g_status_wind_y, g_status_wind_x). But, not
atan2(–g_status_wind_y, g_status_wind_x) as per post
Mavic Mini Wind data VS Mavic 2 Pro - airdata

I'm in favor of the wind vector version (i.e., atan2(g_status_wind_y, g_status_wind_x)) since it's consistent with the force being applied to the AC. Makes it inconvenient when comparing against AirData though. Maybe the right answer is to have both. Something like Wind:fromDir and Wind:toDir?
 
  • Like
Reactions: E90RAW and sar104
Right, it's either atan2(–g_status_wind_y, –g_status_wind_x) or
atan2(g_status_wind_y, g_status_wind_x). But, not
atan2(–g_status_wind_y, g_status_wind_x) as per post
Mavic Mini Wind data VS Mavic 2 Pro - airdata

I'm in favor of the wind vector version (i.e., atan2(g_status_wind_y, g_status_wind_x)) since it's consistent with the force being applied to the AC. Makes it inconvenient when comparing against AirData though. Maybe the right answer is to have both. Something like Wind:fromDir and Wind:toDir?

Agreed - there was a typo in my original post. Both might be good, since the universal convention for wind direction is "from".
 
How about the following field name labels

Wind:dirN == g_status_wind_X
Wind:dirE == g_status_wind_Y
Wind:dragBodyX == force_est_c_x
Wind:dragBodyY == force_est_c_y
Wind:gVelBodyX == vel_c_x
Wind:gVelBodyY == vel_c_y


And, the following derived fields

Wind:dir == atan2(g_status_wind_y, g_status_wind_x)
Wind:dirFrom == atan2(-g_status_wind_y, -g_status_wind_x) i.e. the conventional wind direction

@new2mavic , @sar104
 
Last edited:
  • Like
Reactions: E90RAW and sar104
How about the following field name labels

Wind:dirN == g_status_wind_X
Wind:dirE == g_status_wind_Y
Wind:dragBodyX == force_est_c_x
Wind:dragBodyY == force_est_c_y
Wind:gVelBodyX == vel_c_x
Wind:gVelBodyY == vel_c_y


And, the following derived fields

Wind:dir == atan2(g_status_wind_y, g_status_wind_x)
Wind:dirFrom == atan2(-g_status_wind_y, -g_status_wind_x) i.e. the conventional wind direction

That works. Although maybe some could be shortened. Wind:N, Wind:E, Wind:X, Wind:Y, for example. If it is reasonable to use N and E to indicate the earth frame of reference and X and Y to indicate the aircraft frame of reference then that should be unambiguous.
 
How about the following field name labels

Wind:dirN == g_status_wind_X
Wind:dirE == g_status_wind_Y
Wind:dragBodyX == force_est_c_x
Wind:dragBodyY == force_est_c_y
Wind:gVelBodyX == vel_c_x
Wind:gVelBodyY == vel_c_y


And, the following derived fields

Wind:dir == atan2(g_status_wind_y, g_status_wind_x)
Wind:dirFrom == atan2(-g_status_wind_y, -g_status_wind_x) i.e. the conventional wind direction

@new2mavic , @sar104

Works for me.

g_status_wind_X and g_status_wind_Y are actually speed quantities in m/s. It has already been verified that Wind:velocity = SQRT( g_status_wind_X ^2 + g_status_wind_Y ^2 ) so it may be better to leave out the "dir" part in the corresponding field names.
 
  • Like
Reactions: E90RAW
@sar104 slightly off topic but I thought I'd ask here rather than start another thread.
Is there any reason why there is no wind data when I look at the DAT file from a Mavic Air 2?
If I load up the DAT from the Mavic Mini posted above into CsvView then the wind data is there.

Im kinda new to this so I could very well be doing something wrong.
 
@sar104 slightly off topic but I thought I'd ask here rather than start another thread.
Is there any reason why there is no wind data when I look at the DAT file from a Mavic Air 2?
If I load up the DAT from the Mavic Mini posted above into CsvView then the wind data is there.

Im kinda new to this so I could very well be doing something wrong.
You're not doing anything wrong. The MA2 is a new platform and CsvView/DatCon 3.7.6 doesn't have the capability to process the MA2 wind data. The next version of CsvView/DatCon will at least have the raw wind data found in the airspeed_estimate records.

I've been working on some extensive changes to CsvView/DatCon and may not have time to add the user friendly version of the wind data described earlier in this thread. That may have to come after the next version.
 
  • Like
Reactions: sar104 and gb160
You're not doing anything wrong. The MA2 is a new platform and CsvView/DatCon 3.7.6 doesn't have the capability to process the MA2 wind data. The next version of CsvView/DatCon will at least have the raw wind data found in the airspeed_estimate records.

I've been working on some extensive changes to CsvView/DatCon and may not have time to add the user friendly version of the wind data described earlier in this thread. That may have to come after the next version.
That's cool buddy, at least I know Im not doing something wrong.
Forgive my ignorance but how does the drone measure/estimate the wind speed?

Thanks for the software btw!
 
That's cool buddy, at least I know Im not doing something wrong.
Forgive my ignorance but how does the drone measure/estimate the wind speed?

Thanks for the software btw!
Pitch and roll is used to determine tilt inclination/direction of the AC. From that air speed/direction in the AC frame of reference can be determined. Then wind speed/direction can be computed using both air and ground speed/direction.

A simple case is when the AC is hovering. Since ground speed is 0.0 the wind speed will be equal to the air speed. Wind direction is opposite the tilt direction.
 
  • Like
Reactions: gb160
Pitch and roll is used to determine tilt inclination/direction of the AC. From that air speed/direction in the AC frame of reference can be determined. Then wind speed/direction can be computed using both air and ground speed/direction.

A simple case is when the AC is hovering. Since ground speed is 0.0 the wind speed will be equal to the air speed. Wind direction is opposite the tilt direction.
Cheers that's very informative.
 
That's cool buddy, at least I know Im not doing something wrong.
Forgive my ignorance but how does the drone measure/estimate the wind speed?

Thanks for the software btw!
Can you share some of your .DATs. I only have 4 and need more to adequately develop and test the MA2 part of CsvView/DatCon. I'd be particularly interested in any .DATs that might have ADSB data.
 
Can you share some of your .DATs. I only have 4 and need more to adequately develop and test the MA2 part of CsvView/DatCon. I'd be particularly interested in any .DATs that might have ADSB data.
Happy to share mate, but I'm in the UK so don't have ADSB.
Still interested?
 
Happy to share mate, but I'm in the UK so don't have ADSB.
Still interested?
Yes, still interested. The easy way is to zip the .DATs you want to share and then Dropbox or GoogleDrive that .zip. Thanks.
 
Lycus Tech Mavic Air 3 Case

DJI Drone Deals

New Threads

Forum statistics

Threads
131,108
Messages
1,559,918
Members
160,087
Latest member
O'Ryan