DJI Mobile SDK Documentation

      class DJIRTKBaseStation

      @interface DJIRTKBaseStation : DJIBaseComponent
      Header:DJIRTKBaseStation.h
      Inherits From:DJIBaseComponent
      Description:

      RTK Base Station.

      Class Members:
      Delegate
      property
      property delegate
      @property(nonatomic, weak) id<DJIRTKBaseStationDelegate> delegate
      Header:DJIRTKBaseStation.h
      Description:

      DJI base station delegate.

      See Also:

      DJIRTKBaseStationDelegate

      method getBaseStationReferencingLocationWithCompletion
      - (void)getBaseStationReferencingLocationWithCompletion:(void (^_Nonnull)(CLLocation *_Nullable location, NSError *_Nullable error))completion
      Header:DJIRTKBaseStation.h
      Description:

      Gets the referencing location manually configured to the base station. When a user can get a more accurate location (coordinate with less absolute error) of the base station by using external tools, the accurate location can be set to the base station to improve the accuracy of the aircraft location. If the offset between the referencing location and the location detected by the ground system is larger than 5 meters, the base station will ignore the referencing location. It is only supported by Phantom 4 RTK and M200 series v2 and Matrice 300 RTK.

      Input Parameters:
      CLLocation *_Nullable locationThe referencing location of the base station.
      NSError *_Nullable errorError if there is any.
      void (^_Nonnull)(CLLocation *_Nullable location, NSError *_Nullable error) completionCompletion block that receives the execution result.
      method setBaseStationReferencingLocation:withCompletion
      - (void)setBaseStationReferencingLocation:(CLLocation *)location withCompletion:(DJICompletionBlock)completion
      Header:DJIRTKBaseStation.h
      Description:

      Sets the referencing location of the base station to improve the accuracy. When a user can get a more accurate location (coordinate with less absolute error) of the base station by using external tools, the accurate location can be set to the base station to improve the accuracy of the aircraft location. If the offset between the referencing location and the location detected by the base station is larger than 5 meters, the base station will ignore the referencing location. It is only supported by Phantom 4 RTK and M200 series v2 and Matrice 300 RTK. For Matrice 300 RTK, device administrator authentication is required before invoking this method.

      Input Parameters:
      CLLocation * locationThe referencing location of the base station.
      DJICompletionBlock completionCompletion block that receives the execution result.
      method resetRTKBaseStationLocationWithCompletion
      - (void)resetRTKBaseStationLocationWithCompletion:(DJICompletionBlock)completion
      Header:DJIRTKBaseStation.h
      Description:

      Reset RTK base station's location. This will make base station's location type became DJIRTKBaseStationLocationTypeAuto. The previously set location by setBaseStationReferencingLocation:withCompletion will be invalid. For Matrice 300 RTK, device administrator authentication is required before invoking this method.

      Input Parameters:
      DJICompletionBlock completionCompletion block that receives the execution result.
      method hasDeviceAdminLoggedIn
      - (BOOL)hasDeviceAdminLoggedIn
      Header:DJIRTKBaseStation.h
      Description:

      YES if device administrator has logged in. For Matrice 300 RTK, device administrator authentication is required before changing any settings, including base station's name, base station's password, and base station's referencing location. Device administrator login is required every time when the application is relaunched. Please login with default password 123456, if the base station's password is reset. Supported only by Matrice 300 RTK.

      Return:
      BOOLThe result whether login or not.
      Login As Device Admin
      method
      method logInAsDeviceAdmin:withCompletion
      - (void)logInAsDeviceAdmin:(NSString *)password withCompletion:(DJICompletionBlock)completion
      Header:DJIRTKBaseStation.h
      Description:

      Log in as base station administrator account with password to change setting. User will need to login again in the following scenarios:
      - Enter the application for the first time.
      - Re-enter after the application restarts.
      - Reset password via the button on the base station.
      - Switch and connect other base stations.
      The default password is 123456. It is only supported by Matrice 300 RTK.

      Input Parameters:
      NSString * passwordThe password of base station.
      DJICompletionBlock completionThe completion block that receives the execution result.
      Login Out
      method
      method logOutWithCompletion
      - (void)logOutWithCompletion:(DJICompletionBlock)completion
      Header:DJIRTKBaseStation.h
      Description:

      Log out of the base station. It is only supported by Matrice 300 RTK.

      Input Parameters:
      DJICompletionBlock completionCompletion block that receives the execution result.
      method changePassword:newPassword:completion
      - (void)changePassword:(NSString *)oldPassword newPassword:(NSString *)newPassword completion:(DJICompletionBlock)completion
      Header:DJIRTKBaseStation.h
      Description:

      Change the password for current base station. The password must be 6 digits. It is only supported by Matrice 300 RTK.

      Input Parameters:
      NSString * oldPasswordThe old password.
      NSString * newPasswordThe new password that you want to change.
      DJICompletionBlock completionCompletion block that receives the execution result.
      method setName:withCompletion
      - (void)setName:(NSString *)name withCompletion:(DJICompletionBlock)completion
      Header:DJIRTKBaseStation.h
      Description:

      Change the name of the base station. The name is composed of maximum 4 characters or numbers. Please log in before invoking this method. It is only supported by Matrice 300 RTK.

      Input Parameters:
      NSString * nameThe name of the base station set by the user.
      DJICompletionBlock completionCompletion block that receives the execution result.
      Get Name
      method
      method getNameWithCompletion
      - (void)getNameWithCompletion:(void(^)(NSString *_Nullable name, NSError *_Nullable error))completion
      Header:DJIRTKBaseStation.h
      Description:

      Gets the name of the base station. Please log in before invoking this method. It is only supported by Matrice 300 RTK.

      Input Parameters:
      NSString *_Nullable nameThe name set for base station.
      NSError *_Nullable errorError if there is any.
      void(^)(NSString *_Nullable name, NSError *_Nullable error) completionCompletion block that receives the execution result.
      State Updates
      protocol
      protocol DJIRTKBaseStationDelegate
      @protocol DJIRTKBaseStationDelegate <NSObject>
      Header:DJIRTKBaseStation.h
      Inherits From:NSObject
      Description:

      This protocol provides a delegate method to update the base station state.

      Protocol Methods:

      Protocol Method

      method baseStation:didUpdateBaseStationBatteryState
      required
      - (void)baseStation:(DJIRTKBaseStation *_Nonnull)baseStation didUpdateBaseStationBatteryState:(DJIRTKBaseStationBatteryState *)state
      Header:DJIRTKBaseStation.h
      Description:

      Callback function that updates the RTK base station battery state. Only Supported by Phantom 4 RTK and M200 series v2.

      Input Parameters:
      DJIRTKBaseStation *_Nonnull baseStationInstance of the Base Station for which battery state will be updated.
      DJIRTKBaseStationBatteryState * stateBase station battery State.
      method baseStation:didUpdateBaseStationState
      required
      - (void)baseStation:(DJIRTKBaseStation *_Nonnull)baseStation didUpdateBaseStationState:(DJIRTKBaseStationState *)state
      Header:DJIRTKBaseStation.h
      Description:

      Callback function that updates the RTK base station state. Only Supported by Phantom 4 RTK and M200 series v2.

      Input Parameters:
      DJIRTKBaseStation *_Nonnull baseStationInstance of the Base Station for which state will be updated.
      DJIRTKBaseStationState * stateBase station State.
      enum DJIRTKBaseStationLocationType
      typedef NS_ENUM(uint8_t, DJIRTKBaseStationLocationType)
      Header:DJIRTKBaseStationBaseTypes.h
      Description:

      All the possible basestation location type of DJIRTKBaseStationLocationType.

      Enum Members:
      DJIRTKBaseStationLocationTypeAutoBaseStation current location is auto calculateed by BaseStation itself.
      DJIRTKBaseStationLocationTypeManualBaseStation current location is manually set by user.
      DJIRTKBaseStationLocationTypeUnknownUnknown BaseStation location type.