സ്ഥലം#

ആമുഖം#

VEX VR ലൊക്കേഷൻ സെൻസറിന് വ്യത്യസ്ത കളിസ്ഥലങ്ങളിലെ റോബോട്ടിന്റെ സ്ഥാനവും കോണും ട്രാക്ക് ചെയ്യാൻ കഴിയും.

ലഭ്യമായ എല്ലാ രീതികളുടെയും ഒരു ലിസ്റ്റ് താഴെ കൊടുക്കുന്നു:

  • position – റോബോട്ടിന്റെ X അല്ലെങ്കിൽ Y കോർഡിനേറ്റ് തിരികെ നൽകുന്നു.

  • position_angle – റോബോട്ടിന്റെ കോൺ തിരികെ നൽകുന്നു.

position#

position VR റോബോട്ടിന്റെ X അല്ലെങ്കിൽ Y കോർഡിനേറ്റ് സ്ഥാനം നൽകുന്നു.

Usage:
location.position(axis, units)

പാരാമീറ്ററുകൾ

വിവരണം

axis

​

  • X
  • Y
    • എന്നതിന്റെ സ്ഥാനം നൽകേണ്ട അച്ചുതണ്ട്

units

സ്ഥാനം പ്രതിനിധീകരിക്കുന്നതിനുള്ള യൂണിറ്റ്:

  • INCHES
  • MM – മില്ലിമീറ്റർ
def main():
    # Display the Y position after driving
    drivetrain.drive_for(FORWARD, 100, MM)
    brain.print(location.position(Y, MM))

# VR threads — Do not delete
vr_thread(main)

position_angle#

position_angle റോബോട്ടിന്റെ കോൺ ഡിഗ്രിയിൽ തിരികെ നൽകുന്നു.

Usage:
location.position_angle(units)

പാരാമീറ്ററുകൾ

വിവരണം

units

കോണിനെ പ്രതിനിധീകരിക്കുന്ന യൂണിറ്റ്:

  • DEGREES
def main():
    # Display the angle after turning
    drivetrain.turn_for(RIGHT, 135, DEGREES)
    brain.print(location.position_angle(DEGREES))

# VR threads — Do not delete
vr_thread(main)