Class: Faker::Drone

Inherits:
Base
  • Object
show all
Defined in:
lib/faker/default/drone.rb

Constant Summary

Constants inherited from Base

Base::LLetters, Base::Letters, Base::NOT_GIVEN, Base::Numbers, Base::ULetters

Class Method Summary collapse

Methods inherited from Base

bothify, disable_enforce_available_locales, fetch, fetch_all, flexible, generate, letterify, method_missing, numerify, parse, rand, rand_in_range, regexify, resolve, respond_to_missing?, sample, shuffle, shuffle!, translate, unique, with_locale

Class Method Details

.battery_capacityString

Returns the drone battery capacity

Examples:

Faker::Drone.battery_capacity #=> "3500 mAh"

Returns:

  • (String)

Available since:

  • 2.14.0



171
172
173
# File 'lib/faker/default/drone.rb', line 171

def battery_capacity
  parse('drone.battery_capacity')
end

.battery_typeString

Returns the battery type

Examples:

Faker::Drone.battery_type #=> "LiPo 4S"

Returns:

  • (String)

Available since:

  • 2.14.0



197
198
199
# File 'lib/faker/default/drone.rb', line 197

def battery_type
  parse('drone.battery_type')
end

.battery_voltageString

Returns battery voltage

Examples:

Faker::Drone.battery_voltage #=> "13.2V"

Returns:

  • (String)

Available since:

  • 2.14.0



184
185
186
# File 'lib/faker/default/drone.rb', line 184

def battery_voltage
  parse('drone.battery_voltage')
end

.battery_weightString

Returns total battery weight in grams

Examples:

Faker::Drone.battery_weight #=> "198 g"

Returns:

  • (String)

Available since:

  • 2.14.0



210
211
212
# File 'lib/faker/default/drone.rb', line 210

def battery_weight
  parse('drone.battery_weight')
end

.charging_temperatureString

Returns charging temperature for battery in Fahrenheit

Examples:

Faker::Drone.charging_temperature #=> "41-104F"

Returns:

  • (String)

Available since:

  • 2.14.0



223
224
225
# File 'lib/faker/default/drone.rb', line 223

def charging_temperature
  parse('drone.charging_temperature')
end

.flight_timeString

Returns max flight time for drone in optimal conditions

Examples:

Faker::Drone.flight_time #=> "34 min"

Returns:

  • (String)

Available since:

  • 2.14.0



67
68
69
# File 'lib/faker/default/drone.rb', line 67

def flight_time
  parse('drone.flight_time')
end

.isoString

Returns camera ISO range for drone

Examples:

Faker::Drone.iso #=> "100-3200"

Returns:

  • (String)

Available since:

  • 2.14.0



249
250
251
# File 'lib/faker/default/drone.rb', line 249

def iso
  parse('drone.iso')
end

.max_altitudeString

Returns max altitude drone can go above sea level in meters

Examples:

Faker::Drone.max_altitude #=> "5000 m"

Returns:

  • (String)

Available since:

  • 2.14.0



80
81
82
# File 'lib/faker/default/drone.rb', line 80

def max_altitude
  parse('drone.max_altitude')
end

.max_angular_velocityString

Returns max angular velocity of drone in degrees/s

Examples:

Faker::Drone.max_angular_velocity #=> "250 degree/s"

Returns:

  • (String)

Available since:

  • 2.14.0



132
133
134
# File 'lib/faker/default/drone.rb', line 132

def max_angular_velocity
  parse('drone.max_angular_velocity')
end

.max_ascent_speedString

Returns maximum ascent speed for drone in m/s

Examples:

Faker::Drone.max_ascent_speed #=> "4 m/s"

Returns:

  • (String)

Available since:

  • 2.14.0



41
42
43
# File 'lib/faker/default/drone.rb', line 41

def max_ascent_speed
  parse('drone.max_ascent_speed')
end

.max_charging_powerString

Returns max chargin power required for battery

Examples:

Faker::Drone.max_charging_power #=> "38W"

Returns:

  • (String)

Available since:

  • 2.14.0



236
237
238
# File 'lib/faker/default/drone.rb', line 236

def max_charging_power
  parse('drone.max_charging_power')
end

.max_descent_speedString

Returns maximum descent speed for drone in m/s

Examples:

Faker::Drone.max_descent_speed #=> "4 m/s"

Returns:

  • (String)

Available since:

  • 2.14.0



54
55
56
# File 'lib/faker/default/drone.rb', line 54

def max_descent_speed
  parse('drone.max_descent_speed')
end

.max_flight_distanceString

Returns how far drone can go in optimal condition when full charged in meters

Examples:

Faker::Drone.max_flight_distance #=> "18500 m"

Returns:

  • (String)

Available since:

  • 2.14.0



93
94
95
# File 'lib/faker/default/drone.rb', line 93

def max_flight_distance
  parse('drone.max_flight_distance')
end

.max_resolutionString

Returns max camera resolution in MP“

Examples:

Faker::Drone.max_resolution #=> "48MP"

Returns:

  • (String)

Available since:

  • 2.14.0



262
263
264
# File 'lib/faker/default/drone.rb', line 262

def max_resolution
  parse('drone.max_resolution')
end

.max_shutter_speedString

Returns max shutter speed for camera

Examples:

Faker::Drone.max_shutter_speed #=> "60s"

Returns:

  • (String)

Available since:

  • 2.14.0



314
315
316
# File 'lib/faker/default/drone.rb', line 314

def max_shutter_speed
  "#{fetch('drone.max_shutter_speed')}#{fetch('drone.shutter_speed_units')}"
end

.max_speedString

Returns max horizontal speed by drone in m/s

Examples:

Faker::Drone.max_speed #=> "19 m/s"

Returns:

  • (String)

Available since:

  • 2.14.0



106
107
108
# File 'lib/faker/default/drone.rb', line 106

def max_speed
  parse('drone.max_speed')
end

.max_tilt_angleString

Returns max tilt angle drone can go in degrees

Examples:

Faker::Drone.max_tilt_angle #=> "35 degrees"

Returns:

  • (String)

Available since:

  • 2.14.0



145
146
147
# File 'lib/faker/default/drone.rb', line 145

def max_tilt_angle
  parse('drone.max_tilt_angle')
end

.max_wind_resistanceString

Returns max wind resistance by drone in m/s

Examples:

Faker::Drone.max_wind_resistance #=> "10.5 m/s"

Returns:

  • (String)

Available since:

  • 2.14.0



119
120
121
# File 'lib/faker/default/drone.rb', line 119

def max_wind_resistance
  parse('drone.max_wind_resistance')
end

.min_shutter_speedString

Returns min shutter speed for camera

Examples:

Faker::Drone.min_shutter_speed #=> "1/8000s"

Returns:

  • (String)

Available since:

  • 2.14.0



327
328
329
# File 'lib/faker/default/drone.rb', line 327

def min_shutter_speed
  "#{fetch('drone.min_shutter_speed')}#{fetch('drone.shutter_speed_units')}"
end

.namestring

Returns random drone name with company

Examples:

Faker::Drone.name #=> "DJI Mavic Air 2"

Returns:

  • (string)

Available since:

  • 2.14.0



15
16
17
# File 'lib/faker/default/drone.rb', line 15

def name
  fetch('drone.name')
end

.operating_temperatureString

Returns operating temperature for drone in Fahrenheit

Examples:

Faker::Drone.operating_temperature #=> "14-104F"

Returns:

  • (String)

Available since:

  • 2.14.0



158
159
160
# File 'lib/faker/default/drone.rb', line 158

def operating_temperature
  parse('drone.operating_temperature')
end

.photo_formatString

Returns photo format for drone

Examples:

Faker::Drone.photo_format #=> "JPEG"

Returns:

  • (String)

Available since:

  • 2.14.0



275
276
277
# File 'lib/faker/default/drone.rb', line 275

def photo_format
  parse('drone.photo_format')
end

.shutter_speed_rangeString

Returns max and min shutter speed for camera

Examples:

Faker::Drone.shutter_speed_range #=> "8-1/8000s"

Returns:

  • (String)

Available since:

  • 2.14.0



301
302
303
# File 'lib/faker/default/drone.rb', line 301

def shutter_speed_range
  "#{fetch('drone.max_shutter_speed')}-#{fetch('drone.min_shutter_speed')}#{fetch('drone.shutter_speed_units')}"
end

.video_formatString

Returns video format

Examples:

Faker::Drone.video_format #=> "MP4"

Returns:

  • (String)

Available since:

  • 2.14.0



288
289
290
# File 'lib/faker/default/drone.rb', line 288

def video_format
  parse('drone.video_format')
end

.weightString

Returns total drone weight in grams

Examples:

Faker::Drone.weight #=> "570 g"

Returns:

  • (String)

Available since:

  • 2.14.0



28
29
30
# File 'lib/faker/default/drone.rb', line 28

def weight
  parse('drone.weight')
end